Updating GCC, received errors during 'make' - gcc

I'm trying to update GCC on a computer running RHEL6.6-server edition in my lab. I keep receiving errors after running the 'make' command. Here's some of the code:
/usr/bin/ld: /usr/local/GCC-5.1.0/gcc-build/./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
/usr/local/GCC-5.1.0/gcc-build/./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 `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/native/jni/java-math'
make[6]: Entering directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/native/jni'
/bin/sh ../../scripts/check_jni_methods.sh
make[6]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/native/jni'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/native/jni'
make[5]: Entering directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/native'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/native'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/native'
Making all in resource
make[4]: Entering directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/resource'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/resource'
Making all in scripts
make[4]: Entering directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/scripts'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/scripts'
Making all in tools
make[4]: Entering directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/tools'
make all-am
make[5]: Entering directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/tools'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/tools'
make[4]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath/tools'
make[4]: Entering directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath'
true DO=all multi-do # make
make[4]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava/classpath'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build/x86_64-unknown-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/usr/local/GCC-5.1.0/gcc-build'
make: *** [all] Error 2
I saw another question on here where two of the poster's errors were the same ones I have and the answer was to install makeinfo in the texinfo package. I installed that package and the above code is what I received after running the 'make' command again.
I'm not sure what error libjavamath.la is, but I'm assuming it's a file that I need in order to complete 'make.' The other error is all-recursive and I have no clue what it could mean.

Follow the simple instructions at https://gcc.gnu.org/wiki/InstallingGCC and unless you actually need the Java compiler you should configure with --enable-languages=c,c++,fortran (or whatever set of languages you do want, without Java).
libjavamath.la is a library built as part of the GCJ Java compiler, but if you don't care about using GCJ then you can (and IMHO should) configure GCC without it. That will solve any problems that happen when building libjavamath.la, because it won't be built.

I configured as:
./configure --disable-shared --enable-languages=all --enable-threads=posix --enable-libgomp --enable-lto --enable-tls --with-fpmath=sse --disable-multilib --build=x86_64-redhat-linux --with-system-zlib --enable-gnu-unique-object --with-mpc=/usr/local/ --with-java-home=/usr/java/jdk1.7.0_79/ --enable-java-awt=gtk --enable-__cxa_atexit
You should try it.

Related

Compile OpenVswitch in Odroid XU4 has error

I am doing OpenVswitch compile in Odroid XU4 with the kernel module.
I did execute the 'boot.sh' file and configure it with the Linux kernel module.
But When I make OpenVswitch, there is an error when building the datapath kernel module.
Here is the full log.
odroid#odroid:~/Downloads/openvswitch-2.15.4$ make
make all-recursive
make[1]: Entering directory '/home/odroid/Downloads/openvswitch-2.15.4'
Making all in datapath
make[2]: Entering directory '/home/odroid/Downloads/openvswitch-2.15.4/datapath'
Making all in linux
make[3]: Entering directory '/home/odroid/Downloads/openvswitch-2.15.4/datapath/linux'
make -C /lib/modules/5.4.167+/build M=/home/odroid/Downloads/openvswitch-2.15.4/datapath/linux modules
make[4]: Entering directory '/home/odroid/linux'
Building modules, stage 2.
MODPOST 6 modules
ERROR: "geneve_dev_create_fb" [/home/odroid/Downloads/openvswitch-2.15.4/datapath/linux/vport-geneve.ko] undefined!
make[5]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[4]: *** [Makefile:1650: modules] Error 2
make[4]: Leaving directory '/home/odroid/linux'
make[3]: *** [Makefile.main:71: default] Error 2
make[3]: Leaving directory '/home/odroid/Downloads/openvswitch-2.15.4/datapath/linux'
make[2]: *** [Makefile:579: all-recursive] Error 1
make[2]: Leaving directory '/home/odroid/Downloads/openvswitch-2.15.4/datapath'
make[1]: *** [Makefile:5251: all-recursive] Error 1
make[1]: Leaving directory '/home/odroid/Downloads/openvswitch-2.15.4'
make: *** [Makefile:2996: all] Error 2

FLINT/C installation on Arch

I'm trying to install FLINT/C lib on Arch for learning Modern Cryptography in C. All my dependencies are fulfilled per se and the only thing left to do is run make && make install and ld is generating errors :
make[1]: Entering directory '/home/venine/Downloads/flint-2.4.5'
make[2]: Entering directory '/home/venine/Downloads/flint-2.4.5/ulong_extras'
CC ../build/ulong_extras/../ulong_extras.lo
/usr/bin/ld: -r and -pie may not be used together
collect2: error: ld returned 1 exit status
make[2]: *** [../Makefile.subdirs:55:
../build/ulong_extras/../ulong_extras.lo] Error 1
make[2]: Leaving directory '/home/venine/Downloads/flint- 2.4.5/ulong_extras'
make[1]: *** [Makefile:135: libflint.so] Error 2
make[1]: Leaving directory '/home/venine/Downloads/flint-2.4.5'
make: *** [Makefile:161: library] Error 2`
Can someone tell me what's going wrong and how do I create a proper make file
This appears to be FLINT 2 Issue#400. The bug also describes a change in the makefile.

