I think libfl is supposed to be used only in applications that use "flex". Perhaps one of the executables in your project is using flex and another executable is not? If that is the case, then add -lfl only for the binary that includes the flex code. The flex code will create a definition for yylex().
--chris Matty wrote: > > Howdy, > > While attempting to build openser on a Solaris 10 host, I bumped into > the following error: > > gcc -g -O9 -funroll-loops -Wall -mcpu=ultrasparc -mtune=ultrasparc > -DNAME='"openser"' -DVERSION='"1.0.1"' -DARCH='"sparc64"' > -DOS='"solaris"' -DCOMPILER='"gcc 3.4.3"' -D__CPU_sparc64 -D__OS_solaris > -DCFG_DIR='"/var/tmp/openser/etc/openser/"' -DPKG_MALLOC -DSHM_MEM > -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP > -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DF_MALLOC -DFAST_LOCK > -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETIPNODEBYNAME > -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -c openserunix.c > -o openserunix.o > Linking openserunix > gcc -O2 openserunix.o -lfl -ldl -lresolv -L/usr/local/lib -lfl > -lxnet -lnsl -lrt -o openserunix > Undefined first referenced > symbol in file > yylex /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../libfl.so > ld: fatal: Symbol referencing errors. No output written to openserunix > > A quick check of libfl.so indicates that the symbol is indeed undefined: > > [45] | 0| 0|FUNC |GLOB |0 |UNDEF |yylex > > Removing "-lfl" from the options allows the build to complete. Does > anyone happen to know which shared library exports this symbol? Also, > since the library is part of libgcc, is this a bug (I didn't turn up > anything on -lfl in the bug database)? > > Thanks, > - Ryan > -- > UNIX Administrator > http://daemons.net/~matty > _______________________________________________ > tools-linking mailing list > tools-linking at opensolaris.org
