On 06/12/2010 04:05 PM, Perry Smith wrote: > > On Jun 12, 2010, at 7:58 AM, Török Edwin wrote: > >> On 06/12/2010 03:35 PM, George R. Kasica wrote: >>>> On Sat, 12 Jun 2010 11:27:26 +0100, you wrote: >>> >>>> On Fri, Jun 11, 2010 at 11:24:17PM -0500, George R. Kasica said: >>>>> Have successfully run 0.96 here with just using >>>>> >>>>> ./configure >>>>> make >>>>> make install >>>>> >>>>> But in 0.96.1 >>>>> >>>>> I'm failing the make with >>>>> >>>>> CCLD sigtool >>>>> make[2]: Leaving directory `/mnt/scsi-1/Linux/clamav-0.96.1/sigtool' >>>>> Making all in clamconf >>>>> make[2]: Entering directory `/mnt/scsi-1/Linux/clamav-0.96.1/clamconf' >>>>> CC optparser.o >>>>> CC getopt.o >>>>> CC misc.o >>>>> CC clamconf.o >>>>> CCLD clamconf >>>>> clamconf.o: In function `print_platform': >>>>> /mnt/scsi-1/Linux/clamav-0.96.1/clamconf/clamconf.c:255: undefined >>>>> reference to `zlibCompileFlags' >>>>> collect2: ld returned 1 exit status >>>>> make[2]: *** [clamconf] Error 1 >>>>> make[2]: Leaving directory `/mnt/scsi-1/Linux/clamav-0.96.1/clamconf' >>>>> make[1]: *** [all-recursive] Error 1 >>>>> make[1]: Leaving directory `/mnt/scsi-1/Linux/clamav-0.96.1' >>>>> make: *** [all] Error 2 >>>> >>>> Something wrong with zlib install? Can you send a link to your >>>> config.log? >>> >>> older version did exist in /usr/lib newer version 1.23 was in >>> /usr/local/lib. >>> I removed the older version it and reran the >>> >>> ./configure >>> make >>> >>> and it failed again...looked and notice the "regular" make of zlib >>> doesn't create shared library you need to build zlib with the >>> configure -s option. >>> >>> might be work a note in the clamav docs. >> >> Yes I think gcc first looks for a shared library, and only after that >> for a static one. So it found your system's zlib as shared and used >> that, while the headers it used where for your zlib in /usr/local. >> >> I'll add a check to configure to detect these mismatches, and give a >> message suggesting that zlib should be built as a shared lib, if your >> system zlib is a shared lib. > > I think you have it roughly correct but I would bet the linker (not really > gcc) checks in some sequence of directories... not really shared verses > static.
Yes it is the linker. To see the search order you can run this command: $ touch x.c && gcc x.c -L/usr/local/lib -Wl,--verbose -lz | grep libz For me it tries to open libz.so, then libz.a from /usr/local/lib, then moves on to another directory. However an older version of the linker might have done things differently. Best egards, --Edwin _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://www.clamav.net/support/ml
