compiling GoStdlib fails on linux + ppc64le - bazel

I realize this is unsupported, but I'm trying to understand if there's some way around it.
bazel build //src/envoy
ERROR: /home/christy/.cache/bazel/_bazel_christy/bf2fef385bbf6e59110f7665da7ca8d6/external/io_bazel_rules_go/BUILD.bazel:9:1: GoStdlib external/io_bazel_rules_go/linux_ppc64le_stripped/stdlib~/pkg failed (Exit 1)`
<br>
`# runtime/cgo`
`gcc_libinit.c: In function 'int _cgo_try_pthread_create(pthread_t*, const pthread_attr_t*, void* (*)(void*), void*)':
gcc_libinit.c:106:21: error: invalid conversion from 'void*' to 'timespec*' [-fpermissive]
nanosleep(&ts, nil);
I'm compiling istio/proxy more or less with bazel 0.11.1 (compiled on my host).
From reading other issues, it seems that I need to have GoStdlib compiled using gcc instead of g++, but that's not the case:
(cd /home/christy/.cache/bazel/_bazel_christy/bf2fef385bbf6e59110f7665da7ca8d6/execroot/__main__ && \
exec env - \
TMPDIR=/tmp \
/home/christy/.cache/bazel/_bazel_christy/bf2fef385bbf6e59110f7665da7ca8d6/execroot/__main__/_bin/linux-sandbox -t 15 -w /home/christy/.cache/bazel/_bazel_christy/bf2fef385bbf6e59110f7665da7ca8d6/bazel-sandbox/2886789570067698588/execroot/__main__ -w /tmp -w /dev/shm -D -- bazel-out/host/bin/external/io_bazel_rules_go/go/tools/builders/linux_ppc64le_stripped/stdlib -go external/go_sdk/bin/go -root_file external/go_sdk/packages.txt -goos linux -goarch ppc64le '-cgo=1' -compiler_path /usr/bin -cc /usr/bin/g++ -cpp_flag -U_FORTIFY_SOURCE -cpp_flag -fstack-protector -cpp_flag -B/usr/bin -cpp_flag -B/usr/bin -cpp_flag -Wunused-but-set-parameter -cpp_flag -Wno-free-nonheap-object -cpp_flag -fno-omit-frame-pointer -cpp_flag -g0 -cpp_flag -O2 -cpp_flag '-D_FORTIFY_SOURCE=1' -cpp_flag -DNDEBUG -cpp_flag -ffunction-sections -cpp_flag -fdata-sections -cpp_flag -g0 -ld_flag -lm -ld_flag '-fuse-ld=gold' -ld_flag -Wl,-no-as-needed -ld_flag -Wl,-z,relro,-z,now -ld_flag -B/usr/bin -ld_flag -B/usr/bin -ld_flag -pass-exit-codes -out 'bazel-out/host/bin/external/io_bazel_rules_go/linux_ppc64le_stripped/stdlib~')

Related

clang sanitize-blacklist is not ignoring a function

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)

Failed to `bundle install` in CircleCI

I am getting errors while running bundle install in CircleCI.
circle.yml
dependencies:
pre:
- sudo apt-get clean; sudo mv /var/lib/apt/lists /tmp; sudo mkdir -p /var/lib/apt/lists/partial; sudo apt-get clean; sudo apt-get update; sudo apt-get install libpango1.0-0; sudo apt-get install firefox; sudo apt-get install libxml2-dev
override:
- bundle install:
timeout: 180
Error message:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/ubuntu/.rvm/gems/ruby-2.2.3/gems/capybara-webkit-1.8.0
/home/ubuntu/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20161127-19628-guj91w.rb extconf.rb
cd src/ && /usr/bin/qmake /home/ubuntu/.rvm/gems/ruby-2.2.3/gems/capybara-webkit-1.8.0/src/webkit_server.pro -o Makefile.webkit_server
cd src/ && make -f Makefile.webkit_server
make[1]: Entering directory `/home/ubuntu/.rvm/gems/ruby-2.2.3/gems/capybara-webkit-1.8.0/src'
g++ -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -Ibuild -x c++-header -c stable.h -o build/webkit_server.gch/c++
In file included from /usr/include/qt4/QtCore/QtCore:108:0,
from /usr/include/qt4/QtNetwork/QtNetwork:3,
from stable.h:30:
/usr/include/qt4/QtCore/qtconcurrentfilter.h: In function ‘QtConcurrent::ThreadEngineStarter<void> QtConcurrent::filterInternal(Sequence&, KeepFunctor, ReduceFunctor)’:
/usr/include/qt4/QtCore/qtconcurrentfilter.h:108:47: warning: typedef ‘Iterator’ locally defined but not used [-Wunused-local-typedefs]
typedef typename Sequence::const_iterator Iterator;
^
g++ -c -include build/webkit_server -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -Ibuild -o build/BlockUrl.o BlockUrl.cpp
g++ -c -include build/webkit_server -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -Ibuild -o build/AllowUrl.o AllowUrl.cpp
g++ -c -include build/webkit_server -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -Ibuild -o build/SetUnknownUrlMode.o SetUnknownUrlMode.cpp
g++ -c -include build/webkit_server -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -Ibuild -o build/FindModal.o FindModal.cpp
Please give me your advice!
Regards,
Anthony
Please try this
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui
then
gem install capybara-webkit -v '1.8.0'
I hope this will work

