public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/42750]  New: OpenMP/gcc build fails with /usr/local/lib/libgmp.so: could not read symbols: File in wrong format
@ 2010-01-14 21:35 David dot Biesack at sas dot com
  2010-01-14 21:39 ` [Bug libgcj/42750] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 4+ messages in thread
From: David dot Biesack at sas dot com @ 2010-01-14 21:35 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libgcj/42750] OpenMP/gcc build fails with /usr/local/lib/libgmp.so: could not read symbols: File in wrong format
  2010-01-14 21:35 [Bug other/42750] New: OpenMP/gcc build fails with /usr/local/lib/libgmp.so: could not read symbols: File in wrong format David dot Biesack at sas dot com
@ 2010-01-14 21:39 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-01-14 21:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2010-01-14 21:39 -------
This is related to PR 39747.  The issue is that you need both 32bit and 64bit
libgmp for the target if you are compiling libjava also.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|other                       |libgcj
  GCC build triplet| x86_64-redhat-linux        |x86_64-redhat-linux
   GCC host triplet| x86_64-redhat-linux        |x86_64-redhat-linux
 GCC target triplet| x86_64-redhat-linux        |x86_64-redhat-linux
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libgcj/42750] OpenMP/gcc build fails with /usr/local/lib/libgmp.so: could not read symbols: File in wrong format
       [not found] <bug-42750-4@http.gcc.gnu.org/bugzilla/>
  2011-05-26 19:22 ` fchen0000 at gmail dot com
@ 2012-06-05 19:45 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-06-05 19:45 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ravish_nayak2003 at yahoo
                   |                            |dot co.in

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-06-05 19:44:29 UTC ---
*** Bug 53583 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libgcj/42750] OpenMP/gcc build fails with /usr/local/lib/libgmp.so: could not read symbols: File in wrong format
       [not found] <bug-42750-4@http.gcc.gnu.org/bugzilla/>
@ 2011-05-26 19:22 ` fchen0000 at gmail dot com
  2012-06-05 19:45 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 4+ messages in thread
From: fchen0000 at gmail dot com @ 2011-05-26 19:22 UTC (permalink / raw)
  To: gcc-bugs

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

Feng Chen <fchen0000 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fchen0000 at gmail dot com

--- Comment #2 from Feng Chen <fchen0000 at gmail dot com> 2011-05-26 19:17:33 UTC ---
Would some1 be able to point to me how to build (and keep) both 32bit and 64bit
version of libgmp in my system so the gcc can be built?
btw, I do not have root access for this particular machine so I always use
"./configure --prefix=$HOME/local"

(In reply to comment #1)
> This is related to PR 39747.  The issue is that you need both 32bit and 64bit
> libgmp for the target if you are compiling libjava also.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-05 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-14 21:35 [Bug other/42750] New: OpenMP/gcc build fails with /usr/local/lib/libgmp.so: could not read symbols: File in wrong format David dot Biesack at sas dot com
2010-01-14 21:39 ` [Bug libgcj/42750] " pinskia at gcc dot gnu dot org
     [not found] <bug-42750-4@http.gcc.gnu.org/bugzilla/>
2011-05-26 19:22 ` fchen0000 at gmail dot com
2012-06-05 19:45 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).