Code Monkey home page Code Monkey logo

Comments (37)

edenhill avatar edenhill commented on September 13, 2024

In the Makefile, find this section:

# Clang warnings to ignore
ifeq ($(CC),clang)
    CFLAGS+=-Wno-gnu-designator
endif

And make it unconditional by removig the ifeq.. and endif lines

Let me know if this fixes your problem.
Could you please also tell me what OSX version you are on?

from librdkafka.

gpatmore avatar gpatmore commented on September 13, 2024

I apologize for the duplicate: #33
osx 10.9.1

from librdkafka.

gpatmore avatar gpatmore commented on September 13, 2024

seems I'm getting the same issues as issue 33

cc -MD -MP -O2 -Wall -Werror -Wfloat-equal -Wpointer-arith -fPIC -I. -g -Wno-gnu-designator -DSG -c rdkafka_broker.c
rdkafka_broker.c:2283:22: error: implicit declaration of function 'be64toh' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
hdr->Offset = be64toh(hdr->Offset);
^
rdkafka_broker.c:2884:30: error: implicit declaration of function 'htobe64' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
part2->Time = htobe64(rktp->rktp_query_offset);
^
2 errors generated.
make: *** [rdkafka_broker.o] Error 1

That's with the suggestion you made above

from librdkafka.

gpatmore avatar gpatmore commented on September 13, 2024

if this helps:

:$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

Thank you.
I unfortunately dont have access to a 10.9 box which I would need to fix this.
But I'll see what I can do.

from librdkafka.

gpatmore avatar gpatmore commented on September 13, 2024

understood. I tried to track it down, but seems like the declarations are ahead of usage for these methods everywhere I can find them.

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

@dvanliere's pull request (issue #51) which was just merged into master fixes this.
Can you give it a try and report back?

from librdkafka.

gpatmore avatar gpatmore commented on September 13, 2024

Compiles without error now, but make install fails with Illegal option -t
(see below)

Thank you for your attention to this issue

:librdkafka gpatmore$ sudo make install

if [ "/usr/local" != "/usr/local" ]; then \

DESTDIR="/usr/local/usr"; \

else \

DESTDIR="/usr/local" ; \

fi ; \

install -d $DESTDIR/include/librdkafka $DESTDIR/lib ; \

install -t $DESTDIR/include/librdkafka rdkafka.h ; \

install -t $DESTDIR/lib librdkafka.a ; \

install -t $DESTDIR/lib librdkafka.so.1 ; \

(cd $DESTDIR/lib && ln -sf librdkafka.so.1 librdkafka.so)

install: illegal option -- t

usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]

           [-o owner] file1 file2

   install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]

           [-o owner] file1 ... fileN directory

   install -d [-v] [-g group] [-m mode] [-o owner] directory ...

install: illegal option -- t

usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]

           [-o owner] file1 file2

   install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]

           [-o owner] file1 ... fileN directory

   install -d [-v] [-g group] [-m mode] [-o owner] directory ...

install: illegal option -- t

usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]

           [-o owner] file1 file2

   install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]

           [-o owner] file1 ... fileN directory

   install -d [-v] [-g group] [-m mode] [-o owner] directory ...

On Sat, Jan 4, 2014 at 3:11 PM, Magnus Edenhill [email protected]:

@dvanliere https://github.com/dvanliere's pull request (issue #51#51)
which was just merged into master fixes this.
Can you give it a try and report back?


Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-31587362
.

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

@dvanliere, still got your superman costume on?

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

Can you give it another go with an updated master? I changed the install options to be more classic.

from librdkafka.

gpatmore avatar gpatmore commented on September 13, 2024

Thanks guys, you really rock.

Still failing, but different issue.

Here's my output

gpatmore$ sudo make install

uname: illegal option -- o

usage: uname [-amnprsv]

if [ "/usr/local" != "/usr/local" ]; then \

DESTDIR="/usr/local/usr"; \

else \

DESTDIR="/usr/local" ; \

fi ; \

install -d $DESTDIR/include/librdkafka $DESTDIR/lib ; \

install rdkafka.h $DESTDIR/include/librdkafka ; \

install librdkafka.a $DESTDIR/lib ; \

install librdkafka.so.1 $DESTDIR/lib ; \

