installing swig on cfarm210?

Patrice Dumas pertusus at free.fr
Thu Jun 11 00:11:23 CEST 2026


On Mon, Jun 08, 2026 at 10:54:10PM +0200, Dagobert Michelsen wrote:
> Hi Pat,
> 
> > More precisely, building without Perl flags works ok on cfarm 210, the
> > command-line that succeeds is:
> > gcc -o conftest -g -D_STDC_C99= -I/opt/csw/include/ -D_REENTRANT -I/usr/local/include -L/opt/csw/lib/ conftest.c  /usr/local/lib/libiconv.so -L/usr/local/lib/64 -L/usr/local/lib -R/usr/local/lib
> > 
> > With the Perl flags, there is a failure.  The command-line is:
> > The failure:
> > ld: fatal: file /usr/local/lib/libiconv.so: wrong ELF class: ELFCLASS64

> The error means you are trying to link a 64 bit library to a 32 bit build
> and /usr/local/lib/libiconv.so <http://libiconv.so/> is 64 bit. I suggest to use /opt/csw/lib
> for libiconv.so <http://libiconv.so/>.

I tried --without-libiconv-prefix and indeed, it allowed the linking
with libiconv with Perl compiler and flags to work, with this command
in the configure test:
/opt/SUNWspro/bin/cc -o conftest -g -D_STDC_C99= -D_REENTRANT -xO3 -m32 -xarch=sparc -I/opt/csw/bdb48/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -I/opt/csw/include/ -D_REENTRANT -I/opt/csw/include -L/opt/csw/lib/ -R /opt/csw/lib -m32 -xarch=sparc -L/opt/csw/lib -lperl -L/opt/csw/bdb48/lib -L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/lib conftest.c  /opt/csw/lib//libiconv.so -R/opt/csw/lib/

However, in the main directory, with this command for the configure test:
gcc -o conftest -g -D_STDC_C99= -I/opt/csw/include/ -D_REENTRANT -L/opt/csw/lib/ conftest.c  -liconv
There is this error at linked program runtime:
ld.so.1: conftest: fatal: libiconv.so.2: open failed: No such file or directory
I checked that /opt/csw/lib/libiconv.so.2 exists.

This time there is an obvious difference with OpenCSW setup, Sun CC is
used in OpenCSW, and I verified that linking against iconv in configure
works on cfarm21O, with CC=cc.  In that case the command is:
cc -o conftest -g -D_STDC_C99= -I/opt/csw/include/ -D_REENTRANT -I/opt/csw/include -L/opt/csw/lib/ conftest.c  /opt/csw/lib//libiconv.so -R/opt/csw/lib/

I do not know if the failure with gcc is an error on my side, or an
issue in cfarm210.

-- 
Pat


More information about the buildfarm mailing list