[syslog-ng] Problem with static linking glib on Solaris
Balazs Scheidler
bazsi at balabit.hu
Thu Jul 30 09:08:17 CEST 2009
On Wed, 2009-07-29 at 15:30 +0200, kdajka wrote:
> Hi,
> I'm trying to compile latest stable syslog-ng (3.0.3) release on Solaris 10.
> I have compiled glib (2.10.3) with ./configure --enable-static --with-libiconv --prefix=/usr/local/inp/glib.
> Eventlog was installed by Sun administrator in my company:
> $pkginfo |grep -i event
> application SMCevtlog eventlog
> Which is installed to /usr/local/lib
>
> Everything is fine if I run configure like this:
> LD_LIBRARY_PATH=/usr/local/inp/glib/lib:$LD_LIBRARY_PATH
> PKG_CONFIG_PATH=/usr/local/inp/glib/lib/pkgconfig/:/usr/local/lib/pkgconfig ./configure
>
> but if I try compile it with static:
> LD_LIBRARY_PATH=/usr/local/inp/glib/lib:$LD_LIBRARY_PATH
> PKG_CONFIG_PATH=/usr/local/inp/glib/lib/pkgconfig/:/usr/local/lib/pkgconfig ./configure --enable-static-linking
>
> I'm getting this error:
>
> checking for pkg-config... /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for a BSD-compatible install... ./install-sh -c
> checking whether build environment is sane... ^Z
> ...
>
> ...
> checking for pkg-config... (cached) /usr/bin/pkg-config
> checking pkg-config is at least version 0.14... yes
> checking for GLIB - version >= 2.10.1... yes (version 2.10.3)
> checking for EVTLOG... yes
> checking for static GLib libraries... no
> checking sanity checking Glib headers... yes
> configure: error: static GLib libraries not found (a file named libglib-2.0.a), either link GLib dynamically using the
> --enable-dynamic-linking or install a static GLib
>
> It says that it couldn't find libglib-2.0.a, even though it is located on my system:
> $ ls -l /usr/local/inp/glib/lib/libglib-2.0.*
> -rw-r--r-- 1 webadm webadm 1103212 Jul 29 09:58 /usr/local/inp/glib/lib/libglib-2.0.a
> -rwxr-xr-x 1 webadm webadm 1236 Jul 29 09:58 /usr/local/inp/glib/lib/libglib-2.0.la
> lrwxrwxrwx 1 webadm webadm 23 Jul 29 09:58 /usr/local/inp/glib/lib/libglib-2.0.so -> libglib-2.0.so.0.1000.3
> lrwxrwxrwx 1 webadm webadm 23 Jul 29 09:58 /usr/local/inp/glib/lib/libglib-2.0.so.0 ->
> libglib-2.0.so.0.1000.3
> -rwxr-xr-x 1 webadm webadm 940008 Jul 29 09:58 /usr/local/inp/glib/lib/libglib-2.0.so.0.1000.3
>
> Is there another variable in which I can specify non-standard place of libglib-2.0.a?
> My config.log http://pastebin.com/d29c03773
something pulls in the system installed glib before your custom glib
version. probably some dependency found prior to glib.
Hmm.. even the very first first configure test includes the system
installed glib-2.0 include/library PATHs first:
configure:3070: gcc -I/opt/local/include -I/usr/sfw/include
-I/opt/sfw/include -I/usr/local/include/glib-2.0/ -I/opt/local/include
-I/usr/sfw/include -I/opt/sfw/include -I/usr/local/include/glib-2.0/
-L/usr/local/inp/glib/lib conftest.c >&5
You need to find out why. Maybe the environment LDFLAGS/CFLAGS/CPPFLAGS
--
Bazsi
More information about the syslog-ng
mailing list