Using -mcpu/-march allows enabling a set of extended instructions like sse on x86 or altivec, but when building for the current cpu, this isn t always enough.
For example, passing -mcpu=cascadelake to clang doesn t means enabling bmi or the various avx512 extensions which might be present on a cascade lake cpu.
That s why gcc as an additionnal possibility which is -mtune=native. Using this option will enable all the compiler flags generating the extensions supported by the current host cpu. But what s the equivalent for clang?
from the man page man clang
man clang | grep march
-march=<cpu>
Specify that Clang should generate code for a specific processor family member and later. For example, if you specify -march=i486, the compiler is allowed to generate instructions that are valid on i486 and later processors, but which may not exist on earlier ones.
use -march to enable cpu features
use -mtune to optimize for a certain micro architecture.
On my 11th Gen Intel(R) Core(TM) i7-11700KF # 3.60GHz
and clang 12 It seems to value a -march=native flag.
from here:
clang -march=native -E -v - </dev/null 2>&1 | grep cc1 (respectively with gcc)
I do get a different set of flags being activated for compilation.
with -march=native
$ clang -march=native -E -v - </dev/null 2>&1 | grep cc1
"/usr/lib/llvm-12/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu icelake-client -target-feature +sse2 -target-feature -tsxldtrk -target-feature +cx16 -target-feature +sahf -target-feature -tbm -target-feature +avx512ifma -target-feature +sha -target-feature +gfni -target-feature -fma4 -target-feature +vpclmulqdq -target-feature +prfchw -target-feature +bmi2 -target-feature -cldemote -target-feature +fsgsbase -target-feature -ptwrite -target-feature -amx-tile -target-feature -uintr -target-feature +popcnt -target-feature -widekl -target-feature +aes -target-feature +avx512bitalg -target-feature -movdiri -target-feature +xsaves -target-feature -avx512er -target-feature -avxvnni -target-feature +avx512vnni -target-feature -amx-bf16 -target-feature +avx512vpopcntdq -target-feature -pconfig -target-feature -clwb -target-feature +avx512f -target-feature +xsavec -target-feature -clzero -target-feature +pku -target-feature +mmx -target-feature -lwp -target-feature +rdpid -target-feature -xop -target-feature +rdseed -target-feature -waitpkg -target-feature -kl -target-feature -movdir64b -target-feature -sse4a -target-feature +avx512bw -target-feature +clflushopt -target-feature +xsave -target-feature +avx512vbmi2 -target-feature +64bit -target-feature +avx512vl -target-feature -serialize -target-feature -hreset -target-feature +invpcid -target-feature +avx512cd -target-feature +avx -target-feature +vaes -target-feature -avx512bf16 -target-feature +cx8 -target-feature +fma -target-feature -rtm -target-feature +bmi -target-feature -enqcmd -target-feature +rdrnd -target-feature -mwaitx -target-feature +sse4.1 -target-feature +sse4.2 -target-feature +avx2 -target-feature +fxsr -target-feature -wbnoinvd -target-feature +sse -target-feature +lzcnt -target-feature +pclmul -target-feature -prefetchwt1 -target-feature +f16c -target-feature +ssse3 -target-feature -sgx -target-feature -shstk -target-feature +cmov -target-feature +avx512vbmi -target-feature -amx-int8 -target-feature +movbe -target-feature -avx512vp2intersect -target-feature +xsaveopt -target-feature +avx512dq -target-feature +adx -target-feature -avx512pf -target-feature +sse3 -fno-split-dwarf-inlining -debugger-tuning=gdb -v -resource-dir /usr/lib/llvm-12/lib/clang/12.0.0 -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-12/lib/clang/12.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /home/joel -ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -o - -x c -
$ clang -march=native -E -v - </dev/null 2>&1 | grep cc1 | wc
2 228 2870
without -march=native
$ clang -E -v - </dev/null 2>&1 | grep cc1
"/usr/lib/llvm-12/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -fno-split-dwarf-inlining -debugger-tuning=gdb -v -resource-dir /usr/lib/llvm-12/lib/clang/12.0.0 -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-12/lib/clang/12.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /home/joel -ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -o - -x c -
$ clang -E -v - </dev/null 2>&1 | grep cc1 | wc
2 58 799
Related
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)
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~')
I am trying to compile the C bindings for Zookeeper, but I am unable to do so. When I run make, I receive the following error:
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `\033' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `3' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `5' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: syntax error in VERSION script
collect2: error: ld returned 1 exit status
The entire output for ./configure and make are attached below.
Can anyone help me on how I can resolve this issue?
$ ./configure
checking for doxygen... no
checking for perl... /usr/bin/perl
checking for dot... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for cppunit-config... /usr/bin/cppunit-config
checking for Cppunit - version >= 1.10.2... 1.13.1
checking for generated/zookeeper.jute.c... yes
checking for generated/zookeeper.jute.h... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether ln -s works... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pthread_mutex_lock in -lpthread... yes
configure: building with SyncAPI support
checking for ANSI C header files... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking for nfds_t... yes
checking whether to enable ipv6... yes
checking for getcwd... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for getlogin... yes
checking for getpwuid_r... yes
checking for gettimeofday... yes
checking for getuid... yes
checking for memmove... yes
checking for memset... yes
checking for poll... yes
checking for socket... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strtol... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
$ make
make[1]: Entering directory `/home/ubuntu/Desktop/workspace/installs/zookeeper-3.4.6/src/c'
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c -o zookeeper.lo `test -f 'src/zookeeper.c' || echo './'`src/zookeeper.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -fPIC -DPIC -o .libs/zookeeper.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -o zookeeper.o >/dev/null 2>&1
mv -f .deps/zookeeper.Tpo .deps/zookeeper.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c -o recordio.lo `test -f 'src/recordio.c' || echo './'`src/recordio.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c src/recordio.c -fPIC -DPIC -o .libs/recordio.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c src/recordio.c -o recordio.o >/dev/null 2>&1
mv -f .deps/recordio.Tpo .deps/recordio.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c -o zookeeper.jute.lo `test -f 'generated/zookeeper.jute.c' || echo './'`generated/zookeeper.jute.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c generated/zookeeper.jute.c -fPIC -DPIC -o .libs/zookeeper.jute.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c generated/zookeeper.jute.c -o zookeeper.jute.o >/dev/null 2>&1
mv -f .deps/zookeeper.jute.Tpo .deps/zookeeper.jute.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_log.lo -MD -MP -MF .deps/zk_log.Tpo -c -o zk_log.lo `test -f 'src/zk_log.c' || echo './'`src/zk_log.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_log.lo -MD -MP -MF .deps/zk_log.Tpo -c src/zk_log.c -fPIC -DPIC -o .libs/zk_log.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_log.lo -MD -MP -MF .deps/zk_log.Tpo -c src/zk_log.c -o zk_log.o >/dev/null 2>&1
mv -f .deps/zk_log.Tpo .deps/zk_log.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_hashtable.lo -MD -MP -MF .deps/zk_hashtable.Tpo -c -o zk_hashtable.lo `test -f 'src/zk_hashtable.c' || echo './'`src/zk_hashtable.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_hashtable.lo -MD -MP -MF .deps/zk_hashtable.Tpo -c src/zk_hashtable.c -fPIC -DPIC -o .libs/zk_hashtable.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_hashtable.lo -MD -MP -MF .deps/zk_hashtable.Tpo -c src/zk_hashtable.c -o zk_hashtable.o >/dev/null 2>&1
mv -f .deps/zk_hashtable.Tpo .deps/zk_hashtable.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT st_adaptor.lo -MD -MP -MF .deps/st_adaptor.Tpo -c -o st_adaptor.lo `test -f 'src/st_adaptor.c' || echo './'`src/st_adaptor.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT st_adaptor.lo -MD -MP -MF .deps/st_adaptor.Tpo -c src/st_adaptor.c -fPIC -DPIC -o .libs/st_adaptor.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT st_adaptor.lo -MD -MP -MF .deps/st_adaptor.Tpo -c src/st_adaptor.c -o st_adaptor.o >/dev/null 2>&1
mv -f .deps/st_adaptor.Tpo .deps/st_adaptor.Plo
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -D_GNU_SOURCE -o libzkst.la zookeeper.lo recordio.lo zookeeper.jute.lo zk_log.lo zk_hashtable.lo st_adaptor.lo -lm
libtool: link: ar cru .libs/libzkst.a .libs/zookeeper.o .libs/recordio.o .libs/zookeeper.jute.o .libs/zk_log.o .libs/zk_hashtable.o .libs/st_adaptor.o
libtool: link: ranlib .libs/libzkst.a
libtool: link: ( cd ".libs" && rm -f "libzkst.la" && ln -s "../libzkst.la" "libzkst.la" )
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable_itr.lo -MD -MP -MF .deps/hashtable_itr.Tpo -c -o hashtable_itr.lo `test -f 'src/hashtable/hashtable_itr.c' || echo './'`src/hashtable/hashtable_itr.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable_itr.lo -MD -MP -MF .deps/hashtable_itr.Tpo -c src/hashtable/hashtable_itr.c -fPIC -DPIC -o .libs/hashtable_itr.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable_itr.lo -MD -MP -MF .deps/hashtable_itr.Tpo -c src/hashtable/hashtable_itr.c -o hashtable_itr.o >/dev/null 2>&1
mv -f .deps/hashtable_itr.Tpo .deps/hashtable_itr.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.lo `test -f 'src/hashtable/hashtable.c' || echo './'`src/hashtable/hashtable.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c src/hashtable/hashtable.c -fPIC -DPIC -o .libs/hashtable.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c src/hashtable/hashtable.c -o hashtable.o >/dev/null 2>&1
mv -f .deps/hashtable.Tpo .deps/hashtable.Plo
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -D_GNU_SOURCE -o libhashtable.la hashtable_itr.lo hashtable.lo
libtool: link: ar cru .libs/libhashtable.a .libs/hashtable_itr.o .libs/hashtable.o
libtool: link: ranlib .libs/libhashtable.a
libtool: link: ( cd ".libs" && rm -f "libhashtable.la" && ln -s "../libhashtable.la" "libhashtable.la" )
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -D_GNU_SOURCE -no-undefined -version-info 2 -export-symbols-regex '(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|zerror|is_unrecoverable)' -o libzookeeper_st.la -rpath /home/ubuntu/Desktop/workspace/installs/build/zookeeper-cbinding/lib libzkst.la libhashtable.la
libtool: link: /usr/bin/nm -B ./.libs/libzkst.a ./.libs/libhashtable.a | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /bin/sed 's/.* //' | sort | uniq > .libs/libzookeeper_st.exp
libtool: link: /bin/grep -E -e "(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|zerror|is_unrecoverable)" ".libs/libzookeeper_st.exp" > ".libs/libzookeeper_st.expT"
libtool: link: mv -f ".libs/libzookeeper_st.expT" ".libs/libzookeeper_st.exp"
libtool: link: echo "{ global:" > .libs/libzookeeper_st.ver
libtool: link: cat .libs/libzookeeper_st.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libzookeeper_st.ver
libtool: link: echo "local: *; };" >> .libs/libzookeeper_st.ver
libtool: link: gcc -shared -fPIC -DPIC -Wl,--whole-archive ./.libs/libzkst.a ./.libs/libhashtable.a -Wl,--no-whole-archive -lm -O2 -Wl,-soname -Wl,libzookeeper_st.so.2 -Wl,-version-script -Wl,.libs/libzookeeper_st.ver -o .libs/libzookeeper_st.so.2.0.0
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `\033' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `3' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `5' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: syntax error in VERSION script
collect2: error: ld returned 1 exit status
make[1]: *** [libzookeeper_st.la] Error 1
make[1]: Leaving directory `/home/ubuntu/Desktop/workspace/installs/zookeeper-3.4.6/src/c'
make: *** [all] Error 2
So I started looking (backwards from point of error) at the files being generated by libtool and there is a grep command which is screwing things up.
The output of the following command looks good:
$ /usr/bin/nm -B ./.libs/libzkst.a ./.libs/libhashtable.a | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /bin/sed 's/.* //' | sort | uniq > .libs/libzookeeper_st.exp
$ head .libs/libzookeeper_st.exp
deallocate_ACL
deallocate_ACL_vector
deallocate_AuthPacket
deallocate_Buffer
deallocate_CheckVersionRequest
But, when /bin/grep is applied, the output has erroneous color codes:
$ /bin/grep -E -e "(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|zerror|is_unrecoverable)" ".libs/libzookeeper_st.exp" > ".libs/libzookeeper_st.expT"
$ head .libs/libzookeeper_st.expT
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KACL
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KACL_vector
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KAuthPacket
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KBuffer
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KCheckVersionRequest
The funny thing is that if I use /bin/grep --color=auto instead of /bin/grep, things look fine.
So basically I ended up exporting --color=auto to GREP_OPTIONS which was previously set to --color=always:
$ echo $GREP_OPTIONS
--color=always
$ export GREP_OPTIONS='--color=auto'
And voila! Things worked!
I am working on Open Source ChatSecure (iOS). (https://chatsecure.org/developers/)
But while creating build I am getting error "missing required architecture x86_64 in file". This error occurs only if I am using 64-bit architecture simulator, Its working fine with other simulators.
In log I have checked that errors are because of these three libraries (libotr.a, libgcrypt.a, libgpg-error.a) which are part of OTRKit (Submodule of ChatSecure-iOS). These libraries are not building properly which compatibles with x86_64 architecture.
For building those libraries I have followed following steps,
1) $ git submodule add https://github.com/ChatSecure/OTRKit.git Submodules/OTRKit (added OTRKit as a Submodule in ChatSecure app)
2) $ bash build-libgpg-error.sh
3) $ bash build-libgcrypt.sh
4) $ bash build-libotr.sh
Following log is generated while building libgpg-error.a,
xxx-Mac-Minixxx:OTRKit xxx$ bash build-libgpg-error.sh
Building libgpg-error...
[Travis Detected] GPG verification disabled - Compiling for i386 only
Downloading libgpg-error-1.12.tar.bz2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 477k 100 477k 0 0 13777 0 0:00:35 0:00:35 --:--:-- 19253
Building without ccache
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i386-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-apple-darwin12.5.0
checking host system type... i386-apple-darwin
configure: autobuild project... libgpg-error
configure: autobuild revision... 1.12
configure: autobuild hostname... xxx-Mac-Minixxx.local
configure: autobuild timestamp... 20140830-194606
checking for i386-apple-darwin-gcc... no
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... rm: conftest.dSYM: is a directory
yes
checking how to run the C preprocessor... gcc -E
checking for gawk... (cached) awk
checking for i386-apple-darwin-ar... no
checking for ar... ar
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... no
checking for i386-apple-darwin-dumpbin... no
checking for i386-apple-darwin-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin12.5.0 file names to i386-apple-darwin format... func_convert_file_noop
checking how to convert x86_64-apple-darwin12.5.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for i386-apple-darwin-objdump... no
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for i386-apple-darwin-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for i386-apple-darwin-ar... ar
checking for archiver #FILE support... no
checking for i386-apple-darwin-strip... strip
checking for i386-apple-darwin-ranlib... no
checking for ranlib... ranlib
checking command to parse nm output from gcc object... ok
checking for sysroot... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk
checking for i386-apple-darwin-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking for i386-apple-darwin-dsymutil... no
checking for dsymutil... dsymutil
checking for i386-apple-darwin-nmedit... no
checking for nmedit... nmedit
checking for i386-apple-darwin-lipo... no
checking for lipo... lipo
checking for i386-apple-darwin-otool... no
checking for otool... otool
checking for i386-apple-darwin-otool64... no
checking for otool64... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin dyld
checking how to hardcode library paths into programs... immediate
checking for i386-apple-darwin-windres... no
checking for windres... no
checking for cc for build... gcc
checking whether NLS is requested... yes
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking for ld used by GCC... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... yes
checking for CFLocaleCopyCurrent... yes
checking for GNU gettext in libc... no
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking for GNU gettext in libintl... no
checking whether to use NLS... no
checking for ANSI C header files... (cached) yes
checking for stdlib.h... (cached) yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for strerror_r... (cached) yes
checking for an ANSI C-conforming const... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/gpg-error-config
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
libgpg-error-1.12 prepared for make
Revision: 12243ce (4644)
Platform: i386-apple-darwin
make all-recursive
Making all in m4
make[2]: Nothing to be done for `all'.
Making all in src
awk -f ./mkerrnos.awk ./errnos.in >code-to-errno.h
awk -f ./mkerrcodes1.awk ./errnos.in >_mkerrcodes.h
gcc -E _mkerrcodes.h | grep GPG_ERR_ | \
awk -f ./mkerrcodes.awk >mkerrcodes.h
awk -f ./mkstrtable.awk -v textidx=2 -v nogettext=1 \
./err-sources.h.in >err-sources-sym.h
awk -f ./mkstrtable.awk -v textidx=2 -v nogettext=1 \
./err-codes.h.in >err-codes-sym.h
awk -f ./mkstrtable.awk -v textidx=2 -v nogettext=1 \
-v prefix=GPG_ERR_ -v namespace=errnos_ \
./errnos.in >errnos-sym.h
rm extra-h.in
rm: extra-h.in: No such file or directory
make[2]: [extra-h.in] Error 1 (ignored)
echo "/* The version string of this header. */" >>extra-h.in
rm _mkerrcodes.h
echo "#define GPG_ERROR_VERSION \"1.12\"" >>extra-h.in
cat ./gpg-error.def.in >_gpg-error.def.h
echo >>extra-h.in
echo "/* The version number of this header. */" >>extra-h.in
gcc -E -I. -I.. _gpg-error.def.h | \
grep -v '^#' >gpg-error.def
echo "#define GPG_ERROR_VERSION_NUMBER 0x010c00" >>extra-h.in
echo >>extra-h.in
echo EOF >>extra-h.in
echo "/*dummy*/" > mkw32errmap.map.c
gcc -I. -I. -o mkerrcodes ./mkerrcodes.c
rm _gpg-error.def.h
awk -f ./mkheader.awk \
./err-sources.h.in \
./err-codes.h.in \
./errnos.in \
extra-h.in \
./gpg-error.h.in > gpg-error.h
./mkerrcodes | awk -f ./mkerrcodes2.awk >code-from-errno.h
make all-am
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-init.lo -MD -MP -MF .deps/libgpg_error_la-init.Tpo -c -o libgpg_error_la-init.lo `test -f 'init.c' || echo './'`init.c
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-version.lo -MD -MP -MF .deps/libgpg_error_la-version.Tpo -c -o libgpg_error_la-version.lo `test -f 'version.c' || echo './'`version.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-version.lo -MD -MP -MF .deps/libgpg_error_la-version.Tpo -c version.c -fno-common -DPIC -o libgpg_error_la-version.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-init.lo -MD -MP -MF .deps/libgpg_error_la-init.Tpo -c init.c -fno-common -DPIC -o libgpg_error_la-init.o
mv -f .deps/libgpg_error_la-init.Tpo .deps/libgpg_error_la-init.Plo
mv -f .deps/libgpg_error_la-version.Tpo .deps/libgpg_error_la-version.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-strsource.lo -MD -MP -MF .deps/libgpg_error_la-strsource.Tpo -c -o libgpg_error_la-strsource.lo `test -f 'strsource.c' || echo './'`strsource.c
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-strerror.lo -MD -MP -MF .deps/libgpg_error_la-strerror.Tpo -c -o libgpg_error_la-strerror.lo `test -f 'strerror.c' || echo './'`strerror.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-strsource.lo -MD -MP -MF .deps/libgpg_error_la-strsource.Tpo -c strsource.c -fno-common -DPIC -o libgpg_error_la-strsource.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-strerror.lo -MD -MP -MF .deps/libgpg_error_la-strerror.Tpo -c strerror.c -fno-common -DPIC -o libgpg_error_la-strerror.o
mv -f .deps/libgpg_error_la-strsource.Tpo .deps/libgpg_error_la-strsource.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-code-to-errno.lo -MD -MP -MF .deps/libgpg_error_la-code-to-errno.Tpo -c -o libgpg_error_la-code-to-errno.lo `test -f 'code-to-errno.c' || echo './'`code-to-errno.c
mv -f .deps/libgpg_error_la-strerror.Tpo .deps/libgpg_error_la-strerror.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-code-from-errno.lo -MD -MP -MF .deps/libgpg_error_la-code-from-errno.Tpo -c -o libgpg_error_la-code-from-errno.lo `test -f 'code-from-errno.c' || echo './'`code-from-errno.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-code-to-errno.lo -MD -MP -MF .deps/libgpg_error_la-code-to-errno.Tpo -c code-to-errno.c -fno-common -DPIC -o libgpg_error_la-code-to-errno.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT libgpg_error_la-code-from-errno.lo -MD -MP -MF .deps/libgpg_error_la-code-from-errno.Tpo -c code-from-errno.c -fno-common -DPIC -o libgpg_error_la-code-from-errno.o
mv -f .deps/libgpg_error_la-code-to-errno.Tpo .deps/libgpg_error_la-code-to-errno.Plo
gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT gpg_error-strsource-sym.o -MD -MP -MF .deps/gpg_error-strsource-sym.Tpo -c -o gpg_error-strsource-sym.o `test -f 'strsource-sym.c' || echo './'`strsource-sym.c
mv -f .deps/libgpg_error_la-code-from-errno.Tpo .deps/libgpg_error_la-code-from-errno.Plo
gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT gpg_error-strerror-sym.o -MD -MP -MF .deps/gpg_error-strerror-sym.Tpo -c -o gpg_error-strerror-sym.o `test -f 'strerror-sym.c' || echo './'`strerror-sym.c
mv -f .deps/gpg_error-strsource-sym.Tpo .deps/gpg_error-strsource-sym.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/locale\" -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT gpg_error-gpg-error.o -MD -MP -MF .deps/gpg_error-gpg-error.Tpo -c -o gpg_error-gpg-error.o `test -f 'gpg-error.c' || echo './'`gpg-error.c
mv -f .deps/gpg_error-strerror-sym.Tpo .deps/gpg_error-strerror-sym.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -version-info 10:0:10 -arch i386 -fPIE -miphoneos-version-min=6.0 -L/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/lib -o libgpg-error.la -rpath /Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/lib libgpg_error_la-init.lo libgpg_error_la-version.lo libgpg_error_la-strsource.lo libgpg_error_la-strerror.lo libgpg_error_la-code-to-errno.lo libgpg_error_la-code-from-errno.lo
t-version.c:86:42: warning: data argument not used by format string
[-Wformat-extra-args]
" for a newer version\n", logpfx);
~~~~~~~~~~~~~~~~~~~~~~~~ ^
1 warning generated.
mv -f .deps/t-version.Tpo .deps/t-version.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I../src -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -MT t-syserror.o -MD -MP -MF .deps/t-syserror.Tpo -c -o t-syserror.o t-syserror.c
mv -f .deps/t-strerror.Tpo .deps/t-strerror.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -g -arch i386 -fPIE -miphoneos-version-min=6.0 -I/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -arch i386 -fPIE -miphoneos-version-min=6.0 -L/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/dependencies/lib -o t-syserror t-syserror.o ../src/libgpg-error.la
make install-am
.././install-sh -c -d '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/lib'
/bin/sh ../libtool --mode=install /usr/bin/install -c libgpg-error.la '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/lib'
libtool: install: /usr/bin/install -c .libs/libgpg-error.lai /Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/lib/libgpg-error.la
libtool: install: /usr/bin/install -c .libs/libgpg-error.a /Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/lib/libgpg-error.a
libtool: install: chmod 644 /Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/lib/libgpg-error.a
libtool: install: ranlib /Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/lib/libgpg-error.a
.././install-sh -c -d '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/bin'
/bin/sh ../libtool --mode=install /usr/bin/install -c gpg-error '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/bin'
libtool: install: /usr/bin/install -c gpg-error /Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/bin/gpg-error
.././install-sh -c -d '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/bin'
/usr/bin/install -c gpg-error-config '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/bin'
.././install-sh -c -d '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/include'
/usr/bin/install -c -m 644 gpg-error.h '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/include'
.././install-sh -c -d '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/aclocal'
/usr/bin/install -c -m 644 gpg-error.m4 '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/aclocal'
Making install in tests
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
Making install in po
if test "libgpg-error" = "gettext-tools"; then \
.././install-sh -c -d /Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/gettext/po; \
for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en#quot.header en#boldquot.header insert-header.sin Rules-quot Makevars.template; do \
/usr/bin/install -c -m 644 ./$file \
/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/gettext/po/$file; \
done; \
for file in Makevars; do \
rm -f /Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/gettext/po/$file; \
done; \
else \
: ; \
fi
Making install in lang
Making install in cl
make[3]: Nothing to be done for `install-exec-am'.
../.././install-sh -c -d '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/common-lisp/source/gpg-error'
/usr/bin/install -c -m 644 gpg-error.asd gpg-error-package.lisp gpg-error.lisp '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/common-lisp/source/gpg-error'
../.././install-sh -c -d '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/common-lisp/source/gpg-error'
/usr/bin/install -c -m 644 gpg-error-codes.lisp '/Users/xxx/Desktop/ChatSecure-iOS/27-08-2014/ChatSecure-iOS/Submodules/OTRKit/build/built/iPhoneSimulator7.1-i386.sdk/share/common-lisp/source/gpg-error'
Making clean in tests
rm -rf .libs _libs
rm -f t-version t-strerror t-syserror
rm -f *.o
rm -f *.lo
Making clean in src
rm -f gpg-error
test -z "err-sources.h err-codes.h code-to-errno.h code-from-errno.h gpg-error.h mkerrcodes mkerrcodes.h gpg-error.def mkw32errmap.tab.h mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-extra/errno.h extra-h.in _mkerrcodes.h _gpg-error.def.h mkw32errmap.tab.h mkw32errmap.map.c" || rm -f err-sources.h err-codes.h code-to-errno.h code-from-errno.h gpg-error.h mkerrcodes mkerrcodes.h gpg-error.def mkw32errmap.tab.h mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-extra/errno.h extra-h.in _mkerrcodes.h _gpg-error.def.h mkw32errmap.tab.h mkw32errmap.map.c
I have also post same issue in GitHub but didn't get any update. Hopefully expecting here. Thanks!
I am new in iOS development, Any help would be appreciated !
In order to use a library, the library has to be built with the same architecture as the code you're linking it into. In this case, it looks like those three libraries (libotr.a, libgcrypt.a, libgpg-error.a) were built in 32 bit, so you can't link them into a 64 bit build.
You need to get the x86_64 builds of those three libraries. This might involve rebuilding them yourself. Ideally, you would get/rebuild them in "universal" format, which means the library would contain both architectures, so you can link the same files into both 32bit and 64bit builds.
Notice that the OTRKit build script output says:
[Travis Detected] GPG verification disabled - Compiling for i386 only
i386 is the Intel 32bit architecture. The build script for OTR think's you're Travis, so you need to do export TRAVIS=0 before you build, in order to get the x86_64 arch built.
Someone has already submitted the bug here: https://github.com/ChatSecure/OTRKit/issues/15
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)