[syslog-ng] syslog-ng-2.1.3: 'Configure' failed on Solaris 8 using --enable-static-linking

Balazs Scheidler bazsi at balabit.hu
Mon Jan 19 10:58:27 CET 2009


On Mon, 2009-01-19 at 14:27 +0530, Chanchal Verma wrote:
> 
> Thanks Bazsi, with your valuable input I am successfully configure
> with --enable-static-linking option. While doing 'make' it is not able
> to find certain static libraries (*.a). 
> From where I can get these libraries. I have pasted the error message
> faced during 'make': 
> 
> ********************************************************** 
> >make 
> .. 
> .. 
> rm -f libsyslog-ng.a 
> ar cru libsyslog-ng.a misc.o utils.o messages.o syslog-names.o cfg.o
> cfg-lex.o cfg-grammar.o macros.o filter.o logmsg.o logpipe.o
> logsource.o driver.o sgroup.o dgroup.o center.o templates.o
> logreader.o logwriter.o affile.o afstreams.o afuser.o afprog.o
> afsocket.o afunix.o afinet.o afinter.o children.o stats.o gsockaddr.o
> fdwrite.o fdread.o memtrace.o dnscache.o apphook.o serialize.o
> logqueue.o afsql.o alarms.o globals.o 
> ranlib libsyslog-ng.a 
> if gcc -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/local/include/glib-2.0
> -I/usr/local/lib/glib-2.0/include
> -I/opt/soe/local/syslog-ng-2.1.3/eventlog/include/eventlog
> -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -g -O2 -Wall
> -MT main.o -MD -MP -MF ".deps/main.Tpo" \ 
>           -c -o main.o `test -f 'main.c' || echo './'`main.c; \ 
>         then mv -f ".deps/main.Tpo" ".deps/main.Po"; \ 
>         else rm -f ".deps/main.Tpo"; exit 1; \ 
>         fi 
> gcc  -g -O2 -Wall   -o syslog-ng  main.o libsyslog-ng.a -static
> -lpthread -lresolv -lnsl -lrt -lsocket -ldoor  -ll -L/usr/local/lib
> -lglib-2.0 -lintl -liconv
> -L/opt/soe/local/syslog-ng-2.1.3/eventlog/lib -levtlog 
> ld: fatal: library -lpthread: not found 
> ld: fatal: library -lresolv: not found 
> ld: fatal: library -lrt: not found 
> ld: fatal: library -ldoor: not found 
> ld: fatal: File processing errors. No output written to syslog-ng 
> collect2: ld returned 1 exit status 
> make[2]: *** [syslog-ng] Error 1 
> make[2]: Leaving directory `/syslog-prereq/syslog-ng-2.1.3/src' 
> make[1]: *** [all-recursive] Error 1 
> make[1]: Leaving directory `/syslog-prereq/syslog-ng-2.1.3' 
> make: *** [all] Error 2 
> ********************************************************* 
> 
> I have checked on my solaris 8 box, these libraries (libpthread.a,
> librt.a, libresolv, libdoor.a) are not available. From where can I get
> required libraries? I have used gcc-3.4.6 compiler. 
> 
> I tried to install gcc-4.2.3 on this Solaris box but not
> succeeded. :( 

Well, why do you want to compile syslog-ng completely statically? IIRC
Sun does not endorse (or support) completely statically linked binaries.
Low level libraries like the libc should be linked statically.

Syslog-ng has a mixed linking option (--enable-mixed-linking) in which
case user-level libraries like glib are linked statically, whereas
system libraries (like the ones missing in your compilation output) are
linked dynamically.

Isn't that enough for you?

-- 
Bazsi



More information about the syslog-ng mailing list