(cd $DESTDIR/lib && ln -sf librdkafka.so.1 librdkafka.so)

Additionally, and clearly not as important, make tests is also failing for
me, but looks like it's a hard dependency on valgrind. Next chance I get
I'll install valgrind and see if it changes behavior. I'll reply to this
thread with any info I get. It would be great if it could use either the
bundled test.conf.example or else a basic test.conf file for the make tests
target, but maybe there's too much variation in environments to make that
practical.

gpatmore$ sudo make tests

uname: illegal option -- o

usage: uname [-amnprsv]

make -C tests

cc -g -Wall -Werror -Wfloat-equal -Wpointer-arith -O2 -I../ ../librdkafka.a
test.o 0001-multiobj.c -o 0001-multiobj.test ../librdkafka.a -lpthread -lz

cc -g -Wall -Werror -Wfloat-equal -Wpointer-arith -O2 -I../ ../librdkafka.a
test.o 0002-unkpart.c -o 0002-unkpart.test ../librdkafka.a -lpthread -lz

cc -g -Wall -Werror -Wfloat-equal -Wpointer-arith -O2 -I../ ../librdkafka.a
test.o 0003-msgmaxsize.c -o 0003-msgmaxsize.test ../librdkafka.a -lpthread
-lz

for i in 0001-multiobj.test 0002-unkpart.test 0003-msgmaxsize.test ; do
./run-test.sh $i || exit 1 ; done

