[syslog-ng] syslog-ng 2.0.0 compile problem
Buozis, Martynas
martynas at ti.com
Thu Nov 16 12:55:04 CET 2006
Hello
I tried to compile syslog-ng on Solaris 10 with Sun Studio 11 using
following configure line :
PKG_CONFIG_PATH=/opt/eventlog/lib/pkgconfig/ GLIB_LIBS=/opt/glib/lib/
CC=cc CXX=CC ./configure --prefix=/opt/syslog-ng
--sysconfdir=/opt/syslog-ng/
I have compiled Eventlog and GLIB (statistically) with same compiler.
Alas configure returns error:
error: static GLib libraries not found (a file named libglib-2.0.a),
either link GLib dynamically using the --enable-dynamic-linking or insta
ll a static Glib
What I found in config.log is a syntax problem in test code? Can this be
fixed somehow by some patch or workaround? I also think, that compile
line is also not correct :
configure:5687: cc -o conftest -g conftest.c -Wl,-Bstatic
/opt/glib/lib/ -Wl,-Bdynamic >&5
"conftest.c", line 52: syntax error before or at: {
"conftest.c", line 55: undefined symbol: fn
"conftest.c", line 59: warning: syntax error: empty declaration
"conftest.c", line 60: syntax error before or at: return
"conftest.c", line 60: warning: syntax error: empty declaration
cc: acomp failed for conftest.c
configure:5693: $? = 2
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "syslog-ng"
| #define VERSION "2.0.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_STROPTS_H 1
| #define HAVE_SYS_STRLOG_H 1
| #define HAVE_DOOR_H 1
| #define HAVE_O_LARGEFILE 1
| #define HAVE_LIBDOOR 1
| #define HAVE_LIBSOCKET 1
| #define HAVE_LIBRT 1
| #define HAVE_LIBNSL 1
| #define HAVE_STRDUP 1
| #define HAVE_STRTOL 1
| #define HAVE_INET_NTOA 1
| #define HAVE_GETOPT_LONG 1
| #define HAVE_GETADDRINFO 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_LIBPTHREAD 1
| #define ENABLE_SUN_STREAMS 1
| #define ENABLE_SUN_DOOR 1
| #define ENABLE_DEBUG 0
| #define ENABLE_MEM_TRACE 0
| #define ENABLE_SSL 0
| #define ENABLE_IPV6 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| extern void g_hash_table_new(void);
|
| int main()
| {
| void (*fn)(void) = g_hash_table_new;
|
| return (int) fn;
| }
|
|
| ;
| return 0;
| }
configure:5717: result: no
configure:5728: error: static GLib libraries not found (a file named
libglib-2.0.a), either link GLib dynamically using the
--enable-dynamic-linking or insta
ll a static Glib
I can fix above code with look like :
/* end confdefs.h. */
extern void g_hash_table_new(void);
int
main ()
{
void (*fn)(void) = g_hash_table_new;
return (int) fn;
}
And compile it with command :
cc -o test -g test.c -Wl,-Bstatic /opt/glib/lib/libglib-2.0.a
-Wl,-Bdynamic
With best regards
Martynas
More information about the syslog-ng
mailing list