Skip to content
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

Compiling failed. #14

Closed
samson-wang opened this issue Feb 24, 2016 · 5 comments
Closed

Compiling failed. #14

samson-wang opened this issue Feb 24, 2016 · 5 comments

Comments

@samson-wang
Copy link

Got info as following:
Linking CXX executable ../bin/logkafka
librdkafka/lib/librdkafka.a(rdkafka_broker.o): In function rd_kafka_broker_produce_toppar': /data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2101: undefined reference tocrc32'
/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2106: undefined reference to crc32' /data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2120: undefined reference tocrc32'
/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2134: undefined reference to crc32' /data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2145: undefined reference tocrc32'
librdkafka/lib/librdkafka.a(rdkafka_broker.o):/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2340: more undefined references to crc32' follow librdkafka/lib/librdkafka.a(rdkafka_broker.o): In functionrd_kafka_broker_produce_toppar':
/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2193: undefined reference to deflateInit2_' /data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2213: undefined reference to deflateBound'
/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2235: undefined reference todeflate' /data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2259: undefined reference to deflate'
/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2271: undefined reference todeflateEnd' /data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2249: undefined reference to deflateEnd'
/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdkafka_broker.c:2279: undefined reference todeflateEnd' librdkafka/lib/librdkafka.a(rdgz.o): In function rd_gz_decompress':
/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdgz.c:59: undefined reference toinflateInit2_' /data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdgz.c:65: undefined reference to inflateGetHeader'
/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdgz.c:84: undefined reference toinflate' /data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdgz.c:115: undefined reference to inflateEnd'
/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdgz.c:90: undefined reference toinflateEnd' /data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdgz.c:115: undefined reference to inflateEnd'
/data/home/samson/repo/logkafka.git/_build/src/librdkafka/src/project_librdkafka/src/rdgz.c:106: undefined reference to`inflateEnd'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
make[2]: *** [bin/logkafka] Error 1
make[1]: *** [src/CMakeFiles/logkafka.dir/all] Error 2
make: *** [all] Error 2

@zheolong
Copy link
Collaborator

It looks like missing the zlib library. Can you show me the CMake command.

@samson-wang
Copy link
Author

cmake -H. -B_build -DCMAKE_INSTALL_PREFIX=_install -DINSTALL_LIBRDKAFKA=ON -DINSTALL_LIBZOOKEEPER_MT=ON -DINSTALL_LIBUV=ON -DINSTALL_LIBPCRE2=ON

@zheolong
Copy link
Collaborator

Try this method

Install librdkafka(>0.8.6), libzookeeper_mt, libuv(>v1.6.0), libpcre2(>10.20) manually, then

cmake -H. -B_build -DCMAKE_INSTALL_PREFIX=_install
cd _build
make -j4
make install

@zheolong
Copy link
Collaborator

zheolong commented Mar 2, 2016

@samson-wang Is it ok now?

@samson-wang
Copy link
Author

Perfect!
Thanks!
Sorry for late response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants