[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Oddity when linking
From: |
Casey Marshall |
Subject: |
Oddity when linking |
Date: |
Sat, 21 Feb 2004 21:03:49 -0800 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) |
Hi.
I've been trying to compile Kaffe CVS and reach a problem when the
native parts of the class library are linked. The end of the compile
looks like this:
---
/bin/sh ../../../libtool --mode=link gcc -g -O2 -Wall -Wstrict-prototypes -o
libnative.la -rpath /opt/kaffe-cvs/jre/lib/i386 -module -release 1.1.x-cvs
-export-symbols-regex "^([Jj]ava|kaffe)_" ByteToCharDefault.lo
ByteToCharIconv.lo CharToByteDefault.lo CharToByteIconv.lo ObjectInputStream.lo
Class.lo ClassLoader.lo Compiler.lo Double.lo Float.lo Math.lo MemoryAdvice.lo
NativeLibrary.lo Object.lo PrimordialClassLoader.lo Runtime.lo String.lo
System.lo Thread.lo ThreadStack.lo Throwable.lo UNIXProcess.lo ZipFile.lo
Array.lo Constructor.lo Field.lo Method.lo DateFormat.lo TestNative.lo
Arrays.lo TimeZone.lo -lm
rm -fr .libs/libnative.la .libs/libnative.* .libs/libnative-1.1.x-cvs.*
generating symbol list for `libnative.la'
/usr/bin/nm -B ByteToCharDefault.lo ByteToCharIconv.lo CharToByteDefault.lo
CharToByteIconv.lo ObjectInputStream.lo Class.lo ClassLoader.lo Compiler.lo
Double.lo Float.lo Math.lo MemoryAdvice.lo NativeLibrary.lo Object.lo
PrimordialClassLoader.lo Runtime.lo String.lo System.lo Thread.lo
ThreadStack.lo Throwable.lo UNIXProcess.lo ZipFile.lo Array.lo Constructor.lo
Field.lo Method.lo DateFormat.lo TestNative.lo Arrays.lo TimeZone.lo | sed -n
-e 's/^.*[ ]\([ABCDGISTW][ABCDGISTW]*\)[ ][
]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' | sed 's/.* //' | sort | uniq >
.libs/libnative.exp
egrep -e "^([Jj]ava|kaffe)_" ".libs/libnative.exp" > ".libs/libnative.expT"
mv -f ".libs/libnative.expT" ".libs/libnative.exp"
gcc "{ global:" > .libs/libnative.ver
gcc: { global:: No such file or directory
gcc: no input files
make[2]: *** [libnative.la] Error 1
make[2]: Leaving directory `/home/rsdio/src/kaffe/libraries/clib/native'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rsdio/src/kaffe/libraries/clib'
make: *** [all-recursive] Error 1
---
I've seen a handful of bug reports that end like this that come up
when searching for `gcc { global: ...' on Google.
The offending part of libtool (Kaffe is using 1.8.2 right now) appears
to be this, on line 514 (if that is meaningful):
---
# Mandrake: (gc) It's bad to link C++ code with GCC, so we need to use the
compiler name if provided
if test "$mode" = link && test -n "$archive_cmds" && test -x "/usr/bin/perl";
then
case $nonopt in
*cc | *++ | gcc* | *-gcc* | egcs*)
archive_cmds=`echo $archive_cmds | perl -pe 's/^\S+\s+//'`
archive_cmds="$nonopt $archive_cmds"
archive_expsym_cmds=`echo $archive_expsym_cmds | perl -pe
's/^\S+\s+//'`
archive_expsym_cmds="$nonopt $archive_expsym_cmds"
esac
fi
---
This looks almost certainly wrong. `archive_expsym_cmds' is set to
this:
---
archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >>
\$output_objdir/\$libname.ver~
\$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname
\$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
---
So to me it looks like the above is assuming that the first word of
`archive_expsym_cmds' is something that links files, so stuffing gcc
($nonopt) in its place makes sense. Has `archive_expsym_cmds' changed
recently to make this not true?
Cheers.
--
Casey Marshall || address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Oddity when linking,
Casey Marshall <=