Getting stuck installing OpenGrm NGram as part of OpenFST - macos

I'm trying to install OpenGrm NGram on my Mac, but I'm getting stuck while running make. Specifically, the process gets hung on the following command:
libtool: compile: g++ -DHAVE_CONFIG_H -I./../include -I/usr/local/include/
-std=c++11 -MT hist-arc.lo -MD -MP -MF .deps/hist-arc.Tpo -c hist-arc.cc
-fno-common -DPIC -o .libs/hist-arc.o
I already have OpenFST and Thrax installed.

Related

EC2 GRPC install hangs after 12 hours still no install

I'm pretty sure it's because I am using t2.nano and not something a little more beefy.
But I have used laravel forge to provision an ec2 server, I can't deploy my application however because I need to install GRPC.
I have followed these instructions: https://cloud.google.com/php/grpc#using-pecl
And when I run: sudo pecl install grpc it runs for around 10 mins and then just gets stuck.
Seems to be running the same thing over and over again, can't quite workout the full stack trace or more importantly where it begins, but I'll post below.
DGRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1 -DGRPC_XDS_USER_AGENT_NAME_SUFFIX=\"PHP\" -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX=\"1.41.0\" -c /tmp/pear/temp/grpc/src/core/ext/filters/client_channel/channel_connectivity.cc -fPIC -DPIC -o src/core/ext/filters/client_channel/.libs/channel_connectivity.o
/bin/bash /tmp/pear/temp/pear-build-rootRBppUP/grpc-1.41.0/libtool --mode=compile g++ -I. -I/tmp/pear/temp/grpc -I/tmp/pear/temp/pear-build-rootRBppUP/grpc-1.41.0/include -I/tmp/pear/temp/pear-build-rootRBppUP/grpc-1.41.0/main -I/tmp/pear/temp/grpc -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -I/tmp/pear/temp/grpc/include -I/tmp/pear/temp/grpc/src/core/ext/upb-generated -I/tmp/pear/temp/grpc/src/core/ext/upbdefs-generated -I/tmp/pear/temp/grpc/src/php/ext/grpc -I/tmp/pear/temp/grpc/third_party/abseil-cpp -I/tmp/pear/temp/grpc/third_party/address_sorting/include -I/tmp/pear/temp/grpc/third_party/boringssl-with-bazel/src/include -I/tmp/pear/temp/grpc/third_party/re2 -I/tmp/pear/temp/grpc/third_party/upb -I/tmp/pear/temp/grpc/third_party/xxhash -DHAVE_CONFIG_H -std=c++11 -fno-exceptions -fno-rtti -g -O2 -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOUR
CE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DGRPC_ARES=0 -DGRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1 -DGRPC_XDS_USER_AGENT_NAME_SUFFIX='"PHP"' -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"1.41.0"' -c /tmp/pear/temp/grpc/src/core/ext/filters/client_channel/client_channel.cc -o src/core/ext/filters/client_channel/client_channel.lo
libtool: compile: g++ -I. -I/tmp/pear/temp/grpc -I/tmp/pear/temp/pear-build-rootRBppUP/grpc-1.41.0/include -I/tmp/pear/temp/pear-build-rootRBppUP/grpc-1.41.0/main -I/tmp/pear/temp/grpc -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -I/tmp/pear/temp/grpc/include -I/tmp/pear/temp/grpc/src/core/ext/upb-generated -I/tmp/pear/temp/grpc/src/core/ext/upbdefs-generated -I/tmp/pear/temp/grpc/src/php/ext/grpc -I/tmp/pear/temp/grpc/third_party/abseil-cpp -I/tmp/pear/temp/grpc/third_party/address_sorting/include -I/tmp/pear/temp/grpc/third_party/boringssl-with-bazel/src/include -I/tmp/pear/temp/grpc/third_party/re2 -I/tmp/pear/temp/grpc/third_party/upb -I/tmp/pear/temp/grpc/third_party/xxhash -DHAVE_CONFIG_H -std=c++11 -fno-exceptions -fno-rtti -g -O2 -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DGRPC_ARES=0 -
DGRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1 -DGRPC_XDS_USER_AGENT_NAME_SUFFIX=\"PHP\" -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX=\"1.41.0\" -c /tmp/pear/temp/grpc/src/core/ext/filters/client_channel/client_channel.cc -fPIC -DPIC -o src/core/ext/filters/client_channel/.libs/client_channel.o
If there are any logs I can grab please drop the command in to tail or cat and I'll attach them to the question!
Upgrade to a bigger tier than the t2.nano and it should work. I think it's because of the RAM limit. I had the same issue with some instances in Digital Ocean.

