ChatSecure-iOS, [Travis Detected] GPG verification disabled - Compiling for i386 only - ios

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

Related

Using hyperledger-fabric v1.0.0 make docker got an error

Because of the need of the project, we have changed the core/chaincode/shim of fabric1.0.0. The tree structure of shim is:
shim
├── chaincode.go
├── handler.go
├── inprocstream.go
├── interfaces.go
├── java
│ └── ···
├── mockstub.go
├── mockstub_test.go
├── response.go
├── myxxxutil.go
├── shim_test.go
└── myxxx.go
Some of these functions require cgo, which is writen in c++, there is some code snippet:
//myxxx.go
package shim
/*
#cgo CFLAGS: -I/opt/xxxsrc
#cgo LDFLAGS: -L/usr/lib -lmyxxx
#include "interface.hpp"
#include <stdlib.h>
*/
import "C"
func SomeFucn(){
··· //the C++ source code is in /opt/xxxsrc folder,so is interface.hpp file,the libmyxxx.so file is in /usr/lib folder
}
The, I used the make docker command to create a peer image based on hyperledger/fabric-baseimage:x86_64-0.3.1 under fabric directory. This hyperledger/fabric-baseimage:x86_64-0.3.1 has been modified by me. I put the libmyxxx. so file into /usr/lib folder of this "baseimage", and put the c++ soure code into /opt/xxxsrc, Then the execution log is:
Building build/docker/bin/peer
(the docker command line is:
docker run -i --rm --user=0 -v /home/my/gopath/src/github.com/hyperledger/fabric:/opt/gopath/src/github.com/hyperledger/fabric -w /opt/gopath/src/github.com/hyperledger/fabric -v /home/my/gopath/src/github.com/hyperledger/fabric/build/docker/bin:/opt/gopath/bin -v /home/my/gopath/src/github.com/hyperledger/fabric/build/docker/peer/pkg:/opt/gopath/pkg hyperledger/fabric-baseimage:x86_64-0.3.1
go install -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=1.0.0 -X github.com/hyperledger/fabric/common/metadata.BaseVersion=0.3.1 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric -X github.com/hyperledger/fabric/common/metadata.DockerNamespace=hyperledger -X github.com/hyperledger/fabric/common/metadata.BaseDockerNamespace=hyperledger -linkmode external -extldflags -static -lpthread" github.com/hyperledger/fabric/peer
)
github.com/hyperledger/fabric/core/chaincode/shim
mkdir -p $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/
cd /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim
CGO_LDFLAGS="-g" "-O2" "-L/usr/lib" "-lmyxxx" "-L/usr/lib" "-lmyxxx" /opt/go/pkg/tool/linux_amd64/cgo -objdir $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/ -importpath github.com/hyperledger/fabric/core/chaincode/shim – -I $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/ -I/opt/xxxsrc -I/opt/xxxsrc myxxxutil.go myxxx.go
cd /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -I $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/ -g -O2 -I/opt/xxxsrc -I/opt/xxxsrc -o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo_main.o -c $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo_main.c
cd /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -I $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/ -g -O2 -I/opt/xxxsrc -I/opt/xxxsrc -o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo_export.o -c $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo_export.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -I $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/ -g -O2 -I/opt/xxxsrc -I/opt/xxxsrc -o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/myxxxutil.cgo2.o -c $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/myxxxutil.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -I $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/ -g -O2 -I/opt/xxxsrc -I/opt/xxxsrc -o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/xxx.cgo2.o -c $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/xxx.cgo2.c
cd /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/obj/_cgo.o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo_main.o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo_export.o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/myxxxutil.cgo2.o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/myxxx.cgo2.o -g -O2 -L/usr/lib -lmyxxx -L/usr/lib -lmyxxx
cd /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim
/opt/go/pkg/tool/linux_amd64/cgo -objdir $WORK/github.com/hyperledger/fabric/core/chaincode/shim/obj/ -dynpackage shim -dynimport $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo.o -dynout $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo_import.go
gcc I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_all.o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo_export.o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/myxxxutil.cgo2.o $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/myxxx.cgo2.o -g -O2 -L/usr/lib -L/usr/lib -Wl,-r -nostdlib -no-pie -Wl,-build-id=none
/opt/go/pkg/tool/linux_amd64/compile -o $WORK/github.com/hyperledger/fabric/core/chaincode/shim.a -trimpath $WORK -p github.com/hyperledger/fabric/core/chaincode/shim -buildid 2ee9889b3f3fdd6fc02e5029d94e8c287f977ccb -importmap github.com/golang/protobuf/proto=github.com/hyperledger/fabric/vendor/github.com/golang/protobuf/proto -importmap github.com/golang/protobuf/ptypes/timestamp=github.com/hyperledger/fabric/vendor/github.com/golang/protobuf/ptypes/timestamp -importmap github.com/looplab/fsm=github.com/hyperledger/fabric/vendor/github.com/looplab/fsm -importmap github.com/op/go-logging=github.com/hyperledger/fabric/vendor/github.com/op/go-logging -importmap github.com/spf13/viper=github.com/hyperledger/fabric/vendor/github.com/spf13/viper -importmap golang.org/x/net/context=github.com/hyperledger/fabric/vendor/golang.org/x/net/context -importmap google.golang.org/grpc=github.com/hyperledger/fabric/vendor/google.golang.org/grpc -D _/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim -I $WORK -I /opt/gopath/pkg/linux_amd64 -pack ./chaincode.go ./fileIO.go ./handler.go ./inprocstream.go ./interfaces.go ./mockstub.go ./response.go $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo_gotypes.go $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/myxxxutil.cgo1.go $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/myxxx.cgo1.go $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_cgo_import.go
cd /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim
pack r $WORK/github.com/hyperledger/fabric/core/chaincode/shim.a $WORK/github.com/hyperledger/fabric/core/chaincode/shim/_obj/_all.o # internal
cp $WORK/github.com/hyperledger/fabric/core/chaincode/shim.a /opt/gopath/pkg/linux_amd64/github.com/hyperledger/fabric/core/chaincode/shim.a
/opt/go/pkg/tool/linux_amd64/link -o $WORK/github.com/hyperledger/fabric/peer/_obj/exe/a.out -L $WORK -L /opt/gopath/pkg/linux_amd64 -extld=gcc -buildmode=exe -buildid=c7ee3188106eddcbae7255ad032536402bc38b29 -X github.com/hyperledger/fabric/common/metadata.Version=1.0.0 -X github.com/hyperledger/fabric/common/metadata.BaseVersion=0.3.1 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric -X github.com/hyperledger/fabric/common/metadata.DockerNamespace=hyperledger -X github.com/hyperledger/fabric/common/metadata.BaseDockerNamespace=hyperledger -linkmode external -extldflags "-static -lpthread" $WORK/github.com/hyperledger/fabric/peer.a
github.com/hyperledger/fabric/peer
/opt/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lmyxxx
/usr/bin/ld: cannot find -lmyxxx
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libltdl.a(dlopen.o): In function `vm_open':
(.text+0x5e): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-940349017/000001.o: In function `_cgo_7a2d42f1a351_C2func_getaddrinfo':
/tmp/workdir/go/src/net/cgo_unix.go:66: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
Makefile:197: recipe for target 'build/docker/bin/peer' failed
make: *** [build/docker/bin/peer] Error 2
I already tried to add path (/usr/lib) in /etc/ld.so.conf file, and executed "ldconfig", and also tried to add path to environment variables LD_LIBRARY_PATH and LIBRARY_PATH, the problem still reappears, so I would like to ask if there is any solution to the problem, thank you

Compiling error: syntax error in VERSION script

I am trying to compile the C bindings for Zookeeper, but I am unable to do so. When I run make, I receive the following error:
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `\033' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `3' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `5' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: syntax error in VERSION script
collect2: error: ld returned 1 exit status
The entire output for ./configure and make are attached below.
Can anyone help me on how I can resolve this issue?
$ ./configure
checking for doxygen... no
checking for perl... /usr/bin/perl
checking for dot... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for cppunit-config... /usr/bin/cppunit-config
checking for Cppunit - version >= 1.10.2... 1.13.1
checking for generated/zookeeper.jute.c... yes
checking for generated/zookeeper.jute.h... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether ln -s works... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pthread_mutex_lock in -lpthread... yes
configure: building with SyncAPI support
checking for ANSI C header files... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking for nfds_t... yes
checking whether to enable ipv6... yes
checking for getcwd... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for getlogin... yes
checking for getpwuid_r... yes
checking for gettimeofday... yes
checking for getuid... yes
checking for memmove... yes
checking for memset... yes
checking for poll... yes
checking for socket... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strtol... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
$ make
make[1]: Entering directory `/home/ubuntu/Desktop/workspace/installs/zookeeper-3.4.6/src/c'
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c -o zookeeper.lo `test -f 'src/zookeeper.c' || echo './'`src/zookeeper.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -fPIC -DPIC -o .libs/zookeeper.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -o zookeeper.o >/dev/null 2>&1
mv -f .deps/zookeeper.Tpo .deps/zookeeper.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c -o recordio.lo `test -f 'src/recordio.c' || echo './'`src/recordio.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c src/recordio.c -fPIC -DPIC -o .libs/recordio.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT recordio.lo -MD -MP -MF .deps/recordio.Tpo -c src/recordio.c -o recordio.o >/dev/null 2>&1
mv -f .deps/recordio.Tpo .deps/recordio.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c -o zookeeper.jute.lo `test -f 'generated/zookeeper.jute.c' || echo './'`generated/zookeeper.jute.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c generated/zookeeper.jute.c -fPIC -DPIC -o .libs/zookeeper.jute.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.jute.lo -MD -MP -MF .deps/zookeeper.jute.Tpo -c generated/zookeeper.jute.c -o zookeeper.jute.o >/dev/null 2>&1
mv -f .deps/zookeeper.jute.Tpo .deps/zookeeper.jute.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_log.lo -MD -MP -MF .deps/zk_log.Tpo -c -o zk_log.lo `test -f 'src/zk_log.c' || echo './'`src/zk_log.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_log.lo -MD -MP -MF .deps/zk_log.Tpo -c src/zk_log.c -fPIC -DPIC -o .libs/zk_log.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_log.lo -MD -MP -MF .deps/zk_log.Tpo -c src/zk_log.c -o zk_log.o >/dev/null 2>&1
mv -f .deps/zk_log.Tpo .deps/zk_log.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_hashtable.lo -MD -MP -MF .deps/zk_hashtable.Tpo -c -o zk_hashtable.lo `test -f 'src/zk_hashtable.c' || echo './'`src/zk_hashtable.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_hashtable.lo -MD -MP -MF .deps/zk_hashtable.Tpo -c src/zk_hashtable.c -fPIC -DPIC -o .libs/zk_hashtable.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zk_hashtable.lo -MD -MP -MF .deps/zk_hashtable.Tpo -c src/zk_hashtable.c -o zk_hashtable.o >/dev/null 2>&1
mv -f .deps/zk_hashtable.Tpo .deps/zk_hashtable.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT st_adaptor.lo -MD -MP -MF .deps/st_adaptor.Tpo -c -o st_adaptor.lo `test -f 'src/st_adaptor.c' || echo './'`src/st_adaptor.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT st_adaptor.lo -MD -MP -MF .deps/st_adaptor.Tpo -c src/st_adaptor.c -fPIC -DPIC -o .libs/st_adaptor.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT st_adaptor.lo -MD -MP -MF .deps/st_adaptor.Tpo -c src/st_adaptor.c -o st_adaptor.o >/dev/null 2>&1
mv -f .deps/st_adaptor.Tpo .deps/st_adaptor.Plo
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -D_GNU_SOURCE -o libzkst.la zookeeper.lo recordio.lo zookeeper.jute.lo zk_log.lo zk_hashtable.lo st_adaptor.lo -lm
libtool: link: ar cru .libs/libzkst.a .libs/zookeeper.o .libs/recordio.o .libs/zookeeper.jute.o .libs/zk_log.o .libs/zk_hashtable.o .libs/st_adaptor.o
libtool: link: ranlib .libs/libzkst.a
libtool: link: ( cd ".libs" && rm -f "libzkst.la" && ln -s "../libzkst.la" "libzkst.la" )
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable_itr.lo -MD -MP -MF .deps/hashtable_itr.Tpo -c -o hashtable_itr.lo `test -f 'src/hashtable/hashtable_itr.c' || echo './'`src/hashtable/hashtable_itr.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable_itr.lo -MD -MP -MF .deps/hashtable_itr.Tpo -c src/hashtable/hashtable_itr.c -fPIC -DPIC -o .libs/hashtable_itr.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable_itr.lo -MD -MP -MF .deps/hashtable_itr.Tpo -c src/hashtable/hashtable_itr.c -o hashtable_itr.o >/dev/null 2>&1
mv -f .deps/hashtable_itr.Tpo .deps/hashtable_itr.Plo
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.lo `test -f 'src/hashtable/hashtable.c' || echo './'`src/hashtable/hashtable.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c src/hashtable/hashtable.c -fPIC -DPIC -o .libs/hashtable.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT hashtable.lo -MD -MP -MF .deps/hashtable.Tpo -c src/hashtable/hashtable.c -o hashtable.o >/dev/null 2>&1
mv -f .deps/hashtable.Tpo .deps/hashtable.Plo
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -D_GNU_SOURCE -o libhashtable.la hashtable_itr.lo hashtable.lo
libtool: link: ar cru .libs/libhashtable.a .libs/hashtable_itr.o .libs/hashtable.o
libtool: link: ranlib .libs/libhashtable.a
libtool: link: ( cd ".libs" && rm -f "libhashtable.la" && ln -s "../libhashtable.la" "libhashtable.la" )
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2 -D_GNU_SOURCE -no-undefined -version-info 2 -export-symbols-regex '(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|zerror|is_unrecoverable)' -o libzookeeper_st.la -rpath /home/ubuntu/Desktop/workspace/installs/build/zookeeper-cbinding/lib libzkst.la libhashtable.la
libtool: link: /usr/bin/nm -B ./.libs/libzkst.a ./.libs/libhashtable.a | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /bin/sed 's/.* //' | sort | uniq > .libs/libzookeeper_st.exp
libtool: link: /bin/grep -E -e "(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|zerror|is_unrecoverable)" ".libs/libzookeeper_st.exp" > ".libs/libzookeeper_st.expT"
libtool: link: mv -f ".libs/libzookeeper_st.expT" ".libs/libzookeeper_st.exp"
libtool: link: echo "{ global:" > .libs/libzookeeper_st.ver
libtool: link: cat .libs/libzookeeper_st.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libzookeeper_st.ver
libtool: link: echo "local: *; };" >> .libs/libzookeeper_st.ver
libtool: link: gcc -shared -fPIC -DPIC -Wl,--whole-archive ./.libs/libzkst.a ./.libs/libhashtable.a -Wl,--no-whole-archive -lm -O2 -Wl,-soname -Wl,libzookeeper_st.so.2 -Wl,-version-script -Wl,.libs/libzookeeper_st.ver -o .libs/libzookeeper_st.so.2.0.0
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `\033' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `3' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: ignoring invalid character `5' in script
/usr/bin/ld:.libs/libzookeeper_st.ver:2: syntax error in VERSION script
collect2: error: ld returned 1 exit status
make[1]: *** [libzookeeper_st.la] Error 1
make[1]: Leaving directory `/home/ubuntu/Desktop/workspace/installs/zookeeper-3.4.6/src/c'
make: *** [all] Error 2
So I started looking (backwards from point of error) at the files being generated by libtool and there is a grep command which is screwing things up.
The output of the following command looks good:
$ /usr/bin/nm -B ./.libs/libzkst.a ./.libs/libhashtable.a | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /bin/sed 's/.* //' | sort | uniq > .libs/libzookeeper_st.exp
$ head .libs/libzookeeper_st.exp
deallocate_ACL
deallocate_ACL_vector
deallocate_AuthPacket
deallocate_Buffer
deallocate_CheckVersionRequest
But, when /bin/grep is applied, the output has erroneous color codes:
$ /bin/grep -E -e "(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|zerror|is_unrecoverable)" ".libs/libzookeeper_st.exp" > ".libs/libzookeeper_st.expT"
$ head .libs/libzookeeper_st.expT
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KACL
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KACL_vector
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KAuthPacket
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KBuffer
ESC[1;35;40mESC[Kdeallocate_ESC[mESC[KCheckVersionRequest
The funny thing is that if I use /bin/grep --color=auto instead of /bin/grep, things look fine.
So basically I ended up exporting --color=auto to GREP_OPTIONS which was previously set to --color=always:
$ echo $GREP_OPTIONS
--color=always
$ export GREP_OPTIONS='--color=auto'
And voila! Things worked!

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.

cannot install ffi gem

I'm trying to do bundle install in Windows 7 x64, but get errors while installing native extensions for ffi gem. My Gemfile has no ffi gem. The only dependency is in 'capybara'.
The second strange thing is that capybara is mentioned in my Gemfile for "test" environment only, but when I do "bundle install" the development environment should be used. Why does it parse the "test" section?
source 'http://rubygems.org'
gem 'rake', '0.9.2.2'
gem 'rails', '3.2.1'
...
group :test do
if RUBY_PLATFORM =~ /(win32|w32)/
gem 'win32console'
end
...
gem 'capybara'
...
end
I can install the previous version of ffi, but capybara needs the new one.
Error text:
Installing ffi (1.0.11) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/Ruby193/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
generating ffi_c-i386-mingw32.def
Configuring libffi
make -C "/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi"
make[1]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/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/in
stall -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/i
nstall -c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKEINFO=/bin/sh /c/Ruby193/lib/
ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/missing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTF
LAGS=" "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=c:/program files (x86)/mingw/mingw32/bin/ld.exe" "NM=/c/Program Files
(x86)/MinGW/bin/nm" "RANLIB=ranlib" "DESTDIR=" all-recursive
make[2]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi'
Making all in include
make[3]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/include'
Making all in testsuite
make[3]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/testsuite'
Making all in man
make[3]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/man'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/man'
make[3]: Entering directory `/c/Ruby193/lib/ruby/gems/1.9.1/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 -fe
xceptions -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 -fe
xceptions -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 -fe
xceptions -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 -fe
xceptions -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 -fe
xceptions -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_a
pi.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 -fe
xceptions -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 -fe
xceptions -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 -Iinc
lude -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 sr
c/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_r
aw_api.lo src/closures.lo src/x86/ffi.lo src/x86/win32.lo
libtool: link: gcc -o .libs/libffi.dll.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 `echo "X" | /usr/bin/
sed -e 1s/^X// -e 's/ -lc$//'` -link -dll
c:/program files (x86)/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -link
collect2: ld returned 1 exit status
make[3]: *** [libffi.la] Error 1
make[3]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi'
make: *** ["/c/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi"/.libs/libffi_convenience.a] Error 2
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.11 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/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.
Check out this troubleshooting guide at Rubyinstaller wiki: https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-gems_fails_comspec_autorun. Could be of any help.
The 1.3.1 version of FFI solved this. Still can't install Capybara.

issue in installing Sphinx on mac

Compiling the code using :-
LDFLAGS="-arch x86_64" ./configure --prefix=/usr/local --with-mysql=/usr/local/mysql-5.5.9-osx10.6-x86_64
O/p for the compilation.
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating libstemmer_c/Makefile
config.status: creating sphinx.conf.dist
config.status: creating sphinx-min.conf.dist
config.status: creating config/config.h
config.status: executing depfiles commands
configuration done
------------------
You can now run 'make' to build Sphinx binaries,
and then run 'make install' to install them.
O/p for make:--
g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR="\"/usr/local/etc\"" -I/usr/local/include -I/usr/local/mysql-5.5.9-osx10.6-x86_64/include -Os -g -fno-common -fno-strict-aliasing -arch x86_64 -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT tests.o -MD -MP -MF .deps/tests.Tpo -c -o tests.o tests.cpp
mv -f .deps/tests.Tpo .deps/tests.Po
g++ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -arch x86_64 -o tests tests.o libsphinx.a -L/usr/local/mysql-5.5.9-osx10.6-x86_64/lib -lmysqlclient -lpthread -lodbc -lz -lexpat -L/usr/local/lib -lpthread
Making all in test
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all-am'.
O/p for make install:--
Making install in src
if test -d ../.svn; then svn info .. --xml | perl svnxrev.pl; fi;
make install-am
test -z "/usr/local/bin" || ../config/install-sh -c -d "/usr/local/bin"
/usr/bin/install -c 'indexer' '/usr/local/bin/indexer'
/usr/bin/install -c 'searchd' '/usr/local/bin/searchd'
/usr/bin/install -c 'search' '/usr/local/bin/search'
/usr/bin/install -c 'spelldump' '/usr/local/bin/spelldump'
/usr/bin/install -c 'indextool' '/usr/local/bin/indextool'
make[3]: Nothing to be done for `install-data-am'.
Making install in test
make[1]: Nothing to be done for `install'.
test -z "/usr/local/etc" || config/install-sh -c -d "/usr/local/etc"
/usr/bin/install -c -m 644 'sphinx.conf.dist' '/usr/local/etc/sphinx.conf.dist'
/usr/bin/install -c -m 644 'sphinx-min.conf.dist' '/usr/local/etc/sphinx-min.conf.dist'
/usr/bin/install -c -m 644 'example.sql' '/usr/local/etc/example.sql'
make install-data-hook
mkdir -p /usr/local/var/data && mkdir -p /usr/local/var/log
If I try to run thinking sphinx server:-
rake thinking_sphinx:index
(in /Users/mohit/projects/urbanAdda)
sh: line 1: 26356 Trace/BPT trap indexer 2>&1
sh: line 1: 26359 Trace/BPT trap indexer 2>&1
Sphinx cannot be found on your system. You may need to configure the following
settings in your config/sphinx.yml file:
* bin_path
* searchd_binary_name
* indexer_binary_name
For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html
sh: line 1: 26361 Trace/BPT trap indexer 2>&1
Generating Configuration to /Users/mohit/projects/urbanAdda/config/development.sphinx.conf
dyld: Library not loaded: libmysqlclient.16.dylib
Referenced from: /usr/local/bin/indexer
Reason: image not found
sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql-5.5.9-osx10.6-x86_64//lib/libmysqlclient.16.dylib /usr/local/bin/indexer
and
sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql-5.5.9-osx10.6-x86_64//lib/libmysqlclient.16.dylib /usr/local/bin/searchd
solved my problem
The dynamic linker cannot find the mysqlclient library.
Try to add the path where it's installed to the DYLD_LIBRARY_PATH environment variable.
And when/if you plan to rebuild it, add "-Wl,-rpath /path/to/lib" to LDFLAGS.

Resources