[csw-buildfarm] gcc from opt/csw/ picks non-system zlib
Török Edwin
edwin at clamav.net
Tue Feb 9 14:46:57 CET 2010
Hi,
While investigating a ClamAV bugreport [1] on Solaris, I was wondering
why the Solaris9 buildbot didn't catch that problem [2].
I have a few questions:
- what do you use to build OpenCSW packages? gcc or SunCC?
- if you use SunCC is there a way to make sure that ClamAV is linked
against 1.2.3 (and not the system 1.1.4) on Solaris9 for the opencsw
ClamAV packages?
- do you run make check when building the opencsw package?
- why does gcc link to /opt/csw/lib? I didn't ask it to do that (no -L
flags). It should link with /usr/lib provided files. (and apparently
/opt/csw/include is in the include path too).
- how is /usr/sfw/bin/gcc different from /opt/csw/gcc3/bin/gcc?
I can't find /usr/sfw/bin/gcc on the buildfarm, however it is installed
on login.
[1] https://wwws.clamav.net/bugzilla/show_bug.cgi?id=1821
[2]
Looks like the problem is that if I use /opt/csw/gcc3/bin/gcc to link
with zlib, then it links with /opt/csw/lib/libz.so (which is version
1.2.3), and not with the system one (which is 1.1.4).
I was also running the SunCC builds on b10s only, not b9s. Looks like
I'll have to run at least one SunCC build on b9s too to catch these
problems.
> /opt/csw/gcc3/bin/gcc x.c -lz
> ldd a.out
libz.so.1 => /opt/csw/lib/libz.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
Using the Sun studio compiler links with the system compiler though:
> cc x.c -lz
libz.so.1 => /usr/lib/libz.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
And of course users who use /usr/sfw/bin/gcc get linked to the system
zlib too :(
Best regards,
--Edwin
More information about the buildfarm
mailing list