confluentinc / librdkafka

The Apache Kafka C/C++ library
Other
200 stars 3.14k forks source link

libdrkafka compilation using xlc compiler on AIX #1642

Closed nishantshekhar closed 6 years ago

nishantshekhar commented 6 years ago

Read the FAQ first: https://github.com/edenhill/librdkafka/wiki/FAQ

Description

can librdkafka be compiled using xlc compiler on AIX machine. I am trying to compile but object files are not getting generated. while a sample hello world program gets compiled without any issues.

How to reproduce

  1. run configure file using cache file config.cache checking for OS or distribution... ok (AIX) checking for C compiler from CC env... failed checking for gcc (by command)... 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... ok (cached) checking executable strip... ok (cached) checking for pkgconfig (by command)... ok (cached) checking for install (by command)... ok (cached) checking for PIC (by compile)... ok (cached) checking for GNU-compatible linker options... ok (cached) checking for GNU linker-script ld flag... ok (cached) checking for atomic_32 (by compile)... failed checking for atomic_32_lib (by compile)... failed checking for sync_32 (by compile)... ok (cached) checking for atomic_64 (by compile)... failed checking for atomic_64_lib (by compile)... failed checking for sync_64 (by compile)... ok (cached) checking for socket (by compile)... ok (cached) parsing version '0x000b01ff'... ok (0.11.1) checking for libpthread (by pkg-config)... failed checking for libpthread (by compile)... ok (cached) checking for zlib (by pkg-config)... failed checking for zlib (by compile)... ok (cached) checking for libcrypto (by pkg-config)... failed checking for libcrypto (by compile)... failed (disable) checking for liblz4 (by pkg-config)... failed checking for liblz4 (by compile)... failed (disable) checking for libssl (by pkg-config)... failed checking for libssl (by compile)... failed (disable) checking for libsasl2 (by pkg-config)... failed checking for libsasl2 (by compile)... failed (disable) checking for libsasl (by pkg-config)... failed checking for libsasl (by compile)... failed (disable) checking for crc32chw (by compile)... ok (cached) checking for regex (by compile)... ok (cached) checking for librt (by pkg-config)... failed checking for librt (by compile)... ok (cached) checking for strndup (by compile)... ok (cached) checking for strerror_r (by compile)... ok (cached) checking for libdl (by pkg-config)... failed checking for libdl (by compile)... ok (cached) checking for nm (by env NM)... ok (cached) checking for python (by command)... ok (cached) Generated Makefile.config Generated config.h

Configuration summary: prefix /usr/local ARCH 00F744A24C00 CPU generic GEN_PKG_CONFIG y ENABLE_DEVEL n ENABLE_VALGRIND n ENABLE_REFCNT_DEBUG n ENABLE_SHAREDPTR_DEBUG n ENABLE_LZ4_EXT y ENABLE_SSL y ENABLE_SASL y MKL_APP_NAME librdkafka MKL_APP_DESC_ONELINE The Apache Kafka C/C++ library MKL_DISTRO AIX SOLIB_EXT .so CC gcc CXX g++ LD ld NM nm OBJDUMP objdump STRIP strip CPPFLAGS -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align PKG_CONFIG pkg-config INSTALL install LIB_LDFLAGS -shared -Wl,-soname,$(LIBFILENAME) LDFLAG_LINKERSCRIPT -Wl,--version-script= RDKAFKA_VERSION_STR 0.11.1 MKL_APP_VERSION 0.11.1 LIBS -lpthread -lz -lrt -ldl CXXFLAGS -Wno-non-virtual-dtor SYMDUMPER $(NM) -g 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

  1. update in Makefile.config : CC= /usr/vacpp/bin/xlc

  2. run make make[1]: Entering directory /users/e461333/librdkafka-0.11.1/src' /usr/vacpp/bin/xlc -MD -MP -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -c rdkafka.c -o rdkafka.o /usr/vacpp/bin/xlc: 1501-289 (W) Option -Wall was incorrectly specified. The option will be ignored. /usr/vacpp/bin/xlc: 1501-289 (W) Option -Wsign-compare was incorrectly specified. The option will be ignored. /usr/vacpp/bin/xlc: 1501-289 (W) Option -Wfloat-equal was incorrectly specified. The option will be ignored. /usr/vacpp/bin/xlc: 1501-289 (W) Option -Wpointer-arith was incorrectly specified. The option will be ignored. /usr/vacpp/bin/xlc: 1501-289 (W) Option -Wcast-align was incorrectly specified. The option will be ignored. /usr/vacpp/bin/xlc: 1501-208 (S) command option D is missing a subargument make[1]: *** [rdkafka.o] Error 40 make[1]: Leaving directory/users/e461333/librdkafka-0.11.1/src' make: *** [libs] Error 2

  3. try directly compile rdkafka.c /usr/vacpp/bin/xlc -c rdkafka.c -o rdkafka.o -I/usr/vacpp/include -I/usr/local/include -O3 -qstrict -qmakedep=gcc -MP -g -qdbxextra -qpic=large 3 files are getting dumped but object file is not created 7013 Jan 18 15:56 rdkafka.d 4461 Jan 18 17:22 rdkafka.u 487706 Jan 18 17:22 rdkafka.i

IMPORTANT: Always try to reproduce the issue on the latest released version (see https://github.com/edenhill/librdkafka/releases), if it can't be reproduced on the latest version the issue has been fixed.

Checklist

IMPORTANT: We will close issues where the checklist has not been completed.

Please provide the following information:

edenhill commented 6 years ago

AIX is not a supported platform, community contributions are welcome