Subject: pkg/20696: 'pspp' package can't cope with arguments to CC in /etc/mk.conf
To: None <gnats-bugs@gnats.netbsd.org>
From: None <tls@netbsd.org>
List: netbsd-bugs
Date: 03/14/2003 00:33:25
>Number:         20696
>Category:       pkg
>Synopsis:       'configure'/buildlink bugs make it impossible to use optimization when building pspp.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 13 16:34:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Thor Lancelot Simon
>Release:        NetBSD 1.6K, pkgsrc as of today (2003-03-13)
>Organization:
	Stevens Institute of Technology
>Environment:
System: doppelbock.hpcf.cs.stevens-tech.edu 1.6K NetBSD 1.6K (KLOSTER) #17: Wed mar  5 18:59:25 EST 2003     tls@doppelbock.hpcf.cs.stevens-tech.edu:/share/src/sys/arch/i386/compile/KLOSTER i386
Architecture: i386
Machine: i386
>Description:

Like a number of other packages in pkgsrc/math, 'pspp' doesn't build with
optimization by default.  In fact, when the buildlink stuff does its magic,
the COPTS= setting isn't even used to add -O2 to the actual compiler command
line.

For most packages, it's possible to work around this in mk.conf like so:

CC=cc -O2 -mcpu=pentiumpro -march=pentiumpro

Unfortunately, for this package (as for a number of others) this somehow
causes the configure script to mis-probe the presence of several functions
and header files, resulting in a quick build failure because some curses
stuff is done wrong.

>How-To-Repeat:
Build 'pspp'.  Look at the actual cc command lines that buildlink runs and
notice that they don't include -O.  Try to fix this in the usual way by
adding the appropriate flags to CC in /etc/mk.conf; note that now the
package doesn't build at all!  Flags on the CC line in mk.conf are
*supposed* to be supported by pkgsrc; at least, that was the upshot of
the prolonged discussion of the subject I had with Alistair last time I
mentioned that it was ~impossible to build many math packages with
optimization.

>Fix:
Determining exactly what's wrong here is, frankly, beyond the extent of
my autoconf juju.  However, it'd be good if a general fix were sorted
out since a number of other packages seem to have grown this bug lately.

>Release-Note:
>Audit-Trail:
>Unformatted: