[syslog-ng]Compilation problem with syslog-ng-1.9.3.

Balazs Scheidler syslog-ng@lists.balabit.hu
Tue, 08 Feb 2005 14:00:21 +0100


On Tue, 2005-02-08 at 00:00 +0300, Peter wrote:
> Hello.
> 
> I have a problem. I'm trying to compile syslog-ng-1.9.3. But after
> succesful configuration I have a linking error:
> 
> i686-pc-linux-gnu-gcc  -O2 -march=pentium4 -fomit-frame-pointer -pipe
> -mcpu=pentium4 -Wall -g   -o syslog-ng  main.o misc.o utils.o messages.o
> gsockaddr.o syslog-names.o macros.o logmsg.o cfg.o logpipe.o driver.o
> sgroup.o dgroup.o center.o filter.o logsource.o logreader.o logwriter.o
> affile.o afunix.o afinet.o afsocket.o afstreams.o afuser.o afprog.o
> afinter.o cfg-lex.o cfg-grammar.o fdwrite.o fdread.o memtrace.o
> templates.o children.o -lnsl  -Wl,-static -lfl -lglib-2.0   -levtlog
> -Wl,-call_shared
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/bin/ld:
> cannot find -lglib-2.0
> collect2: ld returned 1 exit status
> make[2]: *** [syslog-ng] Error 1
> make[2]: Leaving directory
> `/var/tmp/portage/syslog-ng-1.9.3/work/syslog-ng-1.9.3/src' make[1]: ***
> [all-recursive] Error 1
> make[1]: Leaving directory
> `/var/tmp/portage/syslog-ng-1.9.3/work/syslog-ng-1.9.3' make: *** [all]
> Error 2

First of all please note that syslog-ng 1.9.3 is a development version
and as such might not be completely stable and is definitely meant for
production environments, use 1.6.6 for that purpose.

> 
> 
> Can anybody enlight me how I can avoid this error? I am sure I have this
> library:
> camobap ~ # ls -l /usr/lib/libglib-2.0.* -rwxr-xr-x  1 root root    805
> ÏÝÒ 30 22:01 /usr/lib/libglib-2.0.la lrwxrwxrwx  1 root root     22
> ÏÝÒ 30 22:01 /usr/lib/libglib-2.0.so -> libglib-2.0.so.0.400.8
> lrwxrwxrwx  1 root root     22 ÏÝÒ 30 22:01 /usr/lib/libglib-2.0.so.0
> -> libglib-2.0.so.0.400.8
> -rwxr-xr-x  1 root root 503304 ÏÝÒ 30
> 22:01/usr/lib/libglib-2.0.so.0.400.8
> 
> Also I would like to note that many other applications that also depend on
> glib-2.0 compiled without problems.

syslog-ng links glib statically by default, and you don't have the
static glib installed.

-- 
Bazsi