Build error on Solaris 10 (libiconv messages)

Dr. David Kirkby david.kirkby@onetel.net
Sun Jun 21 19:04:00 GMT 2009


Dennis Clarke wrote:
>> Dennis Clarke wrote:
>>>> Dennis Clarke wrote:
>>>>>> Any ideas how I might solve this?
>>>>>>
>>>>> Try putting -liconv into LDFLAGS.
>>>>>
>>>> Thank you,
>>>>
>>>>   by the time I'd read your message, I'd realised there was a copy of
>>>> libiconv in /usr/local and given the appropiate flags to the configure
>>>> script
>>>>
>>>> --with-libiconv-prefix=/usr/local
>>>>
>>>> and it did build.
>>>>
>>>> But as far as I could tell, there is no libiconv as part of Solaris. So
>>>> if gcc needs it, the documentation should be updated to reflect this.
>>> You can get an up to date libiconv from blastwave.org :
>> Thank you. I found I seem to have a directory /usr/lib/iconv on Suns. I
>> was trying to find a way to build a gcc which required the least
>> dependancies as possible.
>>
>> The maths program Sage
> 
> yes, I know it well. Or at least I know of your pains.
> 
>> http://www.sagemath.org/
>>
>> does not currently build easily on Solaris.
> 
> no kidding. :-(
> 
>> It's possible, but a
>> nightmare, and fails certain tests. The Sage team have taken the stop of
>> basically including *everyone* one needs to get Sage running. So if it
>> need some library 'foobar', rather than you download it, Sage includes
>> the source to foobar, along with any patches that might be needed to get
>> it configured to suite Sage.
>>
>> Since on Solaris, it is finicky about the compiler, the plan is to
>> actually produce a package for Sage which builds gcc the way needed.
>> Hence I was looking for a way to build gcc using the bare minimum of
>> dependancies.
> 
> like so ?
> 
> $ /opt/csw/gcc4/bin/gcc -v
> Using built-in specs.
> Target: sparc-sun-solaris2.8
> Configured with: ../gcc-4.3.3/configure --with-gnu-as
> --with-as=/opt/csw/bin/gas --with-gnu-ld --with-ld=/opt/csw/bin/gld
> --with-cpu=v7 --enable-threads=posix --enable-nls --prefix=/opt/csw/gcc4
> --with-local-prefix=/opt/csw --enable-shared --enable-multilib
> --with-included-gettext --with-libiconv-prefix=/opt/csw --with-system-zlib
> --with-gmp=/opt/csw --with-mpfr=/opt/csw
> --enable-languages=c,c++,fortran,objc,ada --enable-bootstrap
> Thread model: posix
> gcc version 4.3.3 (GCC)

But one had a dependency on the Blastwave code. If I could use only the 
compiler in /usr/sfw/bin, then I'd have an easier life.

I accept that using a compiler from Blastwave is quite a viable option. 
No doubt lots of packages from there could be used to make the Sage 
build faster. But it would be much more difficult for the Sage 
developers to control, as they would have no idea what version of gcc a 
user gets. The whole approach of the project is to supply one huge 
tarball which has everything needed.

At first I thoguht that was a bit of a silly idea, but I have come 
around to thinking it is actually quite sensible, as a user would have a 
hard time finding all the dependancies. Not only that, several of them 
need changes made.

> 
> $ ldd -r /opt/csw/gcc4/bin/gcc
>         libiconv.so.2 =>         /opt/csw/lib/libiconv.so.2
>         libc.so.1 =>     /usr/lib/libc.so.1
>         libdl.so.1 =>    /usr/lib/libdl.so.1
>         /usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1
> 
> see the libiconv there ?

Yes, but I'd rather not reply on it.

>> Libiconv is not listed as a prequisite for gcc, which initially I
>> thought was a mistake, as I could not find it on my Sun. But it appears
>> to be in a directory /usr/lib/iconv. I've not tried linking against the
>> files in there - I'd already done it for iconv in /usr/local/lib, but
>> I'd rather not have to download libiconv unless it is really necessary,
>> which it may well not be.
> 
> good luck with that and let me know how you proceed , I really do want to
> know.
> 

Why not join the porting effort? You clearly know a lot about Solaris. 
The plans are basically.

1) Build with gcc in 32-bit
2) Build with Sun compiler in 32-bit
3) Build with Sun compiler in 64-bit.

I've managed to build Sage using a binary gcc 4.3.2, but it is a pain. 
I'm working on

* Trying to get it to build with gcc 4.4.0 (the Sage developer wants)
* Trying to get it to work on different machines (so far it worked on 
someone elses Blade 2500, and my Blade 2000, but failed on a 16 
processor Sun.

I'm certainly making progress on this. But an extra pair of hands would 
not go amiss!

dave



More information about the Gcc-help mailing list