Solaris8-x86: Missing symbol when linking syslog-ng 1.4.11
Hi, I'm trying to compile syslog-ng 1.4.11 on Solaris8-x86 with gcc-2.95.3 and get the following linker error: gcc -O2 -Wall -I/usr/local/include/libol -D_GNU_SOURCE -o syslog-ng main.o sources.o center.o filters.o destinations.o log.o cfgfile.o cfg-grammar.o cfg-lex.o affile.o afsocket.o afunix.o afinet.o afinter.o afuser.o afstreams.o afprogram.o utils.o syslog-names.o getopt.o getopt1.o -lpthread -ldoor /usr/local/lib/libol.a -lsocket -lnsl -lxnet Undefined first referenced symbol in file yywrap cfg-lex.o ld: fatal: Symbol referencing errors. No output written to syslog-ng collect2: ld returned 1 exit status *** Error code 1 Has anyone had this problem before? What library should this symbol be in? I've compiled it succesfully before on Solaris8-sparc with no problems whatsoever. Thanks in advance, Sander de Boer
On Sat, May 05, 2001 at 07:22:30PM +0200, Sander wrote:
getopt1.o -lpthread -ldoor /usr/local/lib/libol.a -lsocket -lnsl -lxnet Undefined first referenced symbol in file yywrap cfg-lex.o ld: fatal: Symbol referencing errors. No output written to syslog-ng collect2: ld returned 1 exit status *** Error code 1
Has anyone had this problem before? What library should this symbol be in?
I've compiled it succesfully before on Solaris8-sparc with no problems whatsoever.
I have run into this problem with some packages under Solaris7-sparc. You need to link in the yacc libraries. -ll or -ly should do it I believe. nm -a /usr/lib/*.so |grep yywrap |grep -iv U should tell you which library you need if -ll or -ly didn't do it for you. ---------------------------------------------------------------------------- __o Bradley Arlt Email: arlt@cpsc.ucalgary.ca o__ _ \<_ WWW: www.acs.ucalgary.ca/~bdarlt _>/ _ (_)/(_) -Eat well, sleep peacefully, drink lots, and ride like hell. (_)\(_)
No....no yywrap anywhere on this system, but liby.so and libl.so are there in /usr/lib. It looks like a macro that is not expanded properly in cfg-lex.c and ends up as a symbol in the .o file. Sander de Boer Brad Arlt wrote:
I have run into this problem with some packages under Solaris7-sparc. You need to link in the yacc libraries. -ll or -ly should do it I believe.
nm -a /usr/lib/*.so |grep yywrap |grep -iv U
should tell you which library you need if -ll or -ly didn't do it for you.
Found it....! There is another set of libl.so and liby.so in /usr/ccs/lib. The libl.so there does contain yywrap! Thanks for your help anyway.... Sander wrote:
No....no yywrap anywhere on this system, but liby.so and libl.so are there in /usr/lib.
It looks like a macro that is not expanded properly in cfg-lex.c and ends up as a symbol in the .o file.
Sander de Boer
Brad Arlt wrote:
I have run into this problem with some packages under Solaris7-sparc. You need to link in the yacc libraries. -ll or -ly should do it I believe.
nm -a /usr/lib/*.so |grep yywrap |grep -iv U
should tell you which library you need if -ll or -ly didn't do it for you.
On Sat, May 05, 2001 at 11:58:31PM +0200, Sander wrote:
Found it....! There is another set of libl.so and liby.so in /usr/ccs/lib. The libl.so there does contain yywrap!
yywrap() is defined in flex, so if you have gnu flex installed syslog-ng will link against it using -lfl -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
Balazs Scheidler a écrit :
On Sat, May 05, 2001 at 11:58:31PM +0200, Sander wrote:
Found it....! There is another set of libl.so and liby.so in /usr/ccs/lib. The libl.so there does contain yywrap!
yywrap() is defined in flex, so if you have gnu flex installed syslog-ng will link against it using -lfl
The default yywrap is really trivial; It always return 1.... Why not including it in syslog-ng ? That would avoid the burden of linking with one more lib and finding its name and location... Gaël. -- Gaël Roualland -+- gael.roualland@oleane.net
participants (4)
-
Balazs Scheidler
-
Brad Arlt
-
Gaël Roualland
-
Sander