\e[36m############## 0001-multiobj.test ################\e[0m

\e[36m### Running test 0001-multiobj.test in bare mode ###\e[0m

Creating and destroying 100 kafka instances

Test failed at test.c:77:test_conf_init():

test.conf not found

\e[31m###

Test 0001-multiobj.test in bare mode FAILED!

###\e[0m

\e[36m### Running test 0001-multiobj.test in valgrind mode ###\e[0m

./run-test.sh: line 43: valgrind: command not found

\e[31m###

Test 0001-multiobj.test in valgrind mode FAILED!

###\e[0m

make[1]: *** [all] Error 1

make: *** [tests] Error 2

Thanks again guys,

Greg

On Tue, Jan 7, 2014 at 10:17 AM, Magnus Edenhill
[email protected]:

Can you give it another go with an updated master? I changed the install
options to be more classic.


Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-31745580
.

from librdkafka.

drdee avatar drdee commented on September 13, 2024

Enjoying my holidays but will look at this next week.

from librdkafka.

drdee avatar drdee commented on September 13, 2024

So you need to copy test.conf.example in tests/ to test.conf that should make the tests pass. I have created one small pull request to fix those minor OSX issues. On my OSX 10.9 machine all tests pass.

from librdkafka.

drdee avatar drdee commented on September 13, 2024

@gpatmore can you confirm that the latest version on master works on OSX 10.9?

from librdkafka.

gpatmore avatar gpatmore commented on September 13, 2024

Sorry it's taken me so long to get back to you on this, I've been swamped
lately :(

Sadly, make is failing again:

CCCNYC01GAPs-MacBook-Pro:librdkafka gpatmore$ make clean

rm -f rdkafka.o rdkafka_broker.o rdkafka_msg.o rdkafka_topic.o
rdkafka_defaultconf.o rdkafka_timer.o rdkafka_offset.o rdcrc32.o rdgz.o
rdaddr.o rdrand.o rdthread.o rdqueue.o rdlog.o snappy.o rdkafka.d
rdkafka_broker.d rdkafka_msg.d rdkafka_topic.d rdkafka_defaultconf.d
rdkafka_timer.d rdkafka_offset.d rdcrc32.d rdgz.d rdaddr.d rdrand.d
rdthread.d rdqueue.d rdlog.d snappy.d \

librdkafka_.a librdkafka_.so librdkafka*.so.1

make -C tests clean

rm -f 0001-multiobj.test 0002-unkpart.test 0003-msgmaxsize.test

make -C examples clean

rm -f rdkafka_example rdkafka_performance

CCCNYC01GAPs-MacBook-Pro:librdkafka gpatmore$ make

cc -MD -MP -O2 -Wall -Werror -Wfloat-equal -Wpointer-arith -I. -g -DSG
-fPIC -c rdkafka.c

cc -MD -MP -O2 -Wall -Werror -Wfloat-equal -Wpointer-arith -I. -g -DSG
-fPIC -c rdkafka_broker.c

rdkafka_broker.c:395:44: error: use of undeclared identifier 'MSG_NOSIGNAL'

    r = sendmsg(rkb->rkb_s, msg, MSG_DONTWAIT|MSG_NOSIGNAL);

                                              ^

1 error generated.

make: *** [rdkafka_broker.o] Error 1

CCCNYC01GAPs-MacBook-Pro:librdkafka gpatmore$ git branch

  • master

CCCNYC01GAPs-MacBook-Pro:librdkafka gpatmore$ git rev-parse --verify HEAD

9fcc463

CCCNYC01GAPs-MacBook-Pro:librdkafka gpatmore$

On Sun, Jan 12, 2014 at 5:49 AM, Diederik van Liere <
[email protected]> wrote:

@gpatmore https://github.com/gpatmore can you confirm that the latest
version on master works on OSX 10.9?


Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-32119780
.

from librdkafka.

drdee avatar drdee commented on September 13, 2024

Yes, it's now failing for me as well :) @edenhill introduced a regression in one of his most recent commits ;)
The error is: rdkafka_broker.c:395:44: error: use of undeclared identifier 'MSG_NOSIGNAL'

from librdkafka.

drdee avatar drdee commented on September 13, 2024

#62 fixes the MSG_NOSIGNAL issue.

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

I'm sorry about this mess but it is hard to keep all platforms happy without automatic builds for all platforms.
Unfortunately travis does not provide this and I'm looking into other alternatives.

It should compile on osx now...

from librdkafka.

gpatmore avatar gpatmore commented on September 13, 2024

no sweat man. Your getting through it. I'll try to be more available as a testing resource.

Sent from my iPhone

On Jan 16, 2014, at 9:12 PM, Magnus Edenhill [email protected] wrote:

I'm sorry about this mess but it is hard to keep all platforms happy without automatic builds for all platforms.
Unfortunately travis does not provide this and I'm looking into other alternatives.

It should compile on osx now...


Reply to this email directly or view it on GitHub.

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

Reopen if still an issue

from librdkafka.

gpatmore avatar gpatmore commented on September 13, 2024

fix: #63

On Thu, Jan 16, 2014 at 10:33 PM, Magnus Edenhill
[email protected]:

Closed #49 #49.


Reply to this email directly or view it on GitHubhttps://github.com//issues/49
.

from librdkafka.

leroix avatar leroix commented on September 13, 2024

I think maybe building on osx 10.9 is broken again. Tried on 2 different machines.

[librdkafka (master)]$./configure
using cache file config.cache
checking for OS or distribution... ok (osx)
checking for C compiler from CC env... ok (cached)
checking for C++ compiler from CXX env... failed
checking for C++ compiler (g++)... ok (cached)
checking executable ld... ok (cached)
checking executable nm... ok (cached)
checking executable objdump... failed (disable)
checking executable strip... ok (cached)
checking for pkgconfig (by command)... ok (cached)
checking for install (by command)... failed
checking for PIC (by compile)... ok (cached)
checking for GNU-compatible linker options... failed
checking for OSX linker options... ok (cached)
checking for GNU linker-script ld flag... failed
checking for Solaris linker-script ld flag... failed (ignore)
checking for __atomic_32 (by compile)... ok (cached)
checking for __atomic_64 (by compile)... ok (cached)
checking for socket (by compile)... ok (cached)
parsing version '0x00080300'... ok (0.8.3)
checking for libpthread (by pkg-config)... failed
checking for libpthread (by compile)... ok
checking for zlib (by pkg-config)... failed
checking for zlib (by compile)... ok
checking for librt (by pkg-config)... failed
checking for librt (by compile)... failed
checking executable otool... ok (cached)
Generated rdkafka.pc
Generated Makefile.config
Generated config.h

Configuration summary:
prefix /usr/local
ARCH x86_64
CPU generic
MKL_DISTRO osx
CC clang
CXX g++
LD clang
NM nm
STRIP strip
CPPFLAGS -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith
PKG_CONFIG pkg-config
INSTALL install
LIB_LDFLAGS -shared -dynamiclib -Wl,-install_name,$(DESTDIR)$(libdir)/$(LIBNAME).so.$(LIBVER)
LDFLAGS -g
RDKAFKA_VERSION_STR 0.8.3
LIBS -lpthread -lz
CXXFLAGS -Wno-non-virtual-dtor
SYMDUMPER otool -TV
exec_prefix /usr/local
bindir /usr/local/bin
sbindir /usr/local/sbin
libexecdir /usr/local/libexec
datadir /usr/local/share
sysconfdir /usr/local/etc
sharedstatedir /usr/local/com
localstatedir /usr/local/var
libdir /usr/local/lib
includedir /usr/local/include
infodir /usr/local/info
mandir /usr/local/man
Generated config.cache

Now type 'make' to build
[librdkafka (master)]$make
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdkafka.c -o rdkafka.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdkafka_broker.c -o rdkafka_broker.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdkafka_msg.c -o rdkafka_msg.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdkafka_topic.c -o rdkafka_topic.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdkafka_defaultconf.c -o rdkafka_defaultconf.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdkafka_timer.c -o rdkafka_timer.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdkafka_offset.c -o rdkafka_offset.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdgz.c -o rdgz.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdaddr.c -o rdaddr.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdrand.c -o rdrand.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdthread.c -o rdthread.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdqueue.c -o rdqueue.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -c rdlog.c -o rdlog.o
Creating shared library librdkafka.so.1
clang -g -shared -dynamiclib -Wl,-install_name,/usr/local/lib/librdkafka.so.1 rdkafka.o rdkafka_broker.o rdkafka_msg.o rdkafka_topic.o rdkafka_defaultconf.o rdkafka_timer.o rdkafka_offset.o rdcrc32.o rdgz.o rdaddr.o rdrand.o rdthread.o rdqueue.o rdlog.o snappy.o -o librdkafka.so.1 -lpthread -lz
Creating static library librdkafka.a
ar rcs librdkafka.a rdkafka.o rdkafka_broker.o rdkafka_msg.o rdkafka_topic.o rdkafka_defaultconf.o rdkafka_timer.o rdkafka_offset.o rdcrc32.o rdgz.o rdaddr.o rdrand.o rdthread.o rdqueue.o rdlog.o snappy.o
Checking librdkafka integrity
librdkafka.so.1 OK
librdkafka.a OK
Symbol visibility FAILED
Checking librdkafka++ integrity
librdkafka++.so.1 OK
librdkafka++.a OK
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C examples
clang -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -I../src rdkafka_example.c -o rdkafka_example -g
../src/librdkafka.a -lpthread -lz
Assertion failed: (!"Unknown operand"), function LinkLocation, file /SourceCache/dwarf_utilities/dwarf_utilities-114/source/DWARFdSYM.cpp, line 1704.
clang: error: unable to execute command: Abort trap: 6
clang: error: dsymutil command failed due to signal (use -v to see invocation)
make[1]: *** [rdkafka_example] Error 254
make: *** [examples] Error 2

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

It seems to be hitting some old, supposedly fixed, GCC bug (but this is using clang..):

https://gcc.gnu.org/bugzilla/show_bug.cgi?format=multiple&id=41405
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41473

I currently dont have a 10.9 box, so can you try the following two:

CC=clang CXX=clang++ ./configure --reconfigure && make clean all

and:

CC=gcc CXX=g++ ./configure --reconfigure && make clean all

Thanks,
Magnus

from librdkafka.

leroix avatar leroix commented on September 13, 2024

Interesting, I'll look into that gcc bug a bit more, but, yea, this is definitely clang

CC=clang CXX=clang++ ./configure --reconfigure && make clean all
https://gist.github.com/leroix/b9830ea2f9b9eec69a55

CC=gcc CXX=g++ ./configure --reconfigure && make clean all
looks like this may have actually compiled, but the symbol visibility check failed
https://gist.github.com/leroix/7d6187433f777a189936

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

Could you try the following:

CC=clang CXX=clang++ ./configure --reconfigure && make clean all

wait for it to build and fail and then do:

cd src
ranlib librdkafka.a
cd ..
make

from librdkafka.

leroix avatar leroix commented on September 13, 2024

Ok, here's the sequence:

[librdkafka (master *)]$CC=clang CXX=clang++ ./configure --reconfigure && make clean all
Reconfiguring: /Users/leroix/librdkafka/configure
using cache file config.cache
checking for OS or distribution... ok (osx)
checking for C compiler from CC env... ok (cached)
checking for C++ compiler from CXX env... ok (cached)
checking executable ld... ok (cached)
checking executable nm... ok (cached)
checking executable objdump... failed (disable)
checking executable strip... ok (cached)
checking for pkgconfig (by command)... ok (cached)
checking for install (by command)... failed
checking for PIC (by compile)... ok (cached)
checking for GNU-compatible linker options... failed
checking for OSX linker options... ok (cached)
checking for GNU linker-script ld flag... failed
checking for Solaris linker-script ld flag... failed (ignore)
checking for __atomic_32 (by compile)... ok (cached)
checking for __atomic_64 (by compile)... ok (cached)
checking for socket (by compile)... ok (cached)
parsing version '0x00080300'... ok (0.8.3)
checking for libpthread (by pkg-config)... failed
checking for libpthread (by compile)... ok
checking for zlib (by pkg-config)... failed
checking for zlib (by compile)... ok
checking for librt (by pkg-config)... failed
checking for librt (by compile)... failed
checking executable otool... ok (cached)
Generated rdkafka.pc
Generated Makefile.config
Generated config.h

Configuration summary:
  prefix                   /usr/local
  ARCH                     x86_64
  CPU                      generic
  MKL_DISTRO               osx
  CC                       clang
  CXX                      clang++
  LD                       clang
  NM                       nm
  STRIP                    strip
  CPPFLAGS                 -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith
  PKG_CONFIG               pkg-config
  INSTALL                  install
  LIB_LDFLAGS              -shared -dynamiclib -Wl,-install_name,$(DESTDIR)$(libdir)/$(LIBNAME).so.$(LIBVER)
  LDFLAGS                  -g
  RDKAFKA_VERSION_STR      0.8.3
  LIBS                     -lpthread -lz
  CXXFLAGS                 -Wno-non-virtual-dtor
  SYMDUMPER                otool -TV
  exec_prefix              /usr/local
  bindir                   /usr/local/bin
  sbindir                  /usr/local/sbin
  libexecdir               /usr/local/libexec
  datadir                  /usr/local/share
  sysconfdir               /usr/local/etc
  sharedstatedir           /usr/local/com
  localstatedir            /usr/local/var
  libdir                   /usr/local/lib
  includedir               /usr/local/include
  infodir                  /usr/local/info
  mandir                   /usr/local/man
Generated config.cache

Now type 'make' to build
rm -f *.test test.o
rm -f rdkafka_example rdkafka_performance rdkafka_example_cpp
rm -f rdkafka.o rdkafka_broker.o rdkafka_msg.o rdkafka_topic.o rdkafka_defaultconf.o rdkafka_timer.o rdkafka_offset.o rdcrc32.o rdgz.o rdaddr.o rdrand.o rdthread.o rdqueue.o rdlog.o snappy.o rdkafka.d rdkafka_broker.d rdkafka_msg.d rdkafka_topic.d rdkafka_defaultconf.d rdkafka_timer.d rdkafka_offset.d rdcrc32.d rdgz.d rdaddr.d rdrand.d rdthread.d rdqueue.d rdlog.d snappy.d
rm -f librdkafka*.a librdkafka*.so librdkafka*.so.1 \
        librdkafka.lds
rm -f RdKafka.o ConfImpl.o HandleImpl.o ConsumerImpl.o ProducerImpl.o TopicImpl.o MessageImpl.o RdKafka.d ConfImpl.d HandleImpl.d ConsumerImpl.d ProducerImpl.d TopicImpl.d MessageImpl.d
rm -f librdkafka++*.a librdkafka++*.so librdkafka++*.so.1 \
        librdkafka++.lds
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdkafka.c -o rdkafka.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdkafka_broker.c -o rdkafka_broker.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdkafka_msg.c -o rdkafka_msg.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdkafka_topic.c -o rdkafka_topic.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdkafka_defaultconf.c -o rdkafka_defaultconf.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdkafka_timer.c -o rdkafka_timer.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdkafka_offset.c -o rdkafka_offset.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdcrc32.c -o rdcrc32.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdgz.c -o rdgz.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdaddr.c -o rdaddr.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdrand.c -o rdrand.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdthread.c -o rdthread.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdqueue.c -o rdqueue.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c rdlog.c -o rdlog.o
clang -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith  -c snappy.c -o snappy.o
Generating linker script librdkafka.lds from rdkafka.h
Creating shared library librdkafka.so.1
clang -g -shared -dynamiclib -Wl,-install_name,/usr/local/lib/librdkafka.so.1 rdkafka.o rdkafka_broker.o rdkafka_msg.o rdkafka_topic.o rdkafka_defaultconf.o rdkafka_timer.o rdkafka_offset.o rdcrc32.o rdgz.o rdaddr.o rdrand.o rdthread.o rdqueue.o rdlog.o snappy.o -o librdkafka.so.1 -lpthread -lz
Creating static library librdkafka.a
ar rcs librdkafka.a rdkafka.o rdkafka_broker.o rdkafka_msg.o rdkafka_topic.o rdkafka_defaultconf.o rdkafka_timer.o rdkafka_offset.o rdcrc32.o rdgz.o rdaddr.o rdrand.o rdthread.o rdqueue.o rdlog.o snappy.o
Checking librdkafka integrity
librdkafka.so.1                OK
librdkafka.a                   OK
Symbol visibility              FAILED
clang++ -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -Wno-non-virtual-dtor -c RdKafka.cpp -o RdKafka.o
clang++ -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -Wno-non-virtual-dtor -c ConfImpl.cpp -o ConfImpl.o
clang++ -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -Wno-non-virtual-dtor -c HandleImpl.cpp -o HandleImpl.o
clang++ -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -Wno-non-virtual-dtor -c ConsumerImpl.cpp -o ConsumerImpl.o
clang++ -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -Wno-non-virtual-dtor -c ProducerImpl.cpp -o ProducerImpl.o
clang++ -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -Wno-non-virtual-dtor -c TopicImpl.cpp -o TopicImpl.o
clang++ -MD -MP -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -Wno-non-virtual-dtor -c MessageImpl.cpp -o MessageImpl.o
Generating linker script librdkafka++.lds from rdkafkacpp.h
Creating shared library librdkafka++.so.1
clang -g -shared -dynamiclib -Wl,-install_name,/usr/local/lib/librdkafka++.so.1 RdKafka.o ConfImpl.o HandleImpl.o ConsumerImpl.o ProducerImpl.o TopicImpl.o MessageImpl.o -o librdkafka++.so.1 -L../src -lrdkafka -lpthread -lz -lstdc++
Creating static library librdkafka++.a
ar rcs librdkafka++.a RdKafka.o ConfImpl.o HandleImpl.o ConsumerImpl.o ProducerImpl.o TopicImpl.o MessageImpl.o
Checking librdkafka++ integrity
librdkafka++.so.1              OK
librdkafka++.a                 OK
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C examples
clang -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -I../src rdkafka_example.c -o rdkafka_example -g \
        ../src/librdkafka.a -lpthread -lz
Assertion failed: (!"Unknown operand"), function LinkLocation, file /SourceCache/dwarf_utilities/dwarf_utilities-114/source/DWARFdSYM.cpp, line 1704.
clang: error: unable to execute command: Abort trap: 6
clang: error: dsymutil command failed due to signal (use -v to see invocation)
make[1]: *** [rdkafka_example] Error 254
make: *** [examples] Error 2
[librdkafka (master *)]$cd src
[src (master *)]$ranlib librdkafka.a
[src (master *)]$cd ..
[librdkafka (master *)]$make
Checking librdkafka integrity
librdkafka.so.1                OK
librdkafka.a                   OK
Symbol visibility              FAILED
Checking librdkafka++ integrity
librdkafka++.so.1              OK
librdkafka++.a                 OK
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C examples
clang -g -O2 -fPIC -Wall -Werror -Wfloat-equal -Wpointer-arith -I../src rdkafka_example.c -o rdkafka_example -g \
        ../src/librdkafka.a -lpthread -lz
Assertion failed: (!"Unknown operand"), function LinkLocation, file /SourceCache/dwarf_utilities/dwarf_utilities-114/source/DWARFdSYM.cpp, line 1704.
clang: error: unable to execute command: Abort trap: 6
clang: error: dsymutil command failed due to signal (use -v to see invocation)
make[1]: *** [rdkafka_example] Error 254
make: *** [examples] Error 2

from librdkafka.

leroix avatar leroix commented on September 13, 2024

Not sure if this is all that helpful, but I found that if I remove the instruction to compile the examples in examples/Makefile, make finishes without error. I then ran sudo make install and tested it out with kafkacat. It seems to be working.

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

Yeah, it's the static linking of librdkafka.a that fails for some reason.
I dont know if it's a problem with the static library or the linking.

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

This is a problem with debugging symbols.
Removing the '-g' from the rdkafka_example build fixes it.
I need to understand why this is the case though.

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

If someone is on 10.7 or 10.8, please have a go to see that this doesnt break compiles.
Works on 10.9 with clang now.

from librdkafka.

Kentzo avatar Kentzo commented on September 13, 2024

I came across this issue when googling for the following error: Assertion failed: (!"Unknown operand"), function LinkLocation, file /SourceCache/dwarf_utilities/dwarf_utilities-114/source/DWARFdSYM.cpp, line 1704.

Here is the solution: https://gist.github.com/Kentzo/e038118346f1e1a582ac

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

Thanks @Kentzo

from librdkafka.

kparadkar avatar kparadkar commented on September 13, 2024

@edenhill I am running on El Capitan Mac OSX 10.11.16 but I am unfortunately stuck on 0.9.1.
I downloaded 0.9.1 code from your when I try to compile (using make) I get 'openssl/ssl.h' not found error. (I noticed that you have WITH_SSL flag set to 'y' in 0.9.1 and it is 'n' in master in Makefile.config)

Since I was getting those errors (I didn't want to make changes to code I got from your repo) I installed openssl on MAC (irrespective of BUG Dont use OpenSSL on OSX #408). And now I get following errors:
Undefined symbols for architecture x86_64:
"_OPENSSL_init_crypto", referenced from:
_rd_kafka_transport_ssl_init in rdkafka_transport.o
"_OPENSSL_init_ssl", referenced from:
_rd_kafka_transport_ssl_init in rdkafka_transport.o
"_TLS_client_method", referenced from:
_rd_kafka_transport_ssl_ctx_init in rdkafka_transport.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

So i have couple of questions here:

  1. I dont need openssl for my test code, then shouldn't library compile irrespective of presence of openssl/ssl.h?
  2. Do you have any idea about why I still get errors even after installing openssl?
  3. Why does master say WITH_SSL = n ? I noticed that the bug #408 was reported on Nov3rd 2015 and release date of 0.9.1 was May23rd 2016, so is there any other reason for keeping openssl in 0.9.1 but remove from 0.9.2 ?

Please help as I have to get this library to compile on 0.9.1 !

Thank you.

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

You need to pull in this commit to make ./configure correctly detect OpenSSL on OSX, or actually not to detect it, but doing that properly.

2add32d

from librdkafka.

kparadkar avatar kparadkar commented on September 13, 2024

After pulling this commit, now make complains about SSL_CTX
./rdkafka_conf.h:90:3: error: unknown type name 'SSL_CTX'
SSL_CTX *ctx;

If I understand correctly from the code this is all conditional for WITH_SSL = y.
What am I missing here exactly? since include 'openssl/ssl.h' succeeded ?

from librdkafka.

edenhill avatar edenhill commented on September 13, 2024

That looks very weird.
If openssl/ssl.h is found it should be able to commit.
Maybe you are on a incompatible version of OpenSSL?
librdkafka supports 1.0.x, not 1.1.x

from librdkafka.

barracuda156 avatar barracuda156 commented on September 13, 2024

I came across this issue when googling for the following error: Assertion failed: (!"Unknown operand"), function LinkLocation, file /SourceCache/dwarf_utilities/dwarf_utilities-114/source/DWARFdSYM.cpp, line 1704.

Here is the solution: https://gist.github.com/Kentzo/e038118346f1e1a582ac

@Kentzo Do you know what commit specifically fixed that in dsymutil?

The bug is also showing up on 10.6:
https://trac.macports.org/ticket/65291
https://trac.macports.org/ticket/69188

from librdkafka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.