------- Additional Comments From wilson at gcc dot gnu dot org 2005-07-26
23:31 -------
I saw this problem on an x86-freebsd machine yesterday.
The problem is that $target/libjava/libgcj.spec has this
*lib: -lgcj -lm /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib
%{!pthread: %{!shared: %eUnder this configuration, the user must provide
-pthread when linking.}} %(libgcc) %(liborig)
This causes the strange ld error.
The underlying problem seems to be that I have a copy of libiconv in
/usr/local/lib. The Makefile has this line
LIBICONV = /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib
libgcj.spec is built from libgcj.spec.in, which causes LIBICONV to be
substituted into the lib spec. And now we have gcc options (-Wl) in a linker
spec (lib), which doesn't work.
I didn't look for a solution. I just fixed it by hand. When your libjava build
fails, edit the $target/libjava/libgcj.spec file to delete both spurious
instances of "-Wl,", continue the build, and this time it will finish
successfully.
However, I did then get a lot of libjava failures, but I didn't care about them
at the time, so I ignored them. I don't know if they are related to this issue,
or whether it was a temporary snapshot instability problem.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-07-26 23:31:49
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21206