pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42240: OpenSolaris pkgsrc-current bootstraping broken with sunpro and 64bit ABI



>Number:         42240
>Category:       pkg
>Synopsis:       OpenSolaris pkgsrc-current bootstraping broken with sunpro and 
>64bit ABI
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 27 22:30:00 +0000 2009
>Originator:     Georg Bege
>Release:        none
>Organization:
>Environment:
SunOS nova 5.11 snv_111b i86pc i386 i86pc Solaris
>Description:
I tried to establish a pkgsrc on this system, however it always failed with 
--abi=64 if I used sunpro.

Here the detailed output:
(Notice: I used the latest tarball (2009Q3, I think) but I also tried current)

===> Building for pdksh-5.2.14nb4
CONFIG_FILES="" CONFIG_HEADERS=config.h ./config.status
creating config.h
config.h is unchanged
date > stamp-h
cc -c  -DHAVE_CONFIG_H -I. -I. -O alloc.c
cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs
cc -c  -DHAVE_CONFIG_H -I. -I. -O c_ksh.c
cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs
cc -c  -DHAVE_CONFIG_H -I. -I. -O c_sh.c
cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs
"c_sh.c", line 568: warning: statement not reached
cc -c  -DHAVE_CONFIG_H -I. -I. -O c_test.c
cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs
cc -c  -DHAVE_CONFIG_H -I. -I. -O c_ulimit.c
cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs
"c_ulimit.c", line 128: incomplete struct/union/enum rlimit: limit
"c_ulimit.c", line 197: warning: implicit function declaration: getrlimit
"c_ulimit.c", line 199: undefined struct/union member: rlim_cur
"c_ulimit.c", line 201: undefined struct/union member: rlim_max
"c_ulimit.c", line 229: undefined struct/union member: rlim_cur
"c_ulimit.c", line 231: undefined struct/union member: rlim_max
"c_ulimit.c", line 232: warning: implicit function declaration: setrlimit
"c_ulimit.c", line 242: undefined struct/union member: rlim_cur
"c_ulimit.c", line 244: undefined struct/union member: rlim_max
cc: acomp failed for c_ulimit.c
*** Error code 1
 
Stop.
bmake: stopped in 
/export/home/pkgsrc/bootstrap/work/wrk/shells/pdksh/work/pdksh-5.2.14
*** Error code 1
 
Stop.
bmake: stopped in /export/home/pkgsrc/shells/pdksh
*** Error code 1
 
Stop.
bmake: stopped in /export/home/pkgsrc/shells/pdksh
===> exited with status 1
aborted.
>How-To-Repeat:
1. Install OpenSolaris
2. Get sunpro (SunStudioExpress for example, install it in /opt)
3. Get pkgsrc tarball and extract
4. bootstrap with sunpro as CC and choose --abi=64

>Fix:
I talked to someone on #pkgsrc @freenode and we figured the problem out:

therion@nova:/export/home/pkgsrc/bootstrap# cc -V
cc: Sun Ceres C 5.10 SunOS_i386 2009/03/06

The version number does not get recognized, it shall recognize 5.9 or 5.1[0-9] 
and then use -m64 to compile, this does not happen it continues to use the 
deprecated -xarch switch.

As dirty hack we tried to comment the checking code out of 
mk/compilers/sunpro.mk:

--- snap ---
# SunPro compiler must be passed certain flags to compile/link 64-bit code.
#.if !empty(CC_VERSION:M5.9) 
_COMPILER_ABI_FLAG.64= -m64
#.elif ${MACHINE_ARCH} == "sparc"
#_COMPILER_ABI_FLAG.64= -xtarget=ultra -xarch=v9
#.else
#_COMPILER_ABI_FLAG.64= -xarch=amd64
#.endif
--- snap ---

This is line 88 and 90-94.



Home | Main Index | Thread Index | Old Index