Subject: pkg/34930: lang/ghc broken on 2.x
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <dholland@eecs.harvard.edu>
List: pkgsrc-bugs
Date: 10/28/2006 04:50:01
>Number:         34930
>Category:       pkg
>Synopsis:       getpwnam_r and friends break lang/ghc on 2.x
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 28 04:50:00 +0000 2006
>Originator:     David A. Holland
>Release:        NetBSD 2.0, and 2.1 of 20061009; pkgsrc of 20061026
>Organization:
   Today I'm quite disorganized.
>Environment:
System: NetBSD tanaqui 4.99.3 NetBSD 4.99.3 (TANAQUI) #6: Tue Oct 10 19:32:37 EDT 2006 dholland@tanaqui:/usr/src/sys/arch/i386/compile/TANAQUI i386
Architecture: i386
Machine: i386
>Description:

Building ghc on a 2.0 system fails with getpwnam_r and friends
undefined in the bootstrap stage:

/usr/pkgsrc/lang/ghc/work/ghc-boot/libraries/unix/libHSunix.a(User.o)(.text+0x18e9): In function `s3UR_ret':
: undefined reference to `getpwnam_r'

etc.

because these functions aren't in libc.

Examining checked-out 2.1-branch libc source shows that getpwnam_r
doesn't exist there either, although apparently it's been pulled up
into 3.x.

The problem appears to have been introduced with the new bootstrap kit
mentioned in -r1.31 of lang/ghc/Makefile on 20060731.

>How-To-Repeat:

Build ghc on a 2.0 or 2.1 system.

>Fix:

Reverting to the previous pkgrevision (6.4.2nb2) of 20060730 serves as
an adequate workaround for now.

I don't know what the right fix is; unfortunately, fiddling with the
ghc build is a heavily time-intensive process.

One could also pull getpwnam_r and friends up into the 2.x branches,
but that's probably a can of worms.