I am using clang 7.0.1-6 with -fsatize=memory and -fsanitize-blacklist to ignore unitialized memory in libc.
Unfortunately it seems that msan does not ignore cap_init, or it's descendants.
$ cat /buildslave/core-ci/build/core/blacklist
fun:cap_init
fun:drop_capabilities
fun:__interceptor_capget
...
libtool: compile: clang -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test -I../../src/lib-charset -I../../src/lib-mail -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -ggdb3 -O0 -fsanitize=undefined -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-memory-use-after-dtor -Qunused-arguments -fsanitize-blacklist=/buildslave/core-ci/build/core/blacklist -MT imap-base-subject.lo -MD -MP -MF .deps/imap-base-subject.Tpo -c imap-base-subject.c -o imap-base-subject.o >/dev/null 2>&1
...
libtool: link: clang -std=gnu99 -g -O2 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -ggdb3 -O0 -fsanitize=undefined -fsanitize=memory -Qunused-arguments -fsanitize-blacklist=/buildslave/core-ci/build/core/blacklist -Wl,--as-needed -o .libs/dovecot capabilities-posix.o dup2-array.o main.o master-client.o master-settings.o service-anvil.o service-listen.o service-log.o service-monitor.o service-process.o service-process-notify.o service.o -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--export-dynamic -lcap ../../src/lib-dovecot/.libs/libdovecot.so -ldl -Wl,-rpath -Wl,/dovecot/lib/dovecot
$ sudo env CONFIG_FILE=/tmp/testrun-190217_174730/auth-test-1/etc/dovecot/dovecot.conf /dovecot/sbin/dovecot -F
Uninitialized bytes in __interceptor_capget at offset 0 inside [0x703000000214, 8)
==16392==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7f0e1efb8b22 in cap_init (/lib/x86_64-linux-gnu/libcap.so.2+0x1b22)
#1 0x55dba0933878 in drop_capabilities /buildslave/core-ci/build/core/src/master/capabilities-posix.c:25:9
#2 0x55dba094007c in main_init /buildslave/core-ci/build/core/src/master/main.c:521:2
#3 0x55dba093c420 in main /buildslave/core-ci/build/core/src/master/main.c:908:3
#4 0x7f0e1c9f82e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
#5 0x55dba08bc9b9 in _start (/dovecot/sbin/dovecot+0x4c9b9)
Related
I need an advanced auth for Mosquitto. I decided to use mosquitto-auth-plug
However, if I follow the build instructions I have the error:
$ make
Selected backends: JWT
Using mosquitto source dir: /mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15
OpenSSL install dir:
If you changed the backend selection, you might need to 'make clean' first
CFLAGS: -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include
LDFLAGS: -L/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/
LDADD: -lcurl -L/lib -lcrypto -lmosquitto
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -c -o auth-plug.o auth-plug.c
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -c -o base64.o base64.c
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -c -o pbkdf2-check.o pbkdf2-check.c
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -c -o log.o log.c
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -c -o envs.o envs.c
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -c -o hash.o hash.c
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -c -o be-psk.o be-psk.c
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -c -o backends.o backends.c
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -c -o cache.o cache.c
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -c -o be-jwt.o be-jwt.c
cc -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/src/ -I/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -Wall -Werror -DBE_JWT -I/src -DDEBUG=1 -I/include -L/mnt/c/Users/avkar/cleversky/mosquitto/mosquitto-1.4.15/lib/ -fPIC -shared -o auth-plug.so auth-plug.o base64.o pbkdf2-check.o log.o envs.o hash.o be-psk.o backends.o cache.o be-jwt.o -lcurl -L/lib -lcrypto -lmosquitto
/usr/bin/ld: cannot find -lmosquitto
collect2: error: ld returned 1 exit status
Makefile:160: recipe for target 'auth-plug.so' failed
make: *** [auth-plug.so] Error 1
Somewhat -lmosquitto not found.
I have assumed that is a library, but all librares present:
$ ls ../mosquitto-1.4.15/lib/
CMakeLists.txt logging_mosq.c memory_mosq.h mosquitto.h net_mosq.h read_handle_shared.c socks_mosq.c time_mosq.c util_mosq.c
cpp logging_mosq.h messages_mosq.c mosquitto_internal.h read_handle.c send_client_mosq.c socks_mosq.h time_mosq.h util_mosq.h
dummypthread.h Makefile messages_mosq.h mqtt3_protocol.h read_handle_client.c send_mosq.c srv_mosq.c tls_mosq.c will_mosq.c
linker.version memory_mosq.c mosquitto.c net_mosq.c read_handle.h send_mosq.h thread_mosq.c tls_mosq.h will_mosq.h
What is the -lmosquitto and how can I fix my build?
As hashed out in the comments,
You need to build and install mosquitto (or install the prebuilt version and it's dev package) before trying to build the plugin.
The error is because ld can not find libmosquitto to link against
I'm attempting to do rake db:schema:load but am encountering an error and it seems the problem is with the enable_extension("pg_repack") step:
rake db:schema:load --trace
** Invoke db:schema:load (first_time)
** Invoke environment (first_time)
** Execute environment
**************************************************
⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment. Your jobs will not go to Redis.
**************************************************
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:schema:load
-- enable_extension("plpgsql")
-> 0.2005s
-- enable_extension("pg_repack")
rake aborted!
ActiveRecord::StatementInvalid: PG::UndefinedFile: ERROR: could not open extension control file "/Applications/Postgres.app/Contents/Versions/10/share/postgresql/extension/pg_repack.control": No such file or directory
: CREATE EXTENSION IF NOT EXISTS "pg_repack"
...
Tasks: TOP => db:schema:load
I'm using postgres 9.6.6:
which postgres
/usr/local/Cellar/postgresql#9.6/9.6.6/bin/postgres
Any idea how I can get pg_repack to work?
EDIT:
When running pgxn install pg_repack I get this:
INFO: best version: pg_repack 1.4.3
INFO: saving /var/folders/7d/xvqc5yxs10n6206lytrbs9wm0000gn/T/tmp02_KE6/pg_repack-1.4.3.zip
INFO: unpacking: /var/folders/7d/xvqc5yxs10n6206lytrbs9wm0000gn/T/tmp02_KE6/pg_repack-1.4.3.zip
INFO: building extension
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I/usr/local/Cellar/postgresql#9.6/9.6.6/include -DREPACK_VERSION=1.4.3 -I. -I./ -I/usr/local/Cellar/postgresql#9.6/9.6.6/include/server -I/usr/local/Cellar/postgresql#9.6/9.6.6/include/internal -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2 -c -o pg_repack.o pg_repack.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I/usr/local/Cellar/postgresql#9.6/9.6.6/include -DREPACK_VERSION=1.4.3 -I. -I./ -I/usr/local/Cellar/postgresql#9.6/9.6.6/include/server -I/usr/local/Cellar/postgresql#9.6/9.6.6/include/internal -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2 -c -o pgut/pgut.o pgut/pgut.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I/usr/local/Cellar/postgresql#9.6/9.6.6/include -DREPACK_VERSION=1.4.3 -I. -I./ -I/usr/local/Cellar/postgresql#9.6/9.6.6/include/server -I/usr/local/Cellar/postgresql#9.6/9.6.6/include/internal -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2 -c -o pgut/pgut-fe.o pgut/pgut-fe.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 pg_repack.o pgut/pgut.o pgut/pgut-fe.o -L/usr/local/Cellar/postgresql#9.6/9.6.6/lib -lpq -L/usr/local/Cellar/postgresql#9.6/9.6.6/lib -L/usr/local/Cellar/postgresql#9.6/9.6.6/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -Wl,-dead_strip_dylibs -lpgcommon -lpgport -lssl -lcrypto -lz -lreadline -lm -o pg_repack
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -DREPACK_VERSION=1.4.3 -I. -I./ -I/usr/local/Cellar/postgresql#9.6/9.6.6/include/server -I/usr/local/Cellar/postgresql#9.6/9.6.6/include/internal -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2 -c -o repack.o repack.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -DREPACK_VERSION=1.4.3 -I. -I./ -I/usr/local/Cellar/postgresql#9.6/9.6.6/include/server -I/usr/local/Cellar/postgresql#9.6/9.6.6/include/internal -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2 -c -o pgut/pgut-spi.o pgut/pgut-spi.c
awk '/^[^#]/ {printf "_%s\n",$1}' exports.txt >exports.list
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -bundle -multiply_defined suppress -Wl,-undefined,dynamic_lookup -o pg_repack.so repack.o pgut/pgut-spi.o -L/usr/local/Cellar/postgresql#9.6/9.6.6/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -Wl,-dead_strip_dylibs -bundle_loader /usr/local/Cellar/postgresql#9.6/9.6.6/bin/postgres
sed 's,REPACK_VERSION,1.4.3,g' pg_repack.sql.in > pg_repack--1.4.3.sql;
sed 's,REPACK_VERSION,1.4.3,g' pg_repack.control.in > pg_repack.control
make[1]: Nothing to be done for `all'.
INFO: installing extension
/bin/sh /usr/local/Cellar/postgresql#9.6/9.6.6/lib/pgxs/src/makefiles/../../config/install-sh -c -d '/usr/local/Cellar/postgresql#9.6/9.6.6/bin'
/usr/bin/install -c pg_repack '/usr/local/Cellar/postgresql#9.6/9.6.6/bin'
/bin/sh /usr/local/Cellar/postgresql#9.6/9.6.6/lib/pgxs/src/makefiles/../../config/install-sh -c -d '/usr/local/Cellar/postgresql#9.6/9.6.6/lib'
/bin/sh /usr/local/Cellar/postgresql#9.6/9.6.6/lib/pgxs/src/makefiles/../../config/install-sh -c -d '/usr/local/Cellar/postgresql#9.6/9.6.6/share/postgresql#9.6/extension'
/bin/sh /usr/local/Cellar/postgresql#9.6/9.6.6/lib/pgxs/src/makefiles/../../config/install-sh -c -d '/usr/local/Cellar/postgresql#9.6/9.6.6/share/postgresql#9.6/extension'
/usr/bin/install -c -m 755 pg_repack.so '/usr/local/Cellar/postgresql#9.6/9.6.6/lib/pg_repack.so'
/usr/bin/install -c -m 644 .//pg_repack.control '/usr/local/Cellar/postgresql#9.6/9.6.6/share/postgresql#9.6/extension/'
/usr/bin/install -c -m 644 pg_repack--1.4.3.sql pg_repack.control '/usr/local/Cellar/postgresql#9.6/9.6.6/share/postgresql#9.6/extension/'
make[1]: Nothing to be done for `install'.
But when I run psql -c "CREATE EXTENSION pg_repack" tr_dev I still get this message:
ERROR: could not open extension control file "/Applications/Postgres.app/Contents/Versions/9.6/share/postgresql/extension/pg_repack.control": No such file or directory
This error says that pg_repack doesn't exists. First check your directory to see if pg_repack is there if it is but the error still persists you can try
Remove pg_repack using DROP EXTENSION pg_repack or just dropping the repack schema.
1) download a new pg_repack extension from
pg repack download
2) $ pgxn install pg_repack
3) $ cd pg_repack
$ make
$ sudo make install
4) After installation, load the pg_repack extension in the database you want to process. pg_repack is packaged as an extension, so you can execute:
$ psql -c "CREATE EXTENSION pg_repack" -d your_database
I am trying to compile the C bindings for Zookeeper, but I am unable to do so. When I run make, I receive the following error:
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `\033' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `3' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `5' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: syntax error in VERSION script
collect2: error: ld returned 1 exit status
The entire output for ./configure and make are attached below.
Can anyone help me on how I can resolve this issue?
$ ./configure
checking for doxygen... no
checking for perl... /usr/bin/perl
checking for dot... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for cppunit-config... /usr/bin/cppunit-config
checking for Cppunit - version >= 1.10.2... 1.13.1
checking for generated/zookeeper.jute.c... yes
checking for generated/zookeeper.jute.h... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether ln -s works... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pthread_mutex_lock in -lpthread... yes
configure: building with SyncAPI support
checking for ANSI C header files... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking for nfds_t... yes
checking whether to enable ipv6... yes
checking for getcwd... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for getlogin... yes
checking for getpwuid_r... yes
checking for gettimeofday... yes
checking for getuid... yes
checking for memmove... yes
checking for memset... yes
checking for poll... yes
checking for socket... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strtol... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
$ make
make[1]: Entering directory `/home/ubuntu/Desktop/workspace/installs/zookeeper-3.4.6/src/c'
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c -o zookeeper.lo `test -f 'src/zookeeper.c' || echo './'`src/zookeeper.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -fPIC -DPIC -o .libs/zookeeper.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -o zookeeper.o >/dev/null 2>&1
mv -f .deps/zookeeper.Tpo .deps/zookeeper.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c -o recordio.lo `test -f 'src/recordio.c' || echo './'`src/recordio.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c src/recordio.c -fPIC -DPIC -o .libs/recordio.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c src/recordio.c -o recordio.o >/dev/null 2>&1
mv -f .deps/recordio.Tpo .deps/recordio.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c -o zookeeper.jute.lo `test -f 'generated/zookeeper.jute.c' || echo './'`generated/zookeeper.jute.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c generated/zookeeper.jute.c -fPIC -DPIC -o .libs/zookeeper.jute.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c generated/zookeeper.jute.c -o zookeeper.jute.o >/dev/null 2>&1
mv -f .deps/zookeeper.jute.Tpo .deps/zookeeper.jute.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_log.lo -MD -MP -MF .deps/zk_log.Tpo -c -o zk_log.lo `test -f 'src/zk_log.c' || echo './'`src/zk_log.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_log.lo -MD -MP -MF .deps/zk_log.Tpo -c src/zk_log.c -fPIC -DPIC -o .libs/zk_log.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_log.lo -MD -MP -MF .deps/zk_log.Tpo -c src/zk_log.c -o zk_log.o >/dev/null 2>&1
mv -f .deps/zk_log.Tpo .deps/zk_log.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_hashtable.lo -MD -MP -MF .deps/zk_hashtable.Tpo -c -o zk_hashtable.lo `test -f 'src/zk_hashtable.c' || echo './'`src/zk_hashtable.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_hashtable.lo -MD -MP -MF .deps/zk_hashtable.Tpo -c src/zk_hashtable.c -fPIC -DPIC -o .libs/zk_hashtable.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_hashtable.lo -MD -MP -MF .deps/zk_hashtable.Tpo -c src/zk_hashtable.c -o zk_hashtable.o >/dev/null 2>&1
mv -f .deps/zk_hashtable.Tpo .deps/zk_hashtable.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT st_adaptor.lo -MD -MP -MF .deps/st_adaptor.Tpo -c -o st_adaptor.lo `test -f 'src/st_adaptor.c' || echo './'`src/st_adaptor.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT st_adaptor.lo -MD -MP -MF .deps/st_adaptor.Tpo -c src/st_adaptor.c -fPIC -DPIC -o .libs/st_adaptor.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT st_adaptor.lo -MD -MP -MF .deps/st_adaptor.Tpo -c src/st_adaptor.c -o st_adaptor.o >/dev/null 2>&1
mv -f .deps/st_adaptor.Tpo .deps/st_adaptor.Plo
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -D_GNU_SOURCE -o libzkst.la zookeeper.lo recordio.lo zookeeper.jute.lo zk_log.lo zk_hashtable.lo st_adaptor.lo -lm
libtool: link: ar cru .libs/libzkst.a .libs/zookeeper.o .libs/recordio.o .libs/zookeeper.jute.o .libs/zk_log.o .libs/zk_hashtable.o .libs/st_adaptor.o
libtool: link: ranlib .libs/libzkst.a
libtool: link: ( cd ".libs" && rm -f "libzkst.la" && ln -s "../libzkst.la" "libzkst.la" )
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable_itr.lo -MD -MP -MF .deps/hashtable_itr.Tpo -c -o hashtable_itr.lo `test -f 'src/hashtable/hashtable_itr.c' || echo './'`src/hashtable/hashtable_itr.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable_itr.lo -MD -MP -MF .deps/hashtable_itr.Tpo -c src/hashtable/hashtable_itr.c -fPIC -DPIC -o .libs/hashtable_itr.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable_itr.lo -MD -MP -MF .deps/hashtable_itr.Tpo -c src/hashtable/hashtable_itr.c -o hashtable_itr.o >/dev/null 2>&1
mv -f .deps/hashtable_itr.Tpo .deps/hashtable_itr.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.lo `test -f 'src/hashtable/hashtable.c' || echo './'`src/hashtable/hashtable.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c src/hashtable/hashtable.c -fPIC -DPIC -o .libs/hashtable.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c src/hashtable/hashtable.c -o hashtable.o >/dev/null 2>&1
mv -f .deps/hashtable.Tpo .deps/hashtable.Plo
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -D_GNU_SOURCE -o libhashtable.la hashtable_itr.lo hashtable.lo
libtool: link: ar cru .libs/libhashtable.a .libs/hashtable_itr.o .libs/hashtable.o
libtool: link: ranlib .libs/libhashtable.a
libtool: link: ( cd ".libs" && rm -f "libhashtable.la" && ln -s "../libhashtable.la" "libhashtable.la" )
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -D_GNU_SOURCE -no-undefined -version-info 2 -export-symbols-regex '(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|zerror|is_unrecoverable)' -o libzookeeper_st.la -rpath /home/ubuntu/Desktop/workspace/installs/build/zookeeper-cbinding/lib libzkst.la libhashtable.la
libtool: link: /usr/bin/nm -B ./.libs/libzkst.a ./.libs/libhashtable.a | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /bin/sed 's/.* //' | sort | uniq > .libs/libzookeeper_st.exp
libtool: link: /bin/grep -E -e "(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|zerror|is_unrecoverable)" ".libs/libzookeeper_st.exp" > ".libs/libzookeeper_st.expT"
libtool: link: mv -f ".libs/libzookeeper_st.expT" ".libs/libzookeeper_st.exp"
libtool: link: echo "{ global:" > .libs/libzookeeper_st.ver
libtool: link: cat .libs/libzookeeper_st.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libzookeeper_st.ver
libtool: link: echo "local: *; };" >> .libs/libzookeeper_st.ver
libtool: link: gcc -shared -fPIC -DPIC -Wl,--whole-archive ./.libs/libzkst.a ./.libs/libhashtable.a -Wl,--no-whole-archive -lm -O2 -Wl,-soname -Wl,libzookeeper_st.so.2 -Wl,-version-script -Wl,.libs/libzookeeper_st.ver -o .libs/libzookeeper_st.so.2.0.0
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `\033' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `3' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `5' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: syntax error in VERSION script
collect2: error: ld returned 1 exit status
make[1]: *** [libzookeeper_st.la] Error 1
make[1]: Leaving directory `/home/ubuntu/Desktop/workspace/installs/zookeeper-3.4.6/src/c'
make: *** [all] Error 2
So I started looking (backwards from point of error) at the files being generated by libtool and there is a grep command which is screwing things up.
The output of the following command looks good:
$ /usr/bin/nm -B ./.libs/libzkst.a ./.libs/libhashtable.a | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /bin/sed 's/.* //' | sort | uniq > .libs/libzookeeper_st.exp
$ head .libs/libzookeeper_st.exp
deallocate_ACL
deallocate_ACL_vector
deallocate_AuthPacket
deallocate_Buffer
deallocate_CheckVersionRequest
But, when /bin/grep is applied, the output has erroneous color codes:
$ /bin/grep -E -e "(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|zerror|is_unrecoverable)" ".libs/libzookeeper_st.exp" > ".libs/libzookeeper_st.expT"
$ head .libs/libzookeeper_st.expT
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KACL
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KACL_vector
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KAuthPacket
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KBuffer
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KCheckVersionRequest
The funny thing is that if I use /bin/grep --color=auto instead of /bin/grep, things look fine.
So basically I ended up exporting --color=auto to GREP_OPTIONS which was previously set to --color=always:
$ echo $GREP_OPTIONS
--color=always
$ export GREP_OPTIONS='--color=auto'
And voila! Things worked!
I can't install ffi gem and get the following error while perfrorming 'bundle install':
Installing ffi (1.0.11) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/Dmitry.Veremchuk/.rvm/rubies/ruby-1.9.3-p194/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include... no
checking for rb_thread_blocking_region()... yes
checking for ruby_native_thread_p()... yes
checking for rb_thread_call_with_gvl()... yes
creating extconf.h
creating Makefile
make
Configuring libffi
make -C "/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi"
make[1]: Entering directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi'
make "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=" "CXXFLAGS=" "CFLAGS_FOR_BUILD="
"CFLAGS_FOR_TARGET=" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKEINFO=/bin/sh /home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/missing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS=" "SHELL=/bin/sh" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/local/lib" "prefix=/usr/local" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=/usr/i686-pc-cygwin/bin/ld.exe" "NM=/usr/bin/nm -B" "RANLIB=ranlib" "DESTDIR=" all-recursive
make[2]: Entering directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi'
Making all in include
make[3]: Entering directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/include'
Making all in testsuite
make[3]: Entering directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite'
Making all in man
make[3]: Entering directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/man'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/man'
make[3]: Entering directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c -o src/debug.lo src/debug.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/debug.c -DDLL_EXPORT -DPIC -o src/.libs/debug.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c -o src/prep_cif.lo src/prep_cif.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/prep_cif.c -DDLL_EXPORT -DPIC -o src/.libs/prep_cif.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c -o src/types.lo src/types.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/types.c -DDLL_EXPORT -DPIC -o src/.libs/types.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c -o src/raw_api.lo src/raw_api.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/raw_api.c -DDLL_EXPORT -DPIC -o src/.libs/raw_api.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c -o src/java_raw_api.lo src/java_raw_api.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/java_raw_api.c -DDLL_EXPORT -DPIC -o src/.libs/java_raw_api.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c -o src/closures.lo src/closures.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/closures.c -DDLL_EXPORT -DPIC -o src/.libs/closures.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c -o src/x86/ffi.lo src/x86/ffi.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wall -g -fexceptions -c src/x86/ffi.c -DDLL_EXPORT -DPIC -o src/x86/.libs/ffi.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -I. -I./include -Iinclude -I./src -c -o src/x86/win32.lo src/x86/win32.S
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -I. -I./include -Iinclude -I./src -c src/x86/win32.S -DDLL_EXPORT -DPIC -o src/x86/.libs/win32.o
/bin/sh ./libtool --tag=CC --mode=link gcc -Wall -g -fexceptions -version-info `grep -v '^#' ./libtool-version` -no-undefined -o libffi.la -rpath /usr/local/lib src/debug.lo src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo src/x86/ffi.lo src/x86/win32.lo
libtool: link: gcc -shared src/.libs/debug.o src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/win32.o -o .libs/cygffi-5.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libffi.dll.a
Creating library file: .libs/libffi.dll.a
libtool: link: ( cd ".libs" && rm -f "libffi.la" && ln -s "../libffi.la" "libffi.la" )
/bin/sh ./libtool --tag=CC --mode=link gcc -Wall -g -fexceptions -o libffi_convenience.la src/debug.lo src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo src/x86/ffi.lo src/x86/win32.lo
libtool: link: ar cru .libs/libffi_convenience.a src/.libs/debug.o src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/win32.o
libtool: link: ranlib .libs/libffi_convenience.a
libtool: link: ( cd ".libs" && rm -f "libffi_convenience.la" && ln -s "../libffi_convenience.la" "libffi_convenience.la" )
make[3]: Leaving directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi'
make[2]: Leaving directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi'
make[1]: Leaving directory `/home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi'
compiling AbstractMemory.c
AbstractMemory.c:271: warning: 'memory_put_bool' defined but not used
AbstractMemory.c:271: warning: 'memory_write_bool' defined but not used
AbstractMemory.c:271: warning: 'memory_get_bool' defined but not used
AbstractMemory.c:271: warning: 'memory_read_bool' defined but not used
AbstractMemory.c:271: warning: 'memory_write_array_of_bool' defined but not used
AbstractMemory.c:271: warning: 'memory_read_array_of_bool' defined but not used
AbstractMemory.c:388: warning: 'memory_read_array_of_string' defined but not used
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
compiling ClosurePool.c
compiling DataConverter.c
compiling DynamicLibrary.c
compiling ffi.c
compiling Function.c
compiling FunctionInfo.c
compiling LastError.c
compiling MappedType.c
MappedType.c: In function `mapped_initialize':
MappedType.c:63: warning: unused variable `t'
compiling MemoryPointer.c
MemoryPointer.c:134: warning: 'memptr_mark' defined but not used
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByReference.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
In file included from /usr/include/cygwin/sys_time.h:13,
from /usr/include/sys/time.h:28,
from /usr/include/sys/_default_fcntl.h:186,
from /usr/include/sys/fcntl.h:3,
from /usr/include/fcntl.h:14,
from Thread.c:31:
/usr/include/sys/select.h:31: error: parse error before "fd_set"
/usr/include/sys/select.h:33: error: parse error before "fd_set"
In file included from /home/Dmitry.Veremchuk/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:1382,
from /home/Dmitry.Veremchuk/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby.h:32,
from Thread.h:25,
from Thread.c:32:
/home/Dmitry.Veremchuk/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/intern.h:285: error: parse error before "rb_fdset_t"
/home/Dmitry.Veremchuk/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/intern.h:285: warning: type defaults to `int' in declaration of `rb_fdset_t'
/home/Dmitry.Veremchuk/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/intern.h:285: warning: data definition has no type or storage class
/home/Dmitry.Veremchuk/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/intern.h:379: error: parse error before "fd_set"
/home/Dmitry.Veremchuk/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/intern.h:380: error: parse error before "rb_fdset_t"
Makefile:199: recipe for target `Thread.o' failed
make: *** [Thread.o] Error 1
Gem files will remain installed in /home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11 for inspection.
Results logged to /home/Dmitry.Veremchuk/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/gem_make.out
An error occured while installing ffi (1.0.11), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.0.11'` succeeds before bundling.
FFI gem is not required in my Gemfile. Though I suppose Capybara requires it.
I have the following configuration:
PC with Windows XP and Cygwin (with devtools installed);
Ruby version 1.9.3p194 (in RVM);
Rails version 3.2.8.
I tried to install ffi-1.0.11 separately but sadly with the same result.
Would appreciate any help.
Similar bug reported on github. But no solution to it till now.
I have an error while installing passenger. # passenger-install-apache2-module
My environment is
CentOS release 5.7 (Final)
httpd.x86_64 2.2.3-63.el5.centos.1
Phusion Passenger 3.0.11
Any help is appreciated. Thanks in advance.
g++ -shared ext/apache2/Configuration.o ext/apache2/Bucket.o ext/apache2/Hooks.o ext/apache2/mod_passenger.o -fPIC -o ext/apache2/mod_passenger.so -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apr-1 -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -I/usr/include/httpd -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<ext/hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/apache2/module_libpassenger_common.a ext/apache2/module_libboost_oxt.a -fPIC -lapr-1 -laprutil-1 -lpthread
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libapr-1.a(apr_strings.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libapr-1.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
rake aborted!
Command failed with status (1): [g++ -shared ext/apache2/Configuration.o ex...]
Tasks: TOP => apache2 => ext/apache2/mod_passenger.so
Try to recompile ruby with --enable-shared flag.