Re: [syslog-ng] syslog-ng3 with SQL on FreeBSD
On Wed, Oct 28, 2009 at 12:00:01PM +0100, syslog-ng-request@lists.balabit.hu wrote:
Date: Tue, 27 Oct 2009 16:27:31 -0400 From: "Michael W. Lucas" <mwlucas@blackhelicopters.org> Subject: [syslog-ng] syslog-ng3 with SQL on FreeBSD To: syslog-ng@lists.balabit.hu Message-ID: <20091027202731.GA82885@bewilderbeast.blackhelicopters.org> Content-Type: text/plain; charset=us-ascii
Hi,
I'm working on getting syslog-ng 3.0.3 to support SQL on FreeBSD, and hopefully get it added to the FreeBSD package or port. It looks like something isn't quite right in the configure script, however.
I have libdbi 0.8.3 installed, but "./configure --enable-sql=yes" still reports:
checking for LIBDBI... gnome-config: not found no Did you installed pkg-config from ports? If not, please install it and re-run configure with the PKG_CONFIG_PATH set to /usr/local/lib/pkgconfig (this is where libdbi installed the dbi.pc config file) checking for dbi_initialize in -ldbi... no This step will be skipped if library detection using pkg-config detection works. If not, please set include and library detection paths in CFLAGS and LDFLAGS variables before running configure. Ex: CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure ...
Please note this only works in posix shells (bash, /bin/sh), in csh you have to set the variables before running configure.
I've reviewed /usr/local/include/dbi/dbi.h, and dbi_initialize is in there.
Can anyone suggest a fix?
If both of these fail, please send in part of config.log from the checking LIBDBI messages to the following text: ## ---------------------- ## ## Running config.status. ## ## ---------------------- ## Regards, -- Pal Tamas/Folti folti@balabit.hu
On Thu, Oct 29, 2009 at 06:56:38PM +0100, Pal Tamas wrote:
Hi,
I'm working on getting syslog-ng 3.0.3 to support SQL on FreeBSD, and hopefully get it added to the FreeBSD package or port. It looks like something isn't quite right in the configure script, however.
I have libdbi 0.8.3 installed, but "./configure --enable-sql=yes" still reports:
checking for LIBDBI... gnome-config: not found no Did you installed pkg-config from ports? If not, please install it and re-run configure with the PKG_CONFIG_PATH set to /usr/local/lib/pkgconfig (this is where libdbi installed the dbi.pc config file)
Thanks for your answer. Yes, pkg-config was installed from ports, and it's a dependency for about 60 other packages built from source, so I assumed it was working. I also built libdbi from ports. But my /usr/local/lib/pkg-config is empty, and a "locate dbi.pc" shows it doesn't exist on this system. /usr/local/lib/pkg-config is also empty on the other -current boxes I run elsewhere. I assume you're going to send me back to figure out why pkg-config isn't storing .pc files (and how building all the other software works without any .pc files on the system), but let's proceed to the other step...
checking for dbi_initialize in -ldbi... no This step will be skipped if library detection using pkg-config detection works. If not, please set include and library detection paths in CFLAGS and LDFLAGS variables before running configure. Ex: CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure ...
Please note this only works in posix shells (bash, /bin/sh), in csh you have to set the variables before running configure.
That seems to have fixed the issue. ... checking for LIBDBI... gnome-config: not found no checking for dbi_initialize in -ldbi... yes ... I could hack the FreeBSD port to support setting these variables, but I'd prefer to change as little as possible downstream. Is there any chance we could get the supporting changes made in the syslog-ng3 source? If not, I'll get these set in the FreeBSD port patch I'll be submitting (if necessary). Thanks, ==ml -- Michael W. Lucas mwlucas@BlackHelicopters.org http://www.MichaelWLucas.com/ Latest book: Cisco Routers for the Desperate, 2nd Edition http://www.CiscoRoutersForTheDesperate.com/
On Thu, Oct 29, 2009 at 05:08:40PM -0400, Michael W. Lucas wrote:
On Thu, Oct 29, 2009 at 06:56:38PM +0100, Pal Tamas wrote:
Hi,
I'm working on getting syslog-ng 3.0.3 to support SQL on FreeBSD, and hopefully get it added to the FreeBSD package or port. It looks like something isn't quite right in the configure script, however.
I have libdbi 0.8.3 installed, but "./configure --enable-sql=yes" still reports:
checking for LIBDBI... gnome-config: not found no Did you installed pkg-config from ports? If not, please install it and re-run configure with the PKG_CONFIG_PATH set to /usr/local/lib/pkgconfig (this is where libdbi installed the dbi.pc config file)
Thanks for your answer. Yes, pkg-config was installed from ports, and it's a dependency for about 60 other packages built from source, so I assumed it was working. I also built libdbi from ports. But my /usr/local/lib/pkg-config is empty, and a "locate dbi.pc" shows it doesn't exist on this system. /usr/local/lib/pkg-config is also empty on the other -current boxes I run elsewhere.
I assume you're going to send me back to figure out why pkg-config isn't storing .pc files (and how building all the other software works without any .pc files on the system), but let's proceed to the other step... No need for it, libdbi 0.8.3 doesn't generate and install dbi.pc, only the CVS version and our in house tree. Sorry to mix those up.
checking for dbi_initialize in -ldbi... no This step will be skipped if library detection using pkg-config detection works. If not, please set include and library detection paths in CFLAGS and LDFLAGS variables before running configure. Ex: CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure ...
Please note this only works in posix shells (bash, /bin/sh), in csh you have to set the variables before running configure.
That seems to have fixed the issue.
... checking for LIBDBI... gnome-config: not found no checking for dbi_initialize in -ldbi... yes ...
I could hack the FreeBSD port to support setting these variables, but I'd prefer to change as little as possible downstream. Is there any chance we could get the supporting changes made in the syslog-ng3 source? If not, I'll get these set in the FreeBSD port patch I'll be submitting (if necessary). Could you please test the following patch?
===== PATCH:BEGIN ===== diff --git a/configure.in b/configure.in index 66b3b12..672f5f6 100644 --- a/configure.in +++ b/configure.in @@ -280,6 +280,17 @@ if test "x$blb_cv_keepcaps" = "xyes"; then AC_DEFINE(HAVE_PR_SET_KEEPCAPS, 1, [have PR_SET_KEEPCAPS]) fi +patheval() +{ + OLD=$1 + NEW=`eval echo $1` + while test "x$OLD" != "x$NEW" + do + OLD=$NEW + NEW=`eval echo $OLD` + done + echo $OLD +} dnl *************************************************************************** dnl Checks for libraries @@ -382,7 +393,15 @@ PKG_CHECK_MODULES(LIBDBI, dbi >= $LIBDBI_MIN_VERSION, libdbi_pkgconfig_not_found if test "$libdbi_pkgconfig_not_found" -eq 1; then dnl if libdbi has no .pc file, try it without one - AC_CHECK_LIB(dbi, dbi_initialize, LIBDBI_LIBS="-ldbi"; LIBDBI_CFLAGS="-I/usr/include") + OCFLAGS=$CFLAGS + OLIBS=$LIBS + LIBDBI_CFLAGS="-I`patheval ${includedir}`" + LIBDBI_LIBS="-L`patheval ${libdir}` -L`patheval ${prefix}`/lib" + CFLAGS="$CFLAGS $LIBDBI_CFLAGS" + LIBS="$LIBS $LIBDBI_LIBS" + AC_CHECK_LIB(dbi, dbi_initialize) + CFLAGS=$OCFLAGS + LIBS=$OLIBS fi @@ -710,18 +729,6 @@ enable_value() fi } -patheval() -{ - OLD=$1 - NEW=`eval echo $1` - while test "x$OLD" != "x$NEW" - do - OLD=$NEW - NEW=`eval echo $OLD` - done - echo $OLD -} - AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [package name]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [version number]) AC_DEFINE_UNQUOTED(SOURCE_REVISION, "$SOURCE_REVISION", [source revision]) ===== PATCH:END ===== Apply it to the source tree, regenarate configure with autoconf(you might need to run aclocal first) and try configuring again. Regards, -- Pal Tamas/Folti folti@balabit.hu
On Fri, Oct 30, 2009 at 10:24:56AM +0100, Pal Tamas wrote:
On Thu, Oct 29, 2009 at 05:08:40PM -0400, Michael W. Lucas wrote:
On Thu, Oct 29, 2009 at 06:56:38PM +0100, Pal Tamas wrote: Could you please test the following patch?
Anything to make this work seamlessly. :-) If I run "configure --enable-sql", it works! ... checking for LIBDBI... gnome-config: not found no checking for dbi_initialize in -ldbi... yes ... I like to put custom-built software in a separate directory, however, to keep it away from my packaged software. (Yes, I know I didn't say this previously, my apologies.) There's a failure if I run: # ./configure --enable-sql --prefix=/usr/local/syslogng3 ... checking for LIBDBI... gnome-config: not found no checking for dbi_initialize in -ldbi... no ... Reviewing config.log, the critical line seems to be: ... configure:7986: gcc -o conftest -g -O2 -Wall -I/usr/local/syslogng3/include conftest.c -ldbi -LNONE/lib -L/usr/local/syslogng3/lib >&5 /usr/bin/ld: cannot find -ldbi ... I'm appending the config log as previously requested. Thanks, ==ml configure:7873: checking for LIBDBI configure:7881: $PKG_CONFIG --exists --print-errors "dbi >= $LIBDBI_MIN_VERSION" gnome-config: not found Package dbi was not found in the pkg-config search path. Perhaps you should add the directory containing `dbi.pc' to the PKG_CONFIG_PATH environment variable No package 'dbi' found configure:7884: $? = 1 configure:7899: $PKG_CONFIG --exists --print-errors "dbi >= $LIBDBI_MIN_VERSION" gnome-config: not found Package dbi was not found in the pkg-config search path. Perhaps you should add the directory containing `dbi.pc' to the PKG_CONFIG_PATH environment variable No package 'dbi' found configure:7902: $? = 1 No package 'dbi' found configure:7930: result: no configure:7951: checking for dbi_initialize in -ldbi configure:7986: gcc -o conftest -g -O2 -Wall -I/usr/local/syslogng3/include conftest.c -ldbi -LNONE/lib -L/usr/ local/syslogng3/lib >&5 /usr/bin/ld: cannot find -ldbi configure:7993: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define YYTEXT_POINTER 1 | #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_TCPD_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_SOCKADDR_STORAGE 1 | #define HAVE_STRDUP 1 | #define HAVE_STRTOL 1 | #define HAVE_STRTOLL 1 | #define HAVE_STRTOIMAX 1 | #define HAVE_INET_ATON 1 | #define HAVE_INET_NTOA 1 | #define HAVE_GETOPT_LONG 1 | #define HAVE_GETADDRINFO 1 | #define HAVE_PREAD 1 | #define HAVE_PWRITE 1 | #define HAVE_STRCASESTR 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char dbi_initialize (); | int | main () | { | return dbi_initialize (); | ; | return 0; | } configure:8014: result: no configure:8254: checking for LIBNET configure:8268: result: no configure:8272: checking whether to enable Sun STREAMS support configure:8283: result: no configure:8287: checking whether to enable Sun door support configure:8295: result: no configure:8300: checking whether to enable TCP wrapper support configure:8304: result: yes configure:8318: checking whether to enable spoof source support configure:8328: result: no configure:8338: checking whether to enable IPv6 support configure:8342: result: yes configure:8366: checking whether to enable Linux capability support configure:8373: result: no configure:8378: checking whether to enable PCRE support configure:8385: result: no configure:8473: checking for pkg-config configure:8503: result: /usr/local/bin/pkg-config configure:8532: checking pkg-config is at least version 0.14 configure:8535: result: yes configure:8553: checking for GLIB - version >= 2.10.1 configure:8678: gcc -o conftest -g -O2 -Wall -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include conftest.c -pthread -L/usr/local/lib -lgthread-2.0 -lglib-2.0 >&5 configure:8682: $? = 0 configure:8688: ./conftest configure:8692: $? = 0 configure:8713: result: yes (version 2.18.4) configure:8814: checking for EVTLOG configure:8822: $PKG_CONFIG --exists --print-errors "eventlog >= $EVTLOG_MIN_VERSION" configure:8825: $? = 0 configure:8840: $PKG_CONFIG --exists --print-errors "eventlog >= $EVTLOG_MIN_VERSION" configure:8843: $? = 0 configure:8883: result: yes configure:8933: checking for static GLib libraries configure:8967: gcc -o conftest -g -O2 -Wall conftest.c -Wl,-Bstatic -pthread -L/usr/local/lib -lgthread-2.0 -lglib-2.0 -lintl -Wl,-Bdynamic >&5 /usr/local/lib/libglib-2.0.a(gconvert.o)(.text+0xae1): In function `try_conversion': : undefined reference to `libiconv_open' /usr/local/lib/libglib-2.0.a(gconvert.o)(.text+0x7f5): In function `g_iconv_close': : undefined reference to `libiconv_close' /usr/local/lib/libglib-2.0.a(gconvert.o)(.text+0xac5): In function `g_iconv': : undefined reference to `libiconv' /usr/local/lib/libintl.a(dcigettext.o)(.text+0x806): In function `_nl_find_msg': : undefined reference to `libiconv_open' /usr/local/lib/libintl.a(dcigettext.o)(.text+0x8ae): In function `_nl_find_msg': : undefined reference to `libiconv' /usr/local/lib/libintl.a(dcigettext.o)(.text+0xa69): In function `_nl_find_msg': : undefined reference to `libiconv_open' /usr/local/lib/libintl.a(relocatable.o)(.text+0x114): In function `libintl_set_relocation_prefix': : undefined reference to `libiconv_set_relocation_prefix' configure:8974: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define YYTEXT_POINTER 1 | #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_TCPD_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_SOCKADDR_STORAGE 1 | #define HAVE_STRDUP 1 | #define HAVE_STRTOL 1 | #define HAVE_STRTOLL 1 | #define HAVE_STRTOIMAX 1 | #define HAVE_INET_ATON 1 | #define HAVE_INET_NTOA 1 | #define HAVE_GETOPT_LONG 1 | #define HAVE_GETADDRINFO 1 | #define HAVE_PREAD 1 | #define HAVE_PWRITE 1 | #define HAVE_STRCASESTR 1 | /* end confdefs.h. */ | | extern void g_hash_table_new(void); | | int | main () | { | | | void (*fn)(void) = g_hash_table_new; | | return (int) fn; | | | ; | return 0; | } configure:8994: result: no configure:9001: checking sanity checking Glib headers configure:9032: gcc -o conftest -g -O2 -Wall -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include conftest.c >&5 configure:9036: $? = 0 configure:9042: ./conftest configure:9046: $? = 0 configure:9063: result: yes configure:9515: creating ./config.status ## ---------------------- ## ## Running config.status. ## ## ---------------------- ## -- Michael W. Lucas mwlucas@BlackHelicopters.org http://www.MichaelWLucas.com/ Latest book: Cisco Routers for the Desperate, 2nd Edition http://www.CiscoRoutersForTheDesperate.com/
On Fri, Oct 30, 2009 at 11:29:52AM -0400, Michael W. Lucas wrote:
On Fri, Oct 30, 2009 at 10:24:56AM +0100, Pal Tamas wrote:
On Thu, Oct 29, 2009 at 05:08:40PM -0400, Michael W. Lucas wrote:
On Thu, Oct 29, 2009 at 06:56:38PM +0100, Pal Tamas wrote: Could you please test the following patch?
Anything to make this work seamlessly. :-)
If I run "configure --enable-sql", it works!
I spoke too soon. The configure script works, but when I try to build I get the error: ... usr/local/lib -lgthread-2.0 -lglib-2.0 -lintl -L/usr/local/lib -levtlog - lwrap -LNONE/lib -L/usr/local/lib libsyslog-ng.a(afsql.o)(.text+0xe68): In function `afsql_init_db_thread': /usr/home/mwlucas/syslog-ng-3.0.3/src/afsql.c:706: undefined reference to `dbi_i nitialize' libsyslog-ng.a(afsql.o)(.text+0xfb4): In function `afsql_dd_run_query': /usr/home/mwlucas/syslog-ng-3.0.3/src/afsql.c:258: undefined reference to `dbi_c onn_query' libsyslog-ng.a(afsql.o)(.text+0xff4):/usr/home/mwlucas/syslog-ng-3.0.3/src/afsql .c:265: undefined reference to `dbi_conn_error' libsyslog-ng.a(afsql.o)(.text+0x10ea):/usr/home/mwlucas/syslog-ng-3.0.3/src/afsq l.c:281: undefined reference to `dbi_result_free' libsyslog-ng.a(afsql.o)(.text+0x133f): In function `afsql_db_thread': /usr/home/mwlucas/syslog-ng-3.0.3/src/afsql.c:645: undefined reference to `dbi_c onn_close' ... So, which configure can find dbi.h, the build process cannot. Sorry, ==ml
... checking for LIBDBI... gnome-config: not found no checking for dbi_initialize in -ldbi... yes ...
I like to put custom-built software in a separate directory, however, to keep it away from my packaged software. (Yes, I know I didn't say this previously, my apologies.) There's a failure if I run:
# ./configure --enable-sql --prefix=/usr/local/syslogng3
... checking for LIBDBI... gnome-config: not found no checking for dbi_initialize in -ldbi... no ...
Reviewing config.log, the critical line seems to be:
... configure:7986: gcc -o conftest -g -O2 -Wall -I/usr/local/syslogng3/include conftest.c -ldbi -LNONE/lib -L/usr/local/syslogng3/lib >&5 /usr/bin/ld: cannot find -ldbi ...
I'm appending the config log as previously requested.
Thanks, ==ml
configure:7873: checking for LIBDBI configure:7881: $PKG_CONFIG --exists --print-errors "dbi >= $LIBDBI_MIN_VERSION" gnome-config: not found Package dbi was not found in the pkg-config search path. Perhaps you should add the directory containing `dbi.pc' to the PKG_CONFIG_PATH environment variable No package 'dbi' found configure:7884: $? = 1 configure:7899: $PKG_CONFIG --exists --print-errors "dbi >= $LIBDBI_MIN_VERSION" gnome-config: not found Package dbi was not found in the pkg-config search path. Perhaps you should add the directory containing `dbi.pc' to the PKG_CONFIG_PATH environment variable No package 'dbi' found configure:7902: $? = 1 No package 'dbi' found configure:7930: result: no configure:7951: checking for dbi_initialize in -ldbi configure:7986: gcc -o conftest -g -O2 -Wall -I/usr/local/syslogng3/include conftest.c -ldbi -LNONE/lib -L/usr/ local/syslogng3/lib >&5 /usr/bin/ld: cannot find -ldbi configure:7993: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define YYTEXT_POINTER 1 | #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_TCPD_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_SOCKADDR_STORAGE 1 | #define HAVE_STRDUP 1 | #define HAVE_STRTOL 1 | #define HAVE_STRTOLL 1 | #define HAVE_STRTOIMAX 1 | #define HAVE_INET_ATON 1 | #define HAVE_INET_NTOA 1 | #define HAVE_GETOPT_LONG 1 | #define HAVE_GETADDRINFO 1 | #define HAVE_PREAD 1 | #define HAVE_PWRITE 1 | #define HAVE_STRCASESTR 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char dbi_initialize (); | int | main () | { | return dbi_initialize (); | ; | return 0; | } configure:8014: result: no configure:8254: checking for LIBNET configure:8268: result: no configure:8272: checking whether to enable Sun STREAMS support configure:8283: result: no configure:8287: checking whether to enable Sun door support configure:8295: result: no configure:8300: checking whether to enable TCP wrapper support configure:8304: result: yes configure:8318: checking whether to enable spoof source support configure:8328: result: no configure:8338: checking whether to enable IPv6 support configure:8342: result: yes configure:8366: checking whether to enable Linux capability support configure:8373: result: no configure:8378: checking whether to enable PCRE support configure:8385: result: no configure:8473: checking for pkg-config configure:8503: result: /usr/local/bin/pkg-config configure:8532: checking pkg-config is at least version 0.14 configure:8535: result: yes configure:8553: checking for GLIB - version >= 2.10.1 configure:8678: gcc -o conftest -g -O2 -Wall -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include conftest.c -pthread -L/usr/local/lib -lgthread-2.0 -lglib-2.0 >&5 configure:8682: $? = 0 configure:8688: ./conftest configure:8692: $? = 0 configure:8713: result: yes (version 2.18.4) configure:8814: checking for EVTLOG configure:8822: $PKG_CONFIG --exists --print-errors "eventlog >= $EVTLOG_MIN_VERSION" configure:8825: $? = 0 configure:8840: $PKG_CONFIG --exists --print-errors "eventlog >= $EVTLOG_MIN_VERSION" configure:8843: $? = 0 configure:8883: result: yes configure:8933: checking for static GLib libraries configure:8967: gcc -o conftest -g -O2 -Wall conftest.c -Wl,-Bstatic -pthread -L/usr/local/lib -lgthread-2.0 -lglib-2.0 -lintl -Wl,-Bdynamic >&5 /usr/local/lib/libglib-2.0.a(gconvert.o)(.text+0xae1): In function `try_conversion': : undefined reference to `libiconv_open' /usr/local/lib/libglib-2.0.a(gconvert.o)(.text+0x7f5): In function `g_iconv_close': : undefined reference to `libiconv_close' /usr/local/lib/libglib-2.0.a(gconvert.o)(.text+0xac5): In function `g_iconv': : undefined reference to `libiconv' /usr/local/lib/libintl.a(dcigettext.o)(.text+0x806): In function `_nl_find_msg': : undefined reference to `libiconv_open' /usr/local/lib/libintl.a(dcigettext.o)(.text+0x8ae): In function `_nl_find_msg': : undefined reference to `libiconv' /usr/local/lib/libintl.a(dcigettext.o)(.text+0xa69): In function `_nl_find_msg': : undefined reference to `libiconv_open' /usr/local/lib/libintl.a(relocatable.o)(.text+0x114): In function `libintl_set_relocation_prefix': : undefined reference to `libiconv_set_relocation_prefix' configure:8974: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define YYTEXT_POINTER 1 | #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_TCPD_H 1 | #define HAVE_STRUCT_TM_TM_GMTOFF 1 | #define HAVE_STRUCT_SOCKADDR_STORAGE 1 | #define HAVE_STRDUP 1 | #define HAVE_STRTOL 1 | #define HAVE_STRTOLL 1 | #define HAVE_STRTOIMAX 1 | #define HAVE_INET_ATON 1 | #define HAVE_INET_NTOA 1 | #define HAVE_GETOPT_LONG 1 | #define HAVE_GETADDRINFO 1 | #define HAVE_PREAD 1 | #define HAVE_PWRITE 1 | #define HAVE_STRCASESTR 1 | /* end confdefs.h. */ | | extern void g_hash_table_new(void); | | int | main () | { | | | void (*fn)(void) = g_hash_table_new; | | return (int) fn; | | | ; | return 0; | } configure:8994: result: no configure:9001: checking sanity checking Glib headers configure:9032: gcc -o conftest -g -O2 -Wall -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include conftest.c >&5 configure:9036: $? = 0 configure:9042: ./conftest configure:9046: $? = 0 configure:9063: result: yes configure:9515: creating ./config.status
## ---------------------- ## ## Running config.status. ## ## ---------------------- ##
-- Michael W. Lucas mwlucas@BlackHelicopters.org http://www.MichaelWLucas.com/ Latest book: Cisco Routers for the Desperate, 2nd Edition http://www.CiscoRoutersForTheDesperate.com/
-- Michael W. Lucas mwlucas@BlackHelicopters.org http://www.MichaelWLucas.com/ Latest book: Cisco Routers for the Desperate, 2nd Edition http://www.CiscoRoutersForTheDesperate.com/
On Fri, 2009-10-30 at 12:02 -0400, Michael W. Lucas wrote:
On Fri, Oct 30, 2009 at 11:29:52AM -0400, Michael W. Lucas wrote:
On Fri, Oct 30, 2009 at 10:24:56AM +0100, Pal Tamas wrote:
On Thu, Oct 29, 2009 at 05:08:40PM -0400, Michael W. Lucas wrote:
On Thu, Oct 29, 2009 at 06:56:38PM +0100, Pal Tamas wrote: Could you please test the following patch?
Anything to make this work seamlessly. :-)
If I run "configure --enable-sql", it works!
I spoke too soon.
The configure script works, but when I try to build I get the error:
... usr/local/lib -lgthread-2.0 -lglib-2.0 -lintl -L/usr/local/lib -levtlog - lwrap -LNONE/lib -L/usr/local/lib libsyslog-ng.a(afsql.o)(.text+0xe68): In function `afsql_init_db_thread': /usr/home/mwlucas/syslog-ng-3.0.3/src/afsql.c:706: undefined reference to `dbi_i nitialize' libsyslog-ng.a(afsql.o)(.text+0xfb4): In function `afsql_dd_run_query': /usr/home/mwlucas/syslog-ng-3.0.3/src/afsql.c:258: undefined reference to `dbi_c onn_query' libsyslog-ng.a(afsql.o)(.text+0xff4):/usr/home/mwlucas/syslog-ng-3.0.3/src/afsql .c:265: undefined reference to `dbi_conn_error' libsyslog-ng.a(afsql.o)(.text+0x10ea):/usr/home/mwlucas/syslog-ng-3.0.3/src/afsq l.c:281: undefined reference to `dbi_result_free' libsyslog-ng.a(afsql.o)(.text+0x133f): In function `afsql_db_thread': /usr/home/mwlucas/syslog-ng-3.0.3/src/afsql.c:645: undefined reference to `dbi_c onn_close' ...
So, which configure can find dbi.h, the build process cannot.
This is a linking error, the compilation went fine. For some reason it didn't find the dbi library. I can see now, the reason is that it tries to use -L${prefix}/lib, but as there is no explict --prefix argument, it expands to -LNONE/lib, which obviously doesn't exist. -- Bazsi
participants (3)
-
Balazs Scheidler
-
Michael W. Lucas
-
Pal Tamas