This is the mail archive of the gcc@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]

Re: Still failing to bootstrap on Solaris (CONFIG_SHELL doesn't help)


Alexandre Oliva <aoliva@redhat.com> writes:

> If linking with `.libs/libgcj.so -L.libs -lgcj' fails but `-L.libs
> -lgcj -lgcj' works, because the linker thinks they're two different
> libraries with the same SONAME in the former case and it notices
> they're the same library in the latter, it sounds like a linker bug to
> me.

but this is not what happens: the error only shows up if you have two
different files with the same SONAME, as can be seen e.g. in

	http://gcc.gnu.org/ml/java/2001-04/msg00129.html

ld: fatal: file /sw/test/gcc/SunOS/lib/gcc-lib/sparc-sun-solaris2.8/3.0/../../../libgcj.so: recording name `libgcj.so.2' matches that provided by file ./.libs/libgcj.so

Linking the same file twice only gets you a warning:

% gcc -o hello hello.c /usr/lib/libc.so -lc
ld: warning: file /usr/lib/libc.so: attempted multiple inclusion of file
ld: warning: file /usr/lib/libc.so: attempted multiple inclusion of file
% cp /usr/lib/libc.so .
% gcc -o hello hello.c libc.so -lc
ld: fatal: recording name conflict: file `libc.so' and file `/usr/lib/libc.so' provide identical dependency names: libc.so.1  (possible multiple inclusion of the same file)
ld: fatal: File processing errors. No output written to hello
collect2: ld returned 1 exit status

Looks correct to me.

	Rainer


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