Compiling error: syntax error in VERSION script

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!

BitNami Apache Passenger start Server

I'm try to ran web server Apache with Passenger After passenger-install-apache2-module i have this error:
WARNING: Apache doesn't seem to be compiled with the 'prefork' or 'worker' MPM
Passenger has only been tested on Apache with the 'prefork' and the 'worker'
MPM. Your Apache installation is compiled with the '' MPM. We recommend
you to abort this installer and to recompile Apache with either the 'prefork'
or the 'worker' MPM.
Press Ctrl-C to abort this installer (recommended).
Press Enter if you want to continue with installation anyway.
--------------------------------------------
Compiling and installing Apache 2 module...
cd /home/sergey/rubystack-1.9.3-0/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.2
/home/sergey/rubystack-1.9.3-0/ruby/bin/ruby /home/sergey/rubystack-1.9.3-0/ruby/bin/rake apache2:clean apache2 RELEASE=yes
# /home/sergey/rubystack-1.9.3-0/ruby/bin/ruby /home/sergey/rubystack-1.9.3-0/ruby/bin/rake apache2:clean apache2 RELEASE=yes
/home/sergey/rubystack-1.9.3-0/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.2/lib/phusion_passenger/platform_info/operating_system.rb:33: Use RbConfig instead of obsolete and deprecated Config.
rm -rf ext/common/libboost_oxt.a ext/common/libboost_oxt
rm -rf ext/common/libpassenger_common.a ext/common/libpassenger_common
rm -f agents/PassengerWatchdog agents/PassengerLoggingAgent
rm -rf ext/apache2/module_libboost_oxt.a ext/apache2/module_libboost_oxt
rm -rf ext/apache2/module_libpassenger_common.a ext/apache2/module_libpassenger_common
rm -rf ext/apache2/Configuration.o ext/apache2/Bucket.o ext/apache2/Hooks.o ext/apache2/mod_passenger.o ext/apache2/mod_passenger.so agents/PassengerHelperAgent
mkdir -p ext/apache2/module_libpassenger_common
g++ -Iext -Iext/common -Iext/libev -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/apache2/module_libpassenger_common/aggregate.o -c ext/apache2/module_libpassenger_common/aggregate.cpp
rm -rf ext/apache2/module_libpassenger_common.a
ar cru ext/apache2/module_libpassenger_common.a ext/apache2/module_libpassenger_common/aggregate.o
ranlib ext/apache2/module_libpassenger_common.a
mkdir -p ext/apache2/module_libboost_oxt
g++ -Iext -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/apache2/module_libboost_oxt/aggregate.o -c ext/apache2/module_libboost_oxt/aggregate.cpp
In file included from ext/boost/src/pthread/thread.cpp:27:0,
from ext/apache2/module_libboost_oxt/aggregate.cpp:6:
ext/boost/src/pthread/timeconv.inl: In function ‘void {anonymous}::to_time(int, boost::xtime&)’:
ext/boost/src/pthread/timeconv.inl:22:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function ‘void {anonymous}::to_timespec_duration(const boost::xtime&, timespec&)’:
ext/boost/src/pthread/timeconv.inl:59:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function ‘void {anonymous}::to_duration(boost::xtime, int&)’:
ext/boost/src/pthread/timeconv.inl:90:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function ‘void {anonymous}::to_microduration(boost::xtime, int&)’:
ext/boost/src/pthread/timeconv.inl:112:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
mkdir -p ext/apache2/module_libboost_oxt
rm -rf ext/apache2/module_libboost_oxt.a
ar cru ext/apache2/module_libboost_oxt.a ext/apache2/module_libboost_oxt/aggregate.o
ranlib ext/apache2/module_libboost_oxt.a
gcc -Iext -Iext/common -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/apache2/mod_passenger.o -c ext/apache2/mod_passenger.c
g++ -Iext -Iext/common -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/apache2/Configuration.o -c ext/apache2/Configuration.cpp
g++ -Iext -Iext/common -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/apache2/Bucket.o -c ext/apache2/Bucket.cpp
g++ -Iext -Iext/common -fPIC -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/apache2/Hooks.o -c ext/apache2/Hooks.cpp
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 -D_LARGEFILE64_SOURCE -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/apache2/module_libpassenger_common.a ext/apache2/module_libboost_oxt.a -fPIC -L/usr/lib -lapr-1 -L/usr/lib -laprutil-1 -lpthread
mkdir -p ext/common/libpassenger_common
g++ -Iext -Iext/common -Iext/libev -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/common/libpassenger_common/aggregate.o -c ext/common/libpassenger_common/aggregate.cpp
rm -rf ext/common/libpassenger_common.a
ar cru ext/common/libpassenger_common.a ext/common/libpassenger_common/aggregate.o
ranlib ext/common/libpassenger_common.a
mkdir -p ext/common/libboost_oxt
g++ -Iext -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/common/libboost_oxt/aggregate.o -c ext/common/libboost_oxt/aggregate.cpp
In file included from ext/boost/src/pthread/thread.cpp:27:0,
from ext/common/libboost_oxt/aggregate.cpp:6:
ext/boost/src/pthread/timeconv.inl: In function ‘void {anonymous}::to_time(int, boost::xtime&)’:
ext/boost/src/pthread/timeconv.inl:22:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function ‘void {anonymous}::to_timespec_duration(const boost::xtime&, timespec&)’:
ext/boost/src/pthread/timeconv.inl:59:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function ‘void {anonymous}::to_duration(boost::xtime, int&)’:
ext/boost/src/pthread/timeconv.inl:90:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function ‘void {anonymous}::to_microduration(boost::xtime, int&)’:
ext/boost/src/pthread/timeconv.inl:112:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
mkdir -p ext/common/libboost_oxt
rm -rf ext/common/libboost_oxt.a
ar cru ext/common/libboost_oxt.a ext/common/libboost_oxt/aggregate.o
ranlib ext/common/libboost_oxt.a
g++ ext/apache2/HelperAgent.cpp -o agents/apache2/PassengerHelperAgent -Iext -Iext/common -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/libboost_oxt.a -lpthread -rdynamic
g++ ext/common/Watchdog.cpp -o agents/PassengerWatchdog -Iext -Iext/common -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/libboost_oxt.a -lpthread -rdynamic
ext/common/Watchdog.cpp: In function ‘void cleanupAgentsInBackground(std::vector<AgentWatcher*>&)’:
ext/common/Watchdog.cpp:804:6: warning: variable ‘e’ set but not used [-Wunused-but-set-variable]
g++ ext/common/LoggingAgent/Main.cpp -o agents/PassengerLoggingAgent -Iext -Iext/common -Iext/libev -I/home/sergey/rubystack-1.9.3-0/common/include -DHAS_CURL_EASY_RESET -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/libboost_oxt.a ext/libev/.libs/libev.a -L/home/sergey/rubystack-1.9.3-0/common/lib -lcurl -lz -lpthread -rdynamic
In file included from ext/common/LoggingAgent/../EventedMessageServer.h:31:0,
from ext/common/LoggingAgent/LoggingServer.h:48,
from ext/common/LoggingAgent/Main.cpp:43:
ext/common/LoggingAgent/../EventedServer.h: In member function ‘void Passenger::EventedServer::freeAllClients()’:
ext/common/LoggingAgent/../EventedServer.h:145:23: warning: variable ‘end’ set but not used [-Wunused-but-set-variable]
In file included from ext/common/LoggingAgent/Main.cpp:43:0:
ext/common/LoggingAgent/LoggingServer.h: In member function ‘void Passenger::LoggingServer::LogFile::notifyChanges()’:
ext/common/LoggingAgent/LoggingServer.h:167:38: warning: variable ‘end’ set but not used [-Wunused-but-set-variable]
/tmp/ccXtITl2.o: In function `~bad_day_of_month':
/home/sergey/rubystack-1.9.3-0/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.2/ext/boost/date_time/gregorian/greg_day.hpp:20: undefined reference to `std::out_of_range::~out_of_range()'
/tmp/ccXtITl2.o: In function `std::list<oxt::thread_registration*, std::allocator<oxt::thread_registration*> >::_M_insert(std::_List_iterator<oxt::thread_registration*>, oxt::thread_registration* const&)':
/usr/include/c++/4.6/bits/stl_list.h:1516: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/tmp/ccXtITl2.o: In function `std::list<oxt::thread_registration*, std::allocator<oxt::thread_registration*> >::_M_erase(std::_List_iterator<oxt::thread_registration*>)':
/usr/include/c++/4.6/bits/stl_list.h:1532: undefined reference to `std::__detail::_List_node_base::_M_unhook()'
/tmp/ccXtITl2.o: In function `std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_insert(std::_List_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/c++/4.6/bits/stl_list.h:1516: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/tmp/ccXtITl2.o: In function `std::list<boost::shared_ptr<Passenger::RemoteSender::Server>, std::allocator<boost::shared_ptr<Passenger::RemoteSender::Server> > >::_M_insert(std::_List_iterator<boost::shared_ptr<Passenger::RemoteSender::Server> >, boost::shared_ptr<Passenger::RemoteSender::Server> const&)':
/usr/include/c++/4.6/bits/stl_list.h:1516: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/tmp/ccXtITl2.o: In function `std::list<boost::shared_ptr<Passenger::RemoteSender::Server>, std::allocator<boost::shared_ptr<Passenger::RemoteSender::Server> > >::_M_erase(std::_List_iterator<boost::shared_ptr<Passenger::RemoteSender::Server> >)':
/usr/include/c++/4.6/bits/stl_list.h:1532: undefined reference to `std::__detail::_List_node_base::_M_unhook()'
/tmp/ccXtITl2.o: In function `std::list<boost::shared_ptr<Passenger::LoggingServer::LogSink>, std::allocator<boost::shared_ptr<Passenger::LoggingServer::LogSink> > >::_M_erase(std::_List_iterator<boost::shared_ptr<Passenger::LoggingServer::LogSink> >)':
/usr/include/c++/4.6/bits/stl_list.h:1532: undefined reference to `std::__detail::_List_node_base::_M_unhook()'
/tmp/ccXtITl2.o: In function `std::list<boost::shared_ptr<Passenger::LoggingServer::LogSink>, std::allocator<boost::shared_ptr<Passenger::LoggingServer::LogSink> > >::_M_insert(std::_List_iterator<boost::shared_ptr<Passenger::LoggingServer::LogSink> >, boost::shared_ptr<Passenger::LoggingServer::LogSink> const&)':
/usr/include/c++/4.6/bits/stl_list.h:1516: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/tmp/ccXtITl2.o: In function `~bad_year':
/home/sergey/rubystack-1.9.3-0/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.2/ext/boost/date_time/gregorian/greg_year.hpp:20: undefined reference to `std::out_of_range::~out_of_range()'
/tmp/ccXtITl2.o: In function `~bad_month':
/home/sergey/rubystack-1.9.3-0/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.2/ext/boost/date_time/gregorian/greg_month.hpp:44: undefined reference to `std::out_of_range::~out_of_range()'
/tmp/ccXtITl2.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_10bad_alloc_EEE[vtable for boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>]+0x28): undefined reference to `std::bad_alloc::what() const'
/tmp/ccXtITl2.o:(.rodata._ZTVN5boost16exception_detail10bad_alloc_E[vtable for boost::exception_detail::bad_alloc_]+0x20): undefined reference to `std::bad_alloc::what() const'
ext/common/libpassenger_common.a(aggregate.o): In function `std::list<boost::shared_ptr<Passenger::CachedFileStat::Entry>, std::allocator<boost::shared_ptr<Passenger::CachedFileStat::Entry> > >::_M_erase(std::_List_iterator<boost::shared_ptr<Passenger::CachedFileStat::Entry> >)':
/usr/include/c++/4.6/bits/stl_list.h:1532: undefined reference to `std::__detail::_List_node_base::_M_unhook()'
ext/common/libpassenger_common.a(aggregate.o): In function `std::list<boost::shared_ptr<Passenger::CachedFileStat::Entry>, std::allocator<boost::shared_ptr<Passenger::CachedFileStat::Entry> > >::_M_insert(std::_List_iterator<boost::shared_ptr<Passenger::CachedFileStat::Entry> >, boost::shared_ptr<Passenger::CachedFileStat::Entry> const&)':
/usr/include/c++/4.6/bits/stl_list.h:1516: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
ext/common/libboost_oxt.a(aggregate.o): In function `std::list<oxt::trace_point*, std::allocator<oxt::trace_point*> >::_M_insert(std::_List_iterator<oxt::trace_point*>, oxt::trace_point* const&)':
/usr/include/c++/4.6/bits/stl_list.h:1516: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
collect2: ld returned 1 exit status
rake aborted!
Command failed with status (1): [g++ ext/common/LoggingAgent/Main.cpp -o ag...]
Tasks: TOP => apache2 => agents/PassengerLoggingAgent
(See full trace by running task with --trace)
--------------------------------------------
It looks like something went wrong
Please read our Users guide for troubleshooting tips:
/home/sergey/rubystack-1.9.3-0/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.2/doc/Users guide Apache.html
If that doesn't help, please use our support facilities at:
http://www.modrails.com/
We'll do our best to help you.
How i can fix it?
BitNami RubyStack already ships the Passenger module so it is not necessary to add it.
(Note: This question was also posted in BitNami but I thought it was convenient to also include here a reponse)

FFI 1.0.11 doesn't install in cygwin

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.

Resources