Subject: port-pmax/6776: g++ does not work without -ltermcap
To: None <gnats-bugs@gnats.netbsd.org>
From: None <frueauf@ira.uka.de>
List: netbsd-bugs
Date: 01/09/1999 15:55:39
>Number: 6776
>Category: port-pmax
>Synopsis: g++ does not work without -ltermcap
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: port-pmax-maintainer (NetBSD/pmax Portmaster)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 9 07:05:00 1999
>Last-Modified:
>Originator: Thorsten Frueauf
>Organization:
private
>Release: 1.3.3
>Environment:
System: NetBSD cyberdec-4 1.3.3 NetBSD 1.3.3 (CYBERDEC-4) #0: Sat Jan 2 01:47:35 MET 1999 milano@cyberdec-4:/usr/src/sys/arch/pmax/compile/CYBERDEC-4 pmax
[frueauf@cyberdec-4]/tmp> g++ -v
/usr/bin/cc -v
gcc version 2.7.2.2+myc2
>Description:
I tried to compile pkgsrc/x11/kdelibs, but the configure script
barfed:
[...]
checking for a C++-Compiler...
checking for g++... g++
checking whether the C++ compiler (g++ -O -Wl,-R/usr/X11R6/lib -Wl,-R/usr/pkg/lib) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.
*** Error code 1
As I was very surprised, I digged into the configure script to find out what
it tries to compile:
#include "confdefs.h"
main(){return(0);}
not too complicated, huh? condefs.h contains:
#define PACKAGE "kdelibs"
#define VERSION "1.0pre"
Now trying to compile by hand:
[frueauf@cyberdec-4]/tmp> g++ -O -Wl,-R/usr/X11R6/lib -Wl,-R/usr/pkg/lib conftest.C -o conftest
/usr/lib/libcurses.so.2: undefined reference to `tgetnum'
/usr/lib/libcurses.so.2: undefined reference to `tgoto'
/usr/lib/libcurses.so.2: undefined reference to `tgetflag'
/usr/lib/libcurses.so.2: undefined reference to `tputs'
/usr/lib/libcurses.so.2: undefined reference to `tgetent'
/usr/lib/libcurses.so.2: undefined reference to `tgetstr'
Those symbols can be found in libterm, thus:
[frueauf@cyberdec-4]/tmp> g++ -O -Wl,-R/usr/X11R6/lib -Wl,-R/usr/pkg/lib conftest.C -o conftest -ltermcap
[frueauf@cyberdec-4]/tmp>
I consider this a bug, as this breaks compiling every package that needs
g++ to compile. Please also note that this bug is not on every architecture,
so I suspect this is a pmax-only problem.
At least I tried the very same on NetBSD/amiga 1.3.3, and g++ works there
as expected.
>How-To-Repeat:
Try to compile anything that needs g++.
>Fix:
The obvoius workaround would be to define LDFLAGS as -ltermcap on pmax
by default, but thats really a hack. I don't know why g++ is not
proporly build on pmax.
If this is fixed for current (egcs is default there, than please make
sure this gets a pullup-request for a possoble 1.3.4.
If someone finds a fix for that I would be glad to get a patch, and it
would be nice if tht patch would get published on the ftp server too.
>Audit-Trail:
>Unformatted:
g++ does not work without -ltermcap