Subject: pkg/34998: lang/spidermonkey needs -fPIC on sparc64
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 11/06/2006 03:25:01
>Number:         34998
>Category:       pkg
>Synopsis:       lang/spidermonkey needs -fPIC on sparc64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 06 03:25:00 +0000 2006
>Originator:     Tyler Spivey
>Release:        3.1
NetBSD fajrero 3.1 NetBSD 3.1 (GENERIC) #0: Tue Oct 31 09:36:38 UTC 2006  builds
/builds/ab/netbsd-3-1-RELEASE/src/sys/arch/sparc64/compile/GENERIC sparc64       
when compiling the lang/spidermonkey package,
when running anything linked against, a linker error is produced
(symbol "" not found). Compiling with -fPIC fixed the problem.
I"m not sure how to tell the Makefile that the X86-64 section at the end of files/pkgsrc/mk
also applies to sparc64, or I would have submitted a patch.
You can verify this by doing:
echo "main(){}" >a.c
gcc a.c -ljs -L/usr/pkg/lib
LD_LIBRARY_PATH=/usr/pkg/lib ./a.out
to get the error, or alternatively work if compiled with -fPIC.
see description
change the x96-64 section at the end of files/
to also reflect sparc64.