Number: 188
Title: iconv link problem on Solaris
Submitter: Ian Britten
Date: Tue Aug 13 08:38:38 2002
Subsys: Build/Installation
Version: 1.8.5
System: Sparc-Solaris-8.0
Severity: minor
Problem:
Ximian (www.ximian.com) provides RedCarpet for Solaris, which handles installation/upgrade of software via a boot-strapped RPM system. As an additional benefit, once installed, a .src.rpm can be 'rpm --rebuild' (on Solaris!), as long as the RPM .spec file doesn't have any Linux-specific stuff hardcoded in it (paths, i386, etc).

Thus, I tried


       % rpm --rebuild graphviz-1.8.5-0.src.rpm
on our Solaris box, which worked until it hit an iconv linker error in the 'gd' directory. (See output below)

On Solaris (elsewhere?), iconv is provided as a separate library (-liconv) that must be linked in. (I believe that on Linux it is part of glibc, maybe?)

If your build mechanism (autoconf, etc) could be enhanced to pick up this difference, it'd be appreciated! (Sorry, I'm not sure how...)


% uname -a
SunOS sunflower 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-250
% rpm -q rpm
rpm-4.0.2-ximian.6
% rpm -q libiconv
libiconv-1.5-ximian.3
% rpm -ql libiconv
/opt/gnome/lib/libcharset.so.1
/opt/gnome/lib/libcharset.so.1.0.0
/opt/gnome/lib/libiconv.so.2
/opt/gnome/lib/libiconv.so.2.0.2
/opt/gnome/lib/libiconv_plug.so

% rpm --rebuild graphviz-1.8.5-0.src.rpm [ snip ] gmake[2]: Entering directory `/opt/gnome/src/redhat/BUILD/graphviz-1.8.5/gd' /bin/sh ../libtool --mode=link gcc -O3 -DNDEBUG -Wall -Wno-unknown-pragmas -o fontwheeltest fontwheeltest.o libgd.la -L/opt/gnome/lib -lfreetype -lpng -lz -lm -L/opt/gnome/lib -lfreetype -lpng -lz -lm libtool: link: warning: library `/opt/gnome/lib/libfreetype.la' was moved. libtool: link: warning: library `/opt/gnome/lib/libfreetype.la' was moved. libtool: link: warning: library `/opt/gnome/lib/libfreetype.la' was moved. libtool: link: warning: library `/opt/gnome/lib/libfreetype.la' was moved. gcc -O3 -DNDEBUG -Wall -Wno-unknown-pragmas -o fontwheeltest fontwheeltest.o ./.libs/libgd.al -L/opt/gnome/lib -lpng -lm -lm -lpng -lm -lm /opt/gnome/lib/libfreetype.so -lpng /opt/gnome/lib/libz.so -lm -lm -R/opt/gnome/lib -R/opt/gnome/lib Undefined first referenced symbol in file libiconv ./.libs/libgd.al(gdkanji.lo) libiconv_open ./.libs/libgd.al(gdkanji.lo) libiconv_close ./.libs/libgd.al(gdkanji.lo) ld: fatal: Symbol referencing errors. No output written to fontwheeltest collect2: ld returned 1 exit status


Comments:
If any more detail is needed, or if you want me to try anything, just let me know...

[ellson] I think that the iconv issues have been fixed since 1.8.5.

[erg] (17 Dec 2002) Reopened at the request of people at Sun, who feel it hasn't be fixed.

[britten} (10 June 2003) I think you can close it. I tried 'rpm --rebuild graphviz-1.9-0.src.rpm' and it built the 4 RPMS without any errors or changes. I tried 'rpm -U --test' of the RPMS too, and it looks like they would install without any problems too. (I'm not really in a position to try making changes to that box right now...)
Fix:
Link in -liconv, or else possibly turn off iconv support (in the SRPM .spec file)
Owner: ellson
Status: Fixed (10 June 2003)