-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile on Mac #49
Comments
In the Makefile, find this section:
And make it unconditional by removig the ifeq.. and endif lines Let me know if this fixes your problem. |
I apologize for the duplicate: #33 |
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 That's with the suggestion you made above |
if this helps: :$ gcc -v |
Thank you. |
understood. I tried to track it down, but seems like the declarations are ahead of usage for these methods everywhere I can find them. |
@dvanliere's pull request (issue #51) which was just merged into master fixes this. |
Compiles without error now, but make install fails with Illegal option -t 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]
install: illegal option -- t usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
install: illegal option -- t usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
On Sat, Jan 4, 2014 at 3:11 PM, Magnus Edenhill notifications@github.comwrote:
|
@dvanliere, still got your superman costume on? |
Can you give it another go with an updated master? I changed the install options to be more classic. |
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 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 cc -g -Wall -Werror -Wfloat-equal -Wpointer-arith -O2 -I../ ../librdkafka.a cc -g -Wall -Werror -Wfloat-equal -Wpointer-arith -O2 -I../ ../librdkafka.a for i in 0001-multiobj.test 0002-unkpart.test 0003-msgmaxsize.test ; do \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
|
Enjoying my holidays but will look at this next week. |
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. |
@gpatmore can you confirm that the latest version on master works on OSX 10.9? |
Sorry it's taken me so long to get back to you on this, I've been swamped 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 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 cc -MD -MP -O2 -Wall -Werror -Wfloat-equal -Wpointer-arith -I. -g -DSG rdkafka_broker.c:395:44: error: use of undeclared identifier 'MSG_NOSIGNAL'
1 error generated. make: *** [rdkafka_broker.o] Error 1 CCCNYC01GAPs-MacBook-Pro:librdkafka gpatmore$ git branch
CCCNYC01GAPs-MacBook-Pro:librdkafka gpatmore$ git rev-parse --verify HEAD CCCNYC01GAPs-MacBook-Pro:librdkafka gpatmore$ On Sun, Jan 12, 2014 at 5:49 AM, Diederik van Liere <
|
Yes, it's now failing for me as well :) @edenhill introduced a regression in one of his most recent commits ;) |
#62 fixes the MSG_NOSIGNAL issue. |
I'm sorry about this mess but it is hard to keep all platforms happy without automatic builds for all platforms. It should compile on osx now... |
no sweat man. Your getting through it. I'll try to be more available as a testing resource. Sent from my iPhone
|
Reopen if still an issue |
fix: #63 On Thu, Jan 16, 2014 at 10:33 PM, Magnus Edenhill
|
I think maybe building on osx 10.9 is broken again. Tried on 2 different machines. [librdkafka (master)]$./configure Configuration summary: Now type 'make' to build |
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 I currently dont have a 10.9 box, so can you try the following two:
and:
Thanks, |
Interesting, I'll look into that gcc bug a bit more, but, yea, this is definitely clang
|
Could you try the following:
wait for it to build and fail and then do:
|
Ok, here's the sequence:
|
Not sure if this is all that helpful, but I found that if I remove the instruction to compile the examples in |
Yeah, it's the static linking of librdkafka.a that fails for some reason. |
This is a problem with debugging symbols. |
If someone is on 10.7 or 10.8, please have a go to see that this doesnt break compiles. |
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 |
Thanks @Kentzo |
@edenhill I am running on El Capitan Mac OSX 10.11.16 but I am unfortunately stuck on 0.9.1. 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: So i have couple of questions here:
Please help as I have to get this library to compile on 0.9.1 ! Thank you. |
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. |
After pulling this commit, now make complains about SSL_CTX If I understand correctly from the code this is all conditional for WITH_SSL = y. |
That looks very weird. |
Without --disable-ssl librdkafka ./configure detects that OpenSSL is installed but when it tries to link it fails because the default version is incompatible (1.0.2 vs required 1.1.x). confluentinc/librdkafka#49 (comment)
@Kentzo Do you know what commit specifically fixed that in dsymutil? The bug is also showing up on 10.6: |
add missing consumer metrics described in the KIP: * consumer.coordinator.rebalance.latency.avg * consumer.coordinator.rebalance.latency.max * consumer.coordinator.rebalance.latency.total * consumer.fetch.manager.fetch.latency.avg * consumer.fetch.manager.fetch.latency.max * consumer.poll.idle.ratio.avg * consumer.coordinator.commit.latency.avg * consumer.coordinator.commit.latency.max additionally: * add unit tests for all the metrics * add integrations tests with the producer or consumer while they're active * configurable group initial rebalance delay ms to make integration tests reusable with both producer and consumer --------- Co-authored-by: Anchit Jain <anjain@confluent.io> Co-authored-by: mahajanadhitya <amahajan@confluent.io>
Can you give any insight on overcoming errors below when trying to make on Mac?
cc -MD -MP -O2 -Wall -Werror -Wfloat-equal -Wpointer-arith -fPIC -I. -g -DSG -c rdkafka.c
rdkafka.c:1065:29: error: use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
struct consume_ctx ctx = { consume_cb: consume_cb, opaque: opaque };
^~~~~~~~~~~
.consume_cb =
rdkafka.c:1065:53: error: use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
struct consume_ctx ctx = { consume_cb: consume_cb, opaque: opaque };
^~~~~~~
.opaque =
2 errors generated.
make: *** [rdkafka.o] Error 1
The text was updated successfully, but these errors were encountered: