Subject: Re: cad/pcb-current build failure on Solaris 9/sparc
To: Dan McMahill <dmcmahill@NetBSD.org>
From: John D. Baker <jdbaker@mylinuxisp.com>
List: tech-pkg
Date: 04/23/2004 02:54:57
On Wed, 21 Apr 2004, Dan McMahill wrote:
> > Undefined first referenced
> > symbol in file
> > yywrap parse_l.o
> > ld: fatal: Symbol referencing errors. No output written to pcb-bin
> > collect2: ld returned 1 exit status
> Right. It wants flex instead of lex. Can you try adding
>
> USE_GNU_TOOLS+= lex
>
> to cad/pcb-current/Makefile
>
> and see if that fixes it?
Nope, I'm afraid it fails in exactly the same way, whether flex is
installed (it was a dependency of a subsequently-installed package)
or not (finds native lex on Solaris 9).
The config output is a telltale:
[...]
checking for flex... flex
checking for yywrap in -lfl... no
checking for yywrap in -ll... yes
[...]
And the corresponding segment in pcb-current/work/pcb-20040215/config.log:
[...]
configure:2845: checking for flex
configure:2861: found /usr/pkg/bin/flex
configure:2871: result: flex
configure:2884: checking for yywrap in -lfl
configure:2914: gcc -o conftest -O -I/usr/pkg/include -I/usr/pkg/include -L/usr/
pkg/gcc3/lib/gcc-lib/sparc-sun-solaris2/3.3.3 -Wl,-R/usr/pkg/gcc3/lib/gcc-lib/sp
arc-sun-solaris2/3.3.3 -L/usr/pkg/gcc3/lib -Wl,-R/usr/pkg/gcc3/lib -L/usr/pkg/li
b -Wl,-R/usr/pkg/lib -L/usr/openwin/lib -Wl,-R/usr/openwin/lib conftest.c -lfl
>&5
ld: fatal: library -lfl: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure:2920: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "pcb"
| #define VERSION "1.99p"
| /* end confdefs.h. */
|
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char yywrap ();
| int
| main ()
| {
| yywrap ();
| ;
| return 0;
| }
configure:2946: result: no
configure:2951: checking for yywrap in -ll
configure:2981: gcc -o conftest -O -I/usr/pkg/include -I/usr/pkg/include -L/usr/
pkg/gcc3/lib/gcc-lib/sparc-sun-solaris2/3.3.3 -Wl,-R/usr/pkg/gcc3/lib/gcc-lib/sp
arc-sun-solaris2/3.3.3 -L/usr/pkg/gcc3/lib -Wl,-R/usr/pkg/gcc3/lib -L/usr/pkg/li
b -Wl,-R/usr/pkg/lib -L/usr/openwin/lib -Wl,-R/usr/openwin/lib conftest.c -ll
>&5
configure:2987: $? = 0
configure:2991: test -z
|| test ! -s conftest.err
configure:2994: $? = 0
configure:2997: test -s conftest
configure:3000: $? = 0
configure:3013: result: yes
[...]
Only /usr/pkg/lib/libfl.a was built, no dynamic library, but even
then, the config script can't find it.
It finds /usr/lib/libl.{a|so|so.$ver} OK, but neither -lfl nor -ll are
specified to the linker in:
[...]
gcc -DNDEBUG -O -I/usr/pkg/include -I/usr/openwin/include -L/usr/pkg/gcc3/lib/gcc-lib/sparc-sun-solaris2/3.3.3 -Wl,-R/usr/pkg/gcc3/lib/gcc-lib/sparc-sun-solaris2/3.3.3 -L/usr/pkg/gcc3/lib -Wl,-R/usr/pkg/gcc3/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/openwin/lib -Wl,-R/usr/openwin/lib -o pcb-bin action.o autoplace.o autoroute.o buffer.o change.o command.o compat.o control.o copy.o create.o crosshair.o data.o dev_ps.o dev_rs274x.o dialog.o djopt.o draw.o drill.o error.o file.o fileselect.o find.o gui.o heap.o insert.o intersect.o rtree.o lgdialog.o library.o log.o main.o menu.o mirror.o misc.o move.o mtspace.o mymem.o netlist.o output.o parse_l.o parse_y.o pinout.o polygon.o print.o printdialog.o printpanner.o rats.o remove.o report.o rotate.o rubberband.o search.o select.o selector.o set.o sizedialog.o undo.o vector.o -lXaw -lXpm -lXmu -lXt -lXext -lSM -lICE -lX11 -lxnet -lm -L/usr/openwin/lib -R/usr/openwin/lib -R/usr/openwin/lib
[...]
Either would suffice, but neither are specified.
--
John D. Baker, KN5UKS NetBSD Darwin/MacOS X
jdbaker(at)mylinuxisp(dot)com OpenBSD FreeBSD
BSD -- It just sits there and _works_!