This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bootstrap won't link with GNU iconv
- To: GCC Bugs Mailing List <gcc-bugs at gcc dot gnu dot org>
- Subject: Re: bootstrap won't link with GNU iconv
- From: Tom Tromey <tromey at redhat dot com>
- Date: 26 Jun 2001 11:11:56 -0600
- Cc: Neil Bird <neil dot bird at uk dot thalesgroup dot com>
- References: <3B384692.F553A123@uk.thalesgroup.com>
- Reply-To: tromey at redhat dot com
>>>>> "Neil" == Neil Bird <neil.bird@uk.thalesgroup.com> writes:
Neil> I have Solaris 2.6's iconv.h in /usr/include (which I guess
Neil> configure is finding). I also have GNU's iconv installed in the
Neil> dest. dir of gcc (non-standard).
Interesting -- you're the second person with this same configuration.
Here's what happens: configure decides that iconv() exists in libc
(which is true). Then the code includes <iconv.h>, which in your case
defines things like this:
#define iconv_open libiconv_open
But since configure is still assuming that iconv and friends are in
libc, at link time -liconv is not used and link errors result.
This happens for both gcj and libgcj because both the compiler and the
runtime libraries can use iconv().
Neil> Is there anything I can do, bar removing GNU iconv or not
Neil> installing Java capabilities?
The right fix is probably to change configure to look for -liconv.
Perhaps the best approach would be to test to see if using <iconv.h>
requires the use of -liconv.
If you're not comfortable writing that then a simpler workaround would
be to `cd' to the libjava build directory (it will be something like
<build-root>/<target-name>/libjava) and run:
make LIBS=-liconv
That ought to work for now.
Tom