iruby kernel can't install rbczmq

Just installed the iRuby kernel following the istructions but when i do jupyter-notebook command and start a new notebook kernel dies and there is a problem reported on the terminal about libczmq:
[I 18:05:11.900 NotebookApp] Kernel started: bcb56cdd-964a-4dae-8a40-76dbcbe7e418
WARNING: ::CZMQ::FFI is not available without libczmq.
Unable to load this gem. The libzmq library (or DLL) could not be found.
If this is a Windows platform, make sure libzmq.dll is on the PATH.
If the DLL was built with mingw, make sure the other two dependent DLLs,
libgcc_s_sjlj-1.dll and libstdc++6.dll, are also on the PATH.
For non-Windows platforms, make sure libzmq is located in this search path:
["/var/lib/gems/2.3.0/gems/ffi-rzmq-core-1.0.6/lib/ffi-rzmq-core/../../ext/libzmq.so", "/home/randomx/anaconda3/bin/libzmq.so", "/home/randomx/bin/libzmq.so", "/home/randomx/.local/bin/libzmq.so", "/usr/local/sbin/libzmq.so", "/usr/local/bin/libzmq.so", "/usr/sbin/libzmq.so", "/usr/bin/libzmq.so", "/sbin/libzmq.so", "/bin/libzmq.so", "/usr/games/libzmq.so", "/usr/local/games/libzmq.so", "/snap/bin/libzmq.so", "/usr/lib/libzmq.so", "/usr/local/lib/libzmq.so", "/opt/local/lib/libzmq.so", "/usr/lib64/libzmq.so"]
You should install cztop, rbczmq or ffi_rzmq before running iruby notebook. See README.
F, [2017-03-26T18:05:12.031981 #13088] FATAL -- : Kernel died: uninitialized constant IRuby::Kernel::Session
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/kernel.rb:18:in `initialize'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `new'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `run_kernel'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:34:in `run'
/var/lib/gems/2.3.0/gems/iruby-0.3/bin/iruby:5:in `<top (required)>'
/usr/local/bin/iruby:23:in `load'
/usr/local/bin/iruby:23:in `<main>'
/var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/kernel.rb:18:in `initialize': uninitialized constant IRuby::Kernel::Session (NameError)
from /var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `new'
from /var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `run_kernel'
from /var/lib/gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:34:in `run'
from /var/lib/gems/2.3.0/gems/iruby-0.3/bin/iruby:5:in `<top (required)>'
from /usr/local/bin/iruby:23:in `load'
from /usr/local/bin/iruby:23:in `<main>'
[I 18:05:14.903 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING: ::CZMQ::FFI is not available without libczmq.
So I installed cztop and ffi_rzmq but when i go to install rbczmq I got an error install message like this:
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating src/libczmq.pc
config.status: creating addons/Makefile
config.status: creating src/platform.h
config.status: executing depfiles commands
config.status: executing libtool commands
"make all && make install"
Making all in src
make[1]: ingresso nella directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
make all-am
make[2]: ingresso nella directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zauth.lo -MD -MP -MF .deps/zauth.Tpo -c -o zauth.lo zauth.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zauth.lo -MD -MP -MF .deps/zauth.Tpo -c zauth.c -o zauth.o
mv -f .deps/zauth.Tpo .deps/zauth.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zbeacon.lo -MD -MP -MF .deps/zbeacon.Tpo -c -o zbeacon.lo zbeacon.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zbeacon.lo -MD -MP -MF .deps/zbeacon.Tpo -c zbeacon.c -o zbeacon.o
mv -f .deps/zbeacon.Tpo .deps/zbeacon.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcert.lo -MD -MP -MF .deps/zcert.Tpo -c -o zcert.lo zcert.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcert.lo -MD -MP -MF .deps/zcert.Tpo -c zcert.c -o zcert.o
mv -f .deps/zcert.Tpo .deps/zcert.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcertstore.lo -MD -MP -MF .deps/zcertstore.Tpo -c -o zcertstore.lo zcertstore.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcertstore.lo -MD -MP -MF .deps/zcertstore.Tpo -c zcertstore.c -o zcertstore.o
mv -f .deps/zcertstore.Tpo .deps/zcertstore.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zchunk.lo -MD -MP -MF .deps/zchunk.Tpo -c -o zchunk.lo zchunk.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zchunk.lo -MD -MP -MF .deps/zchunk.Tpo -c zchunk.c -o zchunk.o
mv -f .deps/zchunk.Tpo .deps/zchunk.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zclock.lo -MD -MP -MF .deps/zclock.Tpo -c -o zclock.lo zclock.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zclock.lo -MD -MP -MF .deps/zclock.Tpo -c zclock.c -o zclock.o
mv -f .deps/zclock.Tpo .deps/zclock.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zconfig.lo -MD -MP -MF .deps/zconfig.Tpo -c -o zconfig.lo zconfig.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zconfig.lo -MD -MP -MF .deps/zconfig.Tpo -c zconfig.c -o zconfig.o
mv -f .deps/zconfig.Tpo .deps/zconfig.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zctx.lo -MD -MP -MF .deps/zctx.Tpo -c -o zctx.lo zctx.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zctx.lo -MD -MP -MF .deps/zctx.Tpo -c zctx.c -o zctx.o
mv -f .deps/zctx.Tpo .deps/zctx.Plo
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zdir.lo -MD -MP -MF .deps/zdir.Tpo -c -o zdir.lo zdir.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zdir.lo -MD -MP -MF .deps/zdir.Tpo -c zdir.c -o zdir.o
zdir.c: In function ‘zdir_new’:
zdir.c:156:9: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
int rc = readdir_r (handle, entry, &result);
^~~
In file included from ../include/czmq_prelude.h:257:0,
from ../include/czmq.h:31,
from zdir.c:35:
/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
zdir.c:159:13: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
rc = readdir_r (handle, entry, &result);
^~
In file included from ../include/czmq_prelude.h:257:0,
from ../include/czmq.h:31,
from zdir.c:35:
/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
cc1: all warnings being treated as errors
Makefile:774: set di istruzioni per l'obiettivo "zdir.lo" non riuscito
make[2]: *** [zdir.lo] Errore 1
make[2]: uscita dalla directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
Makefile:586: set di istruzioni per l'obiettivo "all" non riuscito
make[1]: *** [all] Errore 2
make[1]: uscita dalla directory "/var/lib/gems/2.3.0/gems/rbczmq-1.7.9/ext/czmq/src"
Makefile:414: set di istruzioni per l'obiettivo "all-recursive" non riuscito
make: *** [all-recursive] Errore 1
CZMQ compile error!
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.3
--with-system-libs
--without-system-libs
--with-system-libs
--without-system-libs
extconf failed, exit code 1
I also have installed libtool autogen autoconf automake but installation fails anyway..I got the last version of Kubuntu as os
What can I do? Thank you for help
Solved! I had to install the zeromq source from here
http://zeromq.org/intro:get-the-software

GCC doesn't find an existing header file

I am trying to compile pkcs11-helper under Cygwin with GCC. After configuring I called make. These are the last lines of its output:
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I/usr/include -g -O2 -MT _pkcs11h-crypto-openssl.lo -MD -MP -MF .deps/_pkcs11h-crypto-openssl.Tpo -c -o _pkcs11h-crypto-openssl.lo _pkcs11h-crypto-openssl.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I/usr/include -g -O2 -MT _pkcs11h-crypto-openssl.lo -MD -MP -MF .deps/_pkcs11h-crypto-openssl.Tpo -c _pkcs11h-crypto-openssl.c -DDLL_EXPORT -DPIC -o .libs/_pkcs11h-crypto-openssl.o
_pkcs11h-crypto-openssl.c:57:26: fatal error: openssl/x509.h: No such file or directory
Why doesn't GCC find my /usr/include/openssl/x509.h (which definitely exists)? As you can see I even passed -I/usr/include (there will be the same message without it).
This is the corresponding line 57 in _pkcs11h-crypto-openssl.c:
#include <openssl/x509.h>

gcc 4.9.2 build error on RHEL6

I'm trying to build gcc 4.9.2 on RHEL6, as follows:
unpack the source tarball (to ~/gcc-4.9.2)
in the source dir:
./contrib/download_prerequisites
create a separate build directory ~/gcc-4.9.2-build
in the build dir:
~/gcc-4.9.2/configure --prefix=/usr/local/gcc-4.9.2
make
This fails with:
make[6]: Entering directory `/root/gcc-4.9.2-build-try0/x86_64-unknown-linux-gnu/libjava/classpath/native/jni/java-math'
/bin/sh ../../../libtool --tag=CC --mode=compile /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/root/gcc-4.9.2/libjava/classpath/native/jni/java-math -I../../../include -I/root/gcc-4.9.2/libjava/classpath/include -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I/root/gcc-4.9.2/libjava/classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/include -g -O2 -MT gnu_java_math_GMP.lo -MD -MP -MF .deps/gnu_java_math_GMP.Tpo -c -o gnu_java_math_GMP.lo /root/gcc-4.9.2/libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c
libtool: compile: /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/root/gcc-4.9.2/libjava/classpath/native/jni/java-math -I../../../include -I/root/gcc-4.9.2/libjava/classpath/include -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I/root/gcc-4.9.2/libjava/classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/include -g -O2 -MT gnu_java_math_GMP.lo -MD -MP -MF .deps/gnu_java_math_GMP.Tpo -c /root/gcc-4.9.2/libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c -fPIC -DPIC -o .libs/gnu_java_math_GMP.o
mv -f .deps/gnu_java_math_GMP.Tpo .deps/gnu_java_math_GMP.Plo
/bin/sh ../../../libtool --tag=CC --mode=link /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/include -g -O2 -module -version-info 0:0:0 -no-undefined -lgmp -avoid-version -o libjavamath.la -rpath /usr/local/gcc-4.9.2/lib/../lib64/gcj-4.9.2-15 gnu_java_math_GMP.lo ../../../native/jni/classpath/jcl.lo -lrt
libtool: link: /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -shared .libs/gnu_java_math_GMP.o ../../../native/jni/classpath/.libs/jcl.o /root/gcc-4.9.2-build-try0/./gmp/.libs/libgmp.a -lrt -Wl,-soname -Wl,libjavamath.so -o .libs/libjavamath.so
/usr/bin/ld: /root/gcc-4.9.2-build-try0/./gmp/.libs/libgmp.a(mp_set_fns.o): relocation R_X86_64_32 against `__gmp_default_allocate' can not be used when making a shared object; recompile with -fPIC
/root/gcc-4.9.2-build-try0/./gmp/.libs/libgmp.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[6]: *** [libjavamath.la] Error 1
make[6]: Leaving directory `/root/gcc-4.9.2-build-try0/x86_64-unknown-linux-gnu/libjava/classpath/native/jni/java-math'
A little googling pointed me at the --disable-shared option, which sort of helped, but now:
in the build dir:
~/gcc-4.9.2/configure --prefix=/usr/local/gcc-4.9.2 --disable-shared
make
yielded a slightly different error:
make[8]: Entering directory `/root/gcc-4.9.2-build/x86_64-unknown-linux-gnu/32/libjava/classpath/native/jni/classpath'
/bin/sh ../../../libtool --tag=CC --mode=compile /root/gcc-4.9.2-build/./gcc/xgcc -B/root/gcc-4.9.2-build/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -m32 -DHAVE_CONFIG_H -I. -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I../../../include -I/root/gcc-4.9.2/libjava/classpath/include -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I/root/gcc-4.9.2/libjava/classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -fexceptions -fasynchronous-unwind-tables -g -O2 -m32 -MT jcl.lo -MD -MP -MF .deps/jcl.Tpo -c -o jcl.lo /root/gcc-4.9.2/libjava/classpath/native/jni/classpath/jcl.c
libtool: compile: not configured to build any kind of library
libtool: compile: See the libtool documentation for more information.
libtool: compile: Fatal configuration error.
make[8]: *** [jcl.lo] Error 1
make[8]: Leaving directory `/root/gcc-4.9.2-build/x86_64-unknown-linux-gnu/32/libjava/classpath/native/jni/classpath'
Adding the --enable-static option made no difference.
Any suggestions on what might be wrong?
BTW, gcc 4.9.1 gave the same errors.
System: Linux 2.6.32-431.29.2.el6.x86_64 #1 SMP Sun Jul 27 15:55:46 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
System is RHEL6, fully updated via Redhat, and has no custom RPMs that I know of.
Just completed building 4.9.2 on a CentOS 6.4 VM using 4.4.7 gcc. Ran into an out of space issue, which caused the build to fail, but once resolved, everything else went smoothly.
Looks like your build is failing in the Java side of town? Not sure if you need the Java support, so have you tried compiling just the c/c++ language support?
~/gcc-4.9.2/configure --enable-languages=c,c++ ...
I also don't require 32-bit binaries, so I add --disable-multilib to the list of configure parameters.

Why aren't debugging symbols being added to my output file?

I am trying to compile a project to run on an ARM board that I have. To use the debugger, I have to put debugging symbols in the resulting .elf file.
I configured everything and ran my makefile, which produced the following results:
arm-elf-gcc -x assembler-with-cpp -c -mcpu=arm7tdmi-s -g -gdwarf-2 -Wa,-amhls=src/crt.lst src/crt.S -o src/crt.o
arm-elf-gcc -c -mcpu=arm7tdmi-s -O0 -g -gdwarf-2 -mthumb-interwork -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm -Wa,-ahlms=src/main.lst -MD -MP -MF .dep/main.o.d -I . -I./inc src/main.c -o src/main.o
arm-elf-gcc -c -mcpu=arm7tdmi-s -O0 -g -gdwarf-2 -mthumb-interwork -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm -Wa,-ahlms=library/md5.lst -MD -MP -MF .dep/md5.o.d -I . -I./inc library/md5.c -o library/md5.o
arm-elf-gcc -c -mcpu=arm7tdmi-s -O0 -g -gdwarf-2 -mthumb-interwork -fomit-frame-pointer -Wall -Wstrict-prototypes -fverbose-asm -Wa,-ahlms=library/bignum.lst -MD -MP -MF .dep/bignum.o.d -I . -I./inc library/bignum.c -o library/bignum.o
arm-elf-gcc ./src/crt.o ./src/main.o ./library/md5.o ./library/bignum.o -mcpu=arm7tdmi-s -g -nostartfiles -T./prj/LPC2138_flash.ld -Wl,-Map=testFLASH.map,--cref,--no-warn-mismatch -nostdlib -L. -Wl,-static -ffunction-sections -Wl,--gc-sections -Wl,-s -fdata-sections -lc -lg -lnosys -o testFLASH.elf
I have put in the -g flags, but when I try to find debugging symbols, I get only :
C:\Users\stkerr\Code\EclipseWorkspace\LibraryWork>objdump -g testFLASH.elf
testFLASH.elf: file format elf32-little
This is further confirmed when I try to open the .elf file in my debugger, I get an error about the file not having debugging symbols.
Can anyone point to an error in my arm-elf-gcc calls or a flag that I am missing?
After poking around a little more in the documentation, the -Wl,-s is the problem.
It strips all symbols from the resulting executable, including the debugging information.

Resources