This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/42750] New: OpenMP/gcc build fails with /usr/local/lib/libgmp.so: could not read symbols: File in wrong format


I did a svn checkout of the GOMP/OpenMP source
  dir
  155860
  svn://gcc.gnu.org/svn/gcc/trunk
  svn://gcc.gnu.org/svn/gcc

and build/installed recent versions of gmp, mpfr, mpc:
gmp-4.3.2       mpc-0.8.1  mpfr-2.4.2
in /usr/local

I configured gcc with 
 $ ./configure --with-gmp=/usr/local --with-mpfr=/usr/local
--with-mpc=/usr/local

My current gcc is 

Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)

I also did:

export LD_LIBRARY_PATH=/usr/local/lib
export LIBRARY_PATH=/usr/local/lib

I then started building gcc and it failed after a while:

/bin/sh ../../../libtool --tag=CC   --mode=compile
/usr/local/src/gomp/host-x86_64-unknown-linux-gnu/gcc/xgcc
-B/usr/local/src/gomp/host-x86_64-unknown-linux-gnu/gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include  -m32 -DHAVE_CONFIG_H -I.
-I../../../../../../.././libjava/classpath/native/jni/java-math
-I../../../include  -I../../../../../../.././libjava/classpath/include
-I../../../../../../.././libjava/classpath/native/jni/classpath
-I../../../../../../.././libjava/classpath/native/jni/native-lib  -W -Wall
-Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long 
-I/usr/include -g -O2  -m32 -MT gnu_java_math_GMP.lo -MD -MP -MF
.deps/gnu_java_math_GMP.Tpo -c -o gnu_java_math_GMP.lo
../../../../../../.././libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c
libtool: compile:  /usr/local/src/gomp/host-x86_64-unknown-linux-gnu/gcc/xgcc
-B/usr/local/src/gomp/host-x86_64-unknown-linux-gnu/gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include -m32 -DHAVE_CONFIG_H -I.
-I../../../../../../.././libjava/classpath/native/jni/java-math
-I../../../include -I../../../../../../.././libjava/classpath/include
-I../../../../../../.././libjava/classpath/native/jni/classpath
-I../../../../../../.././libjava/classpath/native/jni/native-lib -W -Wall
-Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long
-I/usr/include -g -O2 -m32 -MT gnu_java_math_GMP.lo -MD -MP -MF
.deps/gnu_java_math_GMP.Tpo -c
../../../../../../.././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
/usr/local/src/gomp/host-x86_64-unknown-linux-gnu/gcc/xgcc
-B/usr/local/src/gomp/host-x86_64-unknown-linux-gnu/gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include  -m32 -W -Wall
-Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long 
-I/usr/include -g -O2  -m32 -module -version-info 0:0:0 -no-undefined -lgmp
-avoid-version -m32 -o libjavamath.la -rpath /usr/local/lib/../lib/gcj-4.5.0-11
gnu_java_math_GMP.lo ../../../native/jni/classpath/jcl.lo 
libtool: link: /usr/local/src/gomp/host-x86_64-unknown-linux-gnu/gcc/xgcc
-B/usr/local/src/gomp/host-x86_64-unknown-linux-gnu/gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include  -m32 -shared 
.libs/gnu_java_math_GMP.o ../../../native/jni/classpath/.libs/jcl.o  
-Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib
/usr/local/lib/libgmp.so -lc  -m32 -m32 -m32   -Wl,-soname -Wl,libjavamath.so
-o .libs/libjavamath.so
/usr/local/lib/libgmp.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[8]: *** [libjavamath.la] Error 1
make[8]: Leaving directory
`/usr/local/src/gomp/x86_64-unknown-linux-gnu/32/libjava/classpath/native/jni/java-math'
make[7]: *** [all-recursive] Error 1
make[7]: Leaving directory
`/usr/local/src/gomp/x86_64-unknown-linux-gnu/32/libjava/classpath/native/jni'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory
`/usr/local/src/gomp/x86_64-unknown-linux-gnu/32/libjava/classpath/native'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory
`/usr/local/src/gomp/x86_64-unknown-linux-gnu/32/libjava/classpath'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
`/usr/local/src/gomp/x86_64-unknown-linux-gnu/32/libjava'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory
`/usr/local/src/gomp/x86_64-unknown-linux-gnu/libjava'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory
`/usr/local/src/gomp/x86_64-unknown-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/usr/local/src/gomp'
make: *** [all] Error 2

However, 'make check' when I built libgmp worked, so I believe the
libgmp.so is valid. checking the installed version shows:

# ldd /usr/local/lib/libgmp.so
        libc.so.6 => /lib64/libc.so.6 (0x00002b8f69b5d000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003a05c00000)
# nm /usr/local/lib/libgmp.so
00000000002515a0 d Linear_Congruential_Generator
00000000002516a0 d Mersenne_Twister_Generator
0000000000251680 d Mersenne_Twister_Generator_Noseed
0000000000251740 a _DYNAMIC
00000000002519d0 a _GLOBAL_OFFSET_TABLE_
                 U _IO_getc@@GLIBC_2.2.5
                 U _IO_putc@@GLIBC_2.2.5
                 w _Jv_RegisterClasses
....
00000000000477d0 t step
0000000000047940 t step
                 U strchr@@GLIBC_2.2.5
                 U strcpy@@GLIBC_2.2.5
                 U strlen@@GLIBC_2.2.5
0000000000048a20 r table.4538
0000000000047970 t unget
                 U ungetc@@GLIBC_2.2.5
                 U vfprintf@@GLIBC_2.2.5
                 U vsnprintf@@GLIBC_2.2.5
                 U vsprintf@@GLIBC_2.2.5
000000000004b720 r x.4549
000000000004b6c0 r x.4551
000000000004b7a0 r x.4551

So I'm not sure why this gcc build step failed, unable to read symbols.


-- 
           Summary: OpenMP/gcc build fails with /usr/local/lib/libgmp.so:
                    could not read symbols: File in wrong format
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: David dot Biesack at sas dot com
 GCC build triplet:  x86_64-redhat-linux
  GCC host triplet:  x86_64-redhat-linux
GCC target triplet:  x86_64-redhat-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42750


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]