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

Re: bootstrap won't link with GNU iconv


>>>>> "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


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