make error syslog-ng 3.3.4 AIX 5.2
I am getting an error during the make stage for syslog-ng 3.3.4. complaining about libiconv. I have compiled libiconv and the library is available under /usr/local/lib # ls -ltr /usr/local/lib/libiconv* -rw-r--r-- 1 root system 890 Jun 17 23:35 /usr/local/lib/ libiconv.la -rw-r--r-- 1 root system 1724284 Jun 17 23:35 /usr/local/lib/libiconv.a ykis-modules.a -lc -Wl,-bnoentry -O2 -pthread -Wl,-brtl -pthread -Wl,--whole-archive -Wl,--no-whole-archive -pthread -Wl,-bE:.libs/libsyslog-ng.exp -Wl,-bernotok /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x12c): undefined reference to `.libiconv_open' /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x358): undefined reference to `.libiconv' /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x39c): undefined reference to `.libiconv_close' collect2: ld returned 1 exit status The compilaiton of glib was fine but not sure why the make fails. Below is my configure options. ./configure --enable-dynamic-linking --prefix=/opt/soe/local/syslog-ng-3.3.4 \ --with-ld-library-path=/opt/soe/local/syslog-ng-3.3.4/lib \ --libdir=/opt/soe/local/syslog-ng-3.3.4/lib --enable-mongodb=no -with-libmongo-client=no Any valuable inputs on this please? Thanks , Rakesh.
Rakesh Rajasekharan <rakesh.rajasekharan@gmail.com> writes:
I am getting an error during the make stage for syslog-ng 3.3.4. complaining about libiconv. I have compiled libiconv and the library is available under /usr/local/lib # ls -ltr /usr/local/lib/libiconv* -rw-r--r-- 1 root system 890 Jun 17 23:35 /usr/local/lib/ libiconv.la -rw-r--r-- 1 root system 1724284 Jun 17 23:35 /usr/local/lib/libiconv.a
ykis-modules.a -lc -Wl,-bnoentry -O2 -pthread -Wl,-brtl -pthread -Wl,--whole-archive -Wl,--no-whole-archive -pthread -Wl,-bE:.libs/libsyslog-ng.exp -Wl,-bernotok /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x12c): undefined reference to `.libiconv_open' /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x358): undefined reference to `.libiconv' /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x39c): undefined reference to `.libiconv_close' collect2: ld returned 1 exit status
It tries to compile statically, at which point, you need to list all the libraries all the dependencies link to. Why it tries static linking is beyond me right now, but as a workaround, you could add -liconv to the failing command, and that should help. -- |8]
Hello Gergely, I have tried including -liconv by adding CFLAGS="-liconv", but that did not help. I am not sure if that this is the right means to include -liconv or something else. Please advice. On Fri, Jun 22, 2012 at 5:41 PM, Gergely Nagy <algernon@balabit.hu> wrote:
Rakesh Rajasekharan <rakesh.rajasekharan@gmail.com> writes:
I am getting an error during the make stage for syslog-ng 3.3.4. complaining about libiconv. I have compiled libiconv and the library is available under /usr/local/lib # ls -ltr /usr/local/lib/libiconv* -rw-r--r-- 1 root system 890 Jun 17 23:35 /usr/local/lib/ libiconv.la -rw-r--r-- 1 root system 1724284 Jun 17 23:35 /usr/local/lib/libiconv.a
ykis-modules.a -lc -Wl,-bnoentry -O2 -pthread -Wl,-brtl -pthread -Wl,--whole-archive -Wl,--no-whole-archive -pthread -Wl,-bE:.libs/libsyslog-ng.exp -Wl,-bernotok /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x12c): undefined reference to `.libiconv_open' /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x358): undefined reference to `.libiconv' /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x39c): undefined reference to `.libiconv_close' collect2: ld returned 1 exit status
It tries to compile statically, at which point, you need to list all the libraries all the dependencies link to. Why it tries static linking is beyond me right now, but as a workaround, you could add -liconv to the failing command, and that should help.
-- |8]
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
On Fri, Jun 22, 2012 at 07:02:35PM +0530, Rakesh Rajasekharan wrote:
Hello Gergely,
I have tried including -liconv by adding CFLAGS="-liconv", but that did not help. I am not sure if that this is the right means to include -liconv or something else. Please advice. With what options did you compiled libiconv and glib?
On Fri, Jun 22, 2012 at 5:41 PM, Gergely Nagy <algernon@balabit.hu> wrote:
Rakesh Rajasekharan <rakesh.rajasekharan@gmail.com> writes:
> I am getting an error during the make stage for syslog-ng 3.3.4. > complaining about libiconv. I have compiled libiconv and the library is > available under /usr/local/lib > # ls -ltr /usr/local/lib/libiconv* > -rw-r--r-- 1 root system 890 Jun 17 23:35 /usr/local/lib/ > libiconv.la > -rw-r--r-- 1 root system 1724284 Jun 17 23:35 > /usr/local/lib/libiconv.a > > ykis-modules.a -lc -Wl,-bnoentry -O2 -pthread -Wl,-brtl -pthread > -Wl,--whole-archive -Wl,--no-whole-archive -pthread > -Wl,-bE:.libs/libsyslog-ng.exp -Wl,-bernotok What was the full line here? > /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x12c): undefined > reference to `.libiconv_open' > /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x358): undefined > reference to `.libiconv' > /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x39c): undefined > reference to `.libiconv_close' > collect2: ld returned 1 exit status
It tries to compile statically, at which point, you need to list all the libraries all the dependencies link to. Why it tries static linking is beyond me right now, but as a workaround, you could add -liconv to the failing command, and that should help.
-- |8]
-- Pal Tamas/Folti folti@balabit.hu
(No need to Cc me on list mail, thank you) Rakesh Rajasekharan <rakesh.rajasekharan@gmail.com> writes:
Hello Gergely,
I have tried including -liconv by adding CFLAGS="-liconv", but that did not help. I am not sure if that this is the right means to include -liconv or something else.
LDFLAGS would be the place, I believe. Do you get the same error if you put it there? If so, can you post the whole failing command and its output? -- |8]
Yes , the results are the same even after trying to set the LDFLAGS. export LDFLAGS="-liconv" below is the final o/p from my configure command. syslog-ng Open Source Edition 3.3.4 configured Compiler options: compiler : gcc -std=gnu99 compiler options : -g -O2 -Wall -pthread -D_LARGE_FILES=1 -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/opt/soe/local/syslog-ng-3.3.4/eventlog/include/eventlog -I$(top_srcdir)/lib/ivykis/lib/include -I$(top_builddir)/lib/ivykis/lib/include -I$(top_srcdir)/lib/ivykis/modules/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 linker flags : -liconv -Wl,-brtl prefix : /opt/soe/local/syslog-ng-3.3.4 linking mode : dynamic __thread keyword : no Submodules: ivykis : internal libmongo-client : no Features: Debug symbols : no GCC profiling : no Memtrace : no IPV6 support : yes spoof-source support : no tcp-wrapper support : no Linux capability support : no PCRE support : no Env wrapper support : no systemd support : no (unit dir: none) Modules: Module search path : /opt/soe/local/syslog-ng-3.3.4/lib/syslog-ng Default module list : affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat Sun STREAMS support (module): no SSL support (module) : no SQL support (module) : no PACCT module (EXPERIMENTAL) : no MongoDB destination (module): no JSON support (module) : no (using no and the failed lines of code are below. libtool: link: gcc -std=gnu99 -shared -o .libs/libsyslog-ng-3.3.4.so .libs/afinter.o .libs/alarms.o .libs/apphook.o .libs/block-ref-parser.o .libs/center.o .libs/cfg.o .libs/cfg-lexer.o .libs/cfg-parser.o .libs/children.o .libs/compat.o .libs/control.o .libs/dgroup.o .libs/dnscache.o .libs/driver.o .libs/filter.o .libs/filter-expr-parser.o .libs/globals.o .libs/gprocess.o .libs/gsockaddr.o .libs/gsocket.o .libs/logmatcher.o .libs/logmpx.o .libs/logmsg.o .libs/logparser.o .libs/logpipe.o .libs/logprocess.o .libs/logproto.o .libs/logqueue.o .libs/logqueue-fifo.o .libs/logreader.o .libs/logrewrite.o .libs/logsource.o .libs/logstamp.o .libs/logtransport.o .libs/logwriter.o .libs/mainloop.o .libs/memtrace.o .libs/messages.o .libs/misc.o .libs/msg-format.o .libs/nvtable.o .libs/parser-expr-parser.o .libs/persist-state.o .libs/plugin.o .libs/pragma-parser.o .libs/rewrite-expr-parser.o .libs/scratch-buffers.o .libs/serialize.o .libs/sgroup.o .libs/stats.o .libs/str-format.o .libs/syslog-names.o .libs/tags.o .libs/templates.o .libs/timeutils.o .libs/utils.o .libs/value-pairs.o .libs/cfg-lex.o .libs/cfg-grammar.o .libs/filter-expr-grammar.o .libs/block-ref-grammar.o .libs/pragma-grammar.o .libs/parser-expr-grammar.o .libs/rewrite-expr-grammar.o -Wl,-blibpath:/usr/local/lib:/opt/soe/local/syslog-ng-3.3.4/eventlog/lib:/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2:/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/../../..:/usr/local/powerpc-ibm-aix5.2.0.0/lib:/usr/local/lib:/lib:/usr/lib -L/usr/local/lib -liconv -lrt -lnsl /usr/local/lib/libgmodule-2.0.a /usr/local/lib/libgthread-2.0.a /usr/local/lib/libglib-2.0.a -lintl -L/opt/soe/local/syslog-ng-3.3.4/eventlog/lib -levtlog -ldl -L../lib/ivykis/lib /tmp/compile/syslog/syslog-ng-3.3.4/lib/ivykis/lib/.libs/libivykis.a -L../lib/ivykis/modules /tmp/compile/syslog/syslog-ng-3.3.4/lib/ivykis/modules/.libs/libivykis-modules.a -lc -Wl,-bnoentry -O2 -pthread -Wl,-brtl -pthread -Wl,--whole-archive -Wl,--no-whole-archive -pthread -Wl,-bE:.libs/libsyslog-ng.exp -Wl,-bernotok /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x12c): undefined reference to `.libiconv_open' /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x358): undefined reference to `.libiconv' /usr/local/lib/libglib-2.0.a(gconvert.o):gconvert.c:(.pr+0x39c): undefined reference to `.libiconv_close' collect2: ld returned 1 exit status make[4]: *** [libsyslog-ng.la] Error 1 make[4]: Leaving directory `/tmp/compile/syslog/syslog-ng-3.3.4/lib' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/tmp/compile/syslog/syslog-ng-3.3.4/lib' make[2]: *** [all] Error 2 make[2]: Leaving directory `/tmp/compile/syslog/syslog-ng-3.3.4/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/compile/syslog/syslog-ng-3.3.4' make: *** [all] Error 2 I have compiled glib 2.16.5 using thje configure options ./configure --enable-static -with-libiconv and libiconv was run without any options supplied to the configure "./configure" Thanks, Rakesh On Fri, Jun 22, 2012 at 7:20 PM, Gergely Nagy <algernon@balabit.hu> wrote:
(No need to Cc me on list mail, thank you)
Rakesh Rajasekharan <rakesh.rajasekharan@gmail.com> writes:
Hello Gergely,
I have tried including -liconv by adding CFLAGS="-liconv", but that did not help. I am not sure if that this is the right means to include -liconv or something else.
LDFLAGS would be the place, I believe. Do you get the same error if you put it there? If so, can you post the whole failing command and its output?
-- |8]
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
On Fri, 2012-06-22 at 19:02 +0530, Rakesh Rajasekharan wrote:
Hello Gergely,
I have tried including -liconv by adding CFLAGS="-liconv", but that did not help. I am not sure if that this is the right means to include -liconv or something else. Please advice.
glib detected that you are using a gnu libiconv but not installed as a system library, thus instead of iconv_open, it uses the symbol libiconv_open to avoid clashing with system symbols. It might also happen that it detected GNU libiconv and then linked against the system iconv. This is the configure portion that glib uses (in my ancient copy) to detect libiconv. Make sure that it detects the correct one and links to it at compile time. Consulting config.log, checking all the relevant PATHs should fix your issue. found_iconv=no case $with_libiconv in maybe) # Check in the C library first AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes]) # Check if we have GNU libiconv if test $found_iconv = "no"; then AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes]) fi # Check if we have a iconv in -liconv, possibly from vendor if test $found_iconv = "no"; then AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes]) fi ;; no) AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes]) ;; gnu|yes) AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes]) ;; native) AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes]) ;; esac You might as well want to grab a compiled glib from an AIX binary archive from here: http://www.perzl.org/aix/index.php?n=Main.Glib2 or check our syslog-ng PE AIX packages. -- Bazsi
participants (4)
-
Balazs Scheidler
-
Gergely Nagy
-
Pal Tamas
-
Rakesh Rajasekharan