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?
Related
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.
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.
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
I am trying to install The Scalable Parallel Random Number Generators Library (SPRNG) but I am having problems. The configure stage runs fine but when I try to make it I get the following output:
../../lib/libsprng.a(libsprng_a-communicate.o): In function `get_proc_info_mpi(int*, int*)':
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:13: undefined reference to `MPI_Comm_rank'
../../lib/libsprng.a(libsprng_a-communicate.o): In function `make_new_seed_mpi()':
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:28: undefined reference to `MPI_Comm_dup'
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:30: undefined reference to `MPI_Comm_rank'
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:31: undefined reference to `MPI_Comm_size'
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:36: undefined reference to `MPI_Bcast'
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:38: undefined reference to `MPI_Comm_free'
../../lib/libsprng.a(libsprng_a-communicate.o): In function `get_proc_info_mpi(int*, int*)':
/home/fangel/Downloads/sprng4.4/SRC/communicate.cpp:14: undefined reference to `MPI_Comm_size'
collect2: ld returned 1 exit status
make[4]: *** [check.clfg] Error 1
make[4]: Leaving directory `/home/fangel/Downloads/sprng4.4/check/lfg'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/fangel/Downloads/sprng4.4/check/lfg'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/fangel/Downloads/sprng4.4/check'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/fangel/Downloads/sprng4.4'
make: *** [all] Error 2
I guess this is related to a wrong configuration of MPI but I am not able to solve the problem. I would appreciate any help.
Thank you Hristo, it seems to go further after:
./configure CXX=mpicxx F77=mpif77
and changing to
#include
in communicate.cpp but I am still getting errors. This is the end of the current output:
check_flfg-check_genf.o: /home/fangel/Downloads/sprng4.4/check/lfg/F77/check_genf.F:218: more undefined references to `ffree_rng_' follow
check_flfg-check_genf.o: In function `test_generator':
/home/fangel/Downloads/sprng4.4/check/lfg/F77/check_genf.F:26: undefined reference to `fmake_new_seed_'
/home/fangel/Downloads/sprng4.4/check/lfg/F77/check_genf.F:27: undefined reference to `fmake_new_seed_'
collect2: ld returned 1 exit status
make[5]: *** [check.flfg] Error 1
make[5]: Leaving directory ` /home/fangel/Downloads/sprng4.4/check/lfg/F77'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory ` /home/fangel/Downloads/sprng4.4/check/lfg/F77'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory ` /home/fangel/Downloads/sprng4.4/check/lfg'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory ` /home/fangel/Downloads/sprng4.4/check'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/fangel/Downloads/sprng4.4'
make: *** [all] Error 2
Then I changed the end of all the lines in fwrap.h from " __ " to "_". The errors are different now. I am getting an error related to the path /home/steve/... which does not exist in my computer:
check_flcg-check_genf.o: In function `MAIN__':
/home/steve/sprng4.4/check/lcg/F77/<stdin>:26: undefined reference to `fmake_new_seed__'
However I was able to successfully make the programs of the folders TESTS and EXAMPLES. The problem is only in the folder check... I do not see how to move the path from /home/steve/... to the right path.
I am trying to install korundum on fedora 17. And during the $ make phase I got the following error:
In file included from /usr/include/ruby.h:32:0,
from Qt.cpp:49:
/usr/include/ruby/ruby.h:24:25: fatal error: ruby/config.h: No such file or directory
compilation terminated.
make[5]: *** [Qt.lo] Error 1
make[5]: Leaving directory `/home/n/Downloads/korundum-3.5.5/qtruby/rubylib/qtruby'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/n/Downloads/korundum-3.5.5/qtruby/rubylib/qtruby'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/n/Downloads/korundum-3.5.5/qtruby/rubylib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/n/Downloads/korundum-3.5.5/qtruby'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/n/Downloads/korundum-3.5.5'
make: *** [all] Error 2
How can solve this problem? I'm loosing my mind.
The error message suggests that you need the ruby dev files installed, but do not have them.