[syslog-ng] Linking syslog-ng statically error

Geller, Sandor (IT) Sandor.Geller at morganstanley.com
Thu Jun 5 11:10:39 CEST 2008


Hi,

Could you show your exact configure options and details about your build environment?

BTW this looks like a problem with your glib. I've checked a few glib versions between
2.2.3 and 2.16.3 and was unable to find any reference for clock_gettime in gtimer. It
calls the GETTIME() macro which is resolved to gettimeofday() in gthread.

Regards,

Sandor

________________________________
From: syslog-ng-bounces at lists.balabit.hu [mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Andrej Lobovski
Sent: Thursday, June 05, 2008 2:50 AM
To: syslog-ng at lists.balabit.hu
Subject: [syslog-ng] Linking syslog-ng statically error

Hello.

While dynamic linking works, for some reason I need static version.

Well when I try it I get output like this:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ANSI C... none needed
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking how to enable static linking for certain libraries... GNU or Solaris
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dmalloc.h usability... no
checking dmalloc.h presence... no
checking for dmalloc.h... no
checking for strings.h... (cached) yes
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking stropts.h usability... yes
checking stropts.h presence... yes
checking for stropts.h... yes
checking sys/strlog.h usability... no
checking sys/strlog.h presence... no
checking for sys/strlog.h... no
checking door.h usability... no
checking door.h presence... no
checking for door.h... no
checking tcpd.h usability... no
checking tcpd.h presence... no
checking for tcpd.h... no
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_gmtoff... yes
checking for I_CONSLOG... no
checking for O_LARGEFILE... yes
checking for struct sockaddr_storage... yes
checking for struct sockaddr_in6... yes
checking for door_create in -ldoor... no
checking for socket in -lsocket... no
checking for nanosleep in -lrt... yes
checking for gethostbyname in -lnsl... yes
checking for regexec in -lregex... no
checking for res_init in -lresolv... no
checking for strdup... yes
checking for strtol... yes
checking for strtoll... yes
checking for strtoimax... yes
checking for inet_aton... yes
checking for inet_ntoa... yes
checking for getopt_long... yes
checking for getaddrinfo... yes
checking for getutent... yes
checking for TCP wrapper library...
checking for LIBNET... yes
checking whether to enable Sun STREAMS support... no
checking whether to enable Sun door support... no
checking whether to enable TCP wrapper support... no
checking whether to enable spoof source support... yes
checking whether to enable IPv6 support... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GLIB... yes
checking for EVTLOG... yes
checking for static GLib libraries... yes
checking sanity checking Glib headers... yes
configure: creating ./config.status
config.status: creating dist.conf
config.status: creating Makefile
config.status: creating syslog-ng.spec.bb
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating doc/docvars.xml
config.status: creating contrib/Makefile
config.status: creating tests/Makefile
config.status: creating solbuild/Makefile
config.status: creating tgzbuild/Makefile
config.status: creating tests/unit/Makefile
config.status: creating tests/functional/Makefile
config.status: creating tests/loggen/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

and the make command gives me

macros.c: In function ÔÇśresult_appendÔÇÖ:
macros.c:136: warning: pointer targets in passing argument 2 of ÔÇśg_string_append_lenÔÇÖ differ in signedness
macros.c: In function ÔÇślog_macro_expandÔÇÖ:
macros.c:148: warning: pointer targets in passing argument 2 of ÔÇśresult_appendÔÇÖ differ in signedness
macros.c:212: warning: pointer targets in passing argument 2 of ÔÇśresult_appendÔÇÖ differ in signedness
macros.c:232: warning: pointer targets in passing argument 2 of ÔÇśresult_appendÔÇÖ differ in signedness
macros.c:240: warning: pointer targets in passing argument 2 of ÔÇśresult_appendÔÇÖ differ in signedness
macros.c:258: warning: pointer targets in passing argument 2 of ÔÇśresult_appendÔÇÖ differ in signedness
macros.c:403: warning: pointer targets in passing argument 2 of ÔÇśresult_appendÔÇÖ differ in signedness
macros.c:422: warning: pointer targets in passing argument 2 of ÔÇśresult_appendÔÇÖ differ in signedness
macros.c:440: warning: pointer targets in passing argument 2 of ÔÇśresult_appendÔÇÖ differ in signedness
logmsg.c: In function ÔÇślog_msg_parseÔÇÖ:
logmsg.c:151: warning: pointer targets in assignment differ in signedness
logmsg.c:216: warning: pointer targets in passing argument 2 of ÔÇśg_string_assign_lenÔÇÖ differ in signedness
logmsg.c:224: warning: pointer targets in assignment differ in signedness
logmsg.c:242: warning: pointer targets in passing argument 1 of ÔÇśstrlenÔÇÖ differ in signedness
logmsg.c:283: warning: pointer targets in passing argument 2 of ÔÇśg_string_assign_lenÔÇÖ differ in signedness
logmsg.c:309: warning: pointer targets in passing argument 2 of ÔÇśg_string_assign_lenÔÇÖ differ in signedness
logmsg.c:335: warning: pointer targets in passing argument 2 of ÔÇśg_string_assign_lenÔÇÖ differ in signedness
logmsg.c:394: warning: pointer targets in assignment differ in signedness
logmsg.c:398: warning: pointer targets in assignment differ in signedness
logmsg.c:429: warning: pointer targets in assignment differ in signedness
logmsg.c:463: warning: pointer targets in assignment differ in signedness
logmsg.c:474: warning: pointer targets in assignment differ in signedness
logmsg.c:486: warning: pointer targets in assignment differ in signedness
logmsg.c:499: warning: pointer targets in assignment differ in signedness
logmsg.c:520: warning: pointer targets in assignment differ in signedness
logmsg.c:525: warning: pointer targets in assignment differ in signedness
logmsg.c:530: warning: pointer targets in passing argument 2 of ÔÇśg_string_assign_lenÔÇÖ differ in signedness
main.o: In function `setup_creds':
/root/syslog-za-oddat/MYKGXX90/rpmbuild/SOURCES/syslog-ng-2.0.8/src/main.c:462: warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libsyslog-ng.a(misc.o): In function `resolve_group':
/root/syslog-za-oddat/MYKGXX90/rpmbuild/SOURCES/syslog-ng-2.0.8/src/misc.c:274: warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libsyslog-ng.a(misc.o): In function `resolve_user':
/root/syslog-za-oddat/MYKGXX90/rpmbuild/SOURCES/syslog-ng-2.0.8/src/misc.c:254: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x141e): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x1411): warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x1426): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x115a): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gutils.o): In function `g_get_any_init_do':
(.text+0x1198): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libsyslog-ng.a(afinet.o): In function `afinet_resolve_name':
/root/syslog-za-oddat/MYKGXX90/rpmbuild/SOURCES/syslog-ng-2.0.8/src/afinet.c:103: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libsyslog-ng.a(misc.o): In function `resolve_hostname':
/root/syslog-za-oddat/MYKGXX90/rpmbuild/SOURCES/syslog-ng-2.0.8/src/misc.c:165: warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libsyslog-ng.a(misc.o): In function `getlonghostname':
/root/syslog-za-oddat/MYKGXX90/rpmbuild/SOURCES/syslog-ng-2.0.8/src/misc.c:70: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libnet.a(libnet_resolve.o): In function `libnet_name2addr6':
(.text+0x453): warning: Using 'gethostbyname2' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libsyslog-ng.a(afinet.o): In function `afinet_set_port':
/root/syslog-za-oddat/MYKGXX90/rpmbuild/SOURCES/syslog-ng-2.0.8/src/afinet.c:58: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gtimer.o): In function `g_timer_elapsed':
(.text+0x220): undefined reference to `clock_gettime'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gtimer.o): In function `g_timer_continue':
(.text+0x2a4): undefined reference to `clock_gettime'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gtimer.o): In function `g_timer_reset':
(.text+0x34a): undefined reference to `clock_gettime'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gtimer.o): In function `g_timer_stop':
(.text+0x391): undefined reference to `clock_gettime'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gtimer.o): In function `g_timer_start':
(.text+0x3de): undefined reference to `clock_gettime'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libglib-2.0.a(gtimer.o):(.text+0x49f): more undefined references to `clock_gettime' follow
collect2: ld returned 1 exit status
make[2]: *** [syslog-ng] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I googled for this problem and found nothing. :(

Please help!


________________________________
Connect to the next generation of MSN Messenger  Get it now! <http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline>
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080605/384e8a77/attachment-0001.htm 


More information about the syslog-ng mailing list