Buiding GCC, Make failure

I am building gcc-5 and getting the following make problem
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/cdi/Local
/gcc-release/objdir/x86_64-unknown-linux-gnu
/32/libjava/classpath'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/cdi/Local/gcc-release
/objdir/x86_64-unknown-linux-gnu/32/libjava'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/home/cdi/Local/gcc-release
/objdir/x86_64-unknown-linux-gnu/libjava'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/home/cdi/Local/gcc-release
/objdir/x86_64-unknown-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/home/cdi/Local/gcc-release
/objdir'
make: *** [all] Error 2
I investigated if there is a more descriptive make error at an earlier stage, however, I did not find anything.

trying to build rpm, receive ld error

I'm trying to install squid from source.
I issue the command make but it gets this error at the end:
/usr/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status
make[3]: *** [basic_ncsa_auth] Error 1
make[3]: Leaving directory `/root/squid-3.4.6/helpers/basic_auth/NCSA'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/squid-3.4.6/helpers/basic_auth'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/squid-3.4.6/helpers'
make: *** [all-recursive] Error 1
Any ideas how to solve this?
You do not have the OpenSSL development toolkit installed.
yum install openssl

error during gcc 4.7.3 compilation

I am trying to compile local version of gcc 4.7.3 on the cluster.
For configuration:
./configure --prefix=$HOME/opt/gcc-4.7.3 --with-gmp=$HOME/opt/gmp --with-mpfr=$HOME/opt/mpfr --with-mpc=$HOME/opt/mpc --with-libelf=$HOME/opt/libelf
while compiling I got:
/home/users/didymos/opt/gmp/lib/libgmp.a(pprime_p.o):(.text+0x448):
undefined reference to `__multi3'
/home/users/didymos/opt/gmp/lib/libgmp.a(mod_1.o):(.text+0x158):
undefined reference to `__multi3'
/home/users/didymos/opt/gmp/lib/libgmp.a(mod_1.o):(.text+0x1b8):
undefined reference to `__multi3'
/home/users/didymos/opt/gmp/lib/libgmp.a(mod_1.o):(.text+0x358):
undefined reference to `__multi3'
/home/users/didymos/opt/gmp/lib/libgmp.a(pre_mod_1.o):(.text+0x74):
undefined reference to `__multi3'
/home/users/didymos/opt/gmp/lib/libgmp.a(mod_1_1.o):(.text+0x60): more
undefined references to `__multi3' follow
collect2: error: ld returned 1 exit status
make[8]: * [libjavamath.la] Error 1
make[8]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/libjava/classpath/native/jni/java-math'
make[7]: * [all-recursive] Error 1
make[7]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/libjava/classpath/native/jni'
make[6]: * [all-recursive] Error 1
make[6]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/libjava/classpath/native'
make[5]: * [all-recursive] Error 1
make[5]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/libjava/classpath'
make[4]: * [all-recursive] Error 1
make[4]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/libjava'
make[3]: * [multi-do] Error 1
make[3]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/libjava'
make[2]: * [all-multi] Error 2
make[2]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/libjava'
make[1]: * [all-target-libjava] Error 2
make[1]: * Waiting for unfinished jobs....
libtool: link: ranlib .libs/libgfortran.a
libtool: link: ( cd ".libs" && rm -f "libgfortran.la" && ln -s
"../libgfortran.la" "libgfortran.la" )
make[6]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/nof/libgfortran'
make[5]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/32/nof/libgfortran'
make[4]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/libgfortran'
make[3]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/libgfortran'
make[2]: Leaving directory
`/home/users/didymos/opt/gcc-4.3.7-scratch/powerpc64-unknown-linux-gnu/libgfortran'
make[1]: Leaving directory `/home/users/didymos/opt/gcc-4.3.7-scratch'
make: * [all] Error 2
Any ideas?
Thanks
Can you check that libgmp depends on? If libgmp depends on a library A, then most likely the undefined symbols would be in A.
If you have manually compiled libgmp from source, Can you add the configure command in the question?

Resources