----- Original Message -----
> Been struggling with configure complaining that it can't find -lz
> (and later not figuring out how to make a shared library correctly.)
> 
> Turns out there's two spots in configure that use
> "-Wl,-rpath=$ZLIB_HOME/lib", ignoring that configure had determined
> that ld is not gnu.
> 
> In the previous versions this was -L$ZLIB_HOME/lib
> 
> While the correct form would be "-Wl,-R$ZLIB_HOME/lib" this doesn't
> on its own make clamav build on, as the library it needs is in
> $ZLIB_HOME/lib/amd64 (building 64-bit on Solaris x64)  Which I've
> been doing by setting LDFLAGS in my build environment.
> 
> --
> Who: Lawrence K. Chen, P.Eng. - W0LKC - Senior Unix Systems
> Administrator
> For: Enterprise Server Technologies (EST) -- & SafeZone Ally
> _______________________________________________
> Help us build a comprehensive ClamAV guide: visit
> http://wiki.clamav.net
> http://www.clamav.net/support/ml
> 

For completeness, what I did was patch configure, like so (make it like it was 
in previous releases)

--- configure   19 Sep 2013 20:05:30 -0000      1.1.1.22
+++ configure   20 Sep 2013 21:39:57 -0000      1.2
@@ -15952,7 +15952,7 @@
     if test "$ZLIB_HOME" != "/usr"; then
        CPPFLAGS="$CPPFLAGS -I$ZLIB_HOME/include"
        save_LDFLAGS="$LDFLAGS"
-       LDFLAGS="$LDFLAGS -Wl,-rpath=$ZLIB_HOME/lib"
+       LDFLAGS="$LDFLAGS -L$ZLIB_HOME/lib"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in 
-lz" >&5
 $as_echo_n "checking for inflateEnd in -lz... " >&6; }
 if ${ac_cv_lib_z_inflateEnd+:} false; then :
@@ -15990,7 +15990,7 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5
 $as_echo "$ac_cv_lib_z_inflateEnd" >&6; }
 if test "x$ac_cv_lib_z_inflateEnd" = xyes; then :
-  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -Wl,-rpath=$ZLIB_HOME/lib -lz"; 
FRESHCLAM_LIBS="$FRESHCLAM_LIBS -Wl,-rpath=$ZLIB_HOME/lib -lz"
+  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -L$ZLIB_HOME/lib -lz"; 
FRESHCLAM_LIBS="$FRESHCLAM_LIBS -L$ZLIB_HOME/lib -lz"
 else
   as_fn_error $? "Please install zlib and zlib-devel packages" "$LINENO" 5
 fi


Then in my build config.mk, I have something like this:

...
ifeq "$(_CHROOT_OS_ARCH)" "sparc"
    CM_CONFIG_ENV=LDFLAGS="-Wl,-R/usr/local/lib/sparcv9 
-L/usr/local/lib/sparcv9 -Wl,-R/usr/local/lib -L/usr/local/lib" CFLAGS="-O0 
-m64"
else
    CM_CONFIG_ENV=LDFLAGS="-Wl,-R/usr/local/lib/amd64 -L/usr/local/lib/amd64 
-Wl,-R/usr/local/lib -L/usr/local/lib" CFLAGS="-O0 -m64"
endif

Where _CHROOT_OS_ARCH is `uname -p`

-- 
Who: Lawrence K. Chen, P.Eng. - W0LKC - Senior Unix Systems Administrator
For: Enterprise Server Technologies (EST) -- & SafeZone Ally
_______________________________________________
Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq
http://www.clamav.net/support/ml

Reply via email to