Subject: pkg/32170: lang/tcl-expect fails to build
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 11/26/2005 23:26:00
>Number:         32170
>Category:       pkg
>Synopsis:       lang/tcl-expect fails to build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 26 23:26:00 +0000 2005
>Originator:     Tom Spindler
>Release:        NetBSD 3.99.11
System: NetBSD 3.99.11 NetBSD 3.99.11 (MERCURY) #6: Sat Nov 5 02:08:17 PST 2005 i386
Architecture: i386
Machine: i386
tcl-expect fails to link and build properly, due to an improperly generated
-Wl,-rpath directive.
pts/6 dogcow@mercury: /usr/pkgsrc/lang/tcl-expect 2912 % make
===> Checking for vulnerabilities in tcl-expect-5.43.0
===> Building for tcl-expect-5.43.0
libtool  --mode=link cc -pipe -O2 -march=athlon-xp -finline-functions -ffast-math -fomit-frame-pointer -pipe -I/usr/pkg/include -I/usr/include -O2 -march=athlon-xp -I/usr/include -DDFLT_STTY="\"sane\"" -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -o expect exp_main_exp.o libexpect543.a -L/usr/pkg/lib -ltcl84 -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib   -lpthread -lm -lutil -Wl,-rpath,
  [ note the last argument at the EOL. ]
 -pipe -O2 -march=athlon-xp -finline-functions -ffast-math -fomit-frame-pointer -pipe -I/var/tmp/pkgsrc/lang/tcl-expect/work.i386/.buildlink/include -O2 -march=athlon-xp -DDFLT_STTY=\"sane\" -Wl,-R/usr/pkg/lib -o expect exp_main_exp.o -Wl,-rpath  libexpect543.a -L/var/tmp/pkgsrc/lang/tcl-expect/work.i386/.buildlink/lib /var/tmp/pkgsrc/lang/tcl-expect/work.i386/.buildlink/lib/ -lpthread -lm -lutil -Wl,--rpath -Wl,/var/tmp/pkgsrc/lang/tcl-expect/work.i386/.buildlink/lib -Wl,--rpath -Wl,/var/tmp/pkgsrc/lang/tcl-expect/work.i386/.buildlink/lib 
  [ note '-Wl,-rpath  libexpect543.a' - presumably, why the library isn't
    linked. ]
exp_main_exp.o(.text+0x35): In function `main':
: undefined reference to `Expect_Init'
[other symptoms of not finding libexpect543.a deleted]
If you manually edit the Makefile to remove the spurious '-Wl,-rpath,'
lines, it builds properly. The better question is how -Wl,-rpath without
an argument is being generated. That, I have no idea.