BitNami Apache Passenger start Server - ruby-on-rails

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)

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)

Building Mosquitto MQTT auth plugin issue

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

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

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.

can not install passenger. libapr-1.a: could not read symbols: Bad value

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.

Resources