pkgsrc-Bugs archive

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

Re: pkg/31985 ([lang/perl5] cannot build 64-bit binaries on Solaris 10 (amd64) with Sun Studio 10)



The following reply was made to PR pkg/31985; it has been noted by GNATS.

From: john heasley <heas%shrubbery.net@localhost>
To: Filip Hajny <filip%joyent.com@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, OBATA Akio <obache%netbsd.org@localhost>, 
jlam%NetBSD.org@localhost,
        pkgsrc-bugs%netbsd.org@localhost, nakaji%jp.freebsd.org@localhost
Subject: Re: pkg/31985 ([lang/perl5] cannot build 64-bit binaries on
        Solaris 10 (amd64) with Sun Studio 10)
Date: Fri, 20 Nov 2009 10:37:33 +0000

 Fri, Nov 20, 2009 at 10:49:04AM +0100, Filip Hajny:
 > On 20.11.2009, at 9:45, OBATA Akio wrote:
 >
 >> But it is unclear on i386 and sparc, so maybe, should not to  
 >> 64bitnone, but 64bitauto in "else" part. (at least, it seems that  
 >> recent bulk build on SunOS 5.10/i386 and SunOS 5.9/sparc have no  
 >> problem)
 >
 > Confirming that lang/perl5 builds fine with ABI=64 and Sun Studio 12, on 
 > a clean just-boostrapped system.
 >
 > [root@pkgsrc-studio64 ~]# uname -a
 > SunOS pkgsrc-studio64 5.11 snv_89 i86pc i386 i86pc
 >
 > [root@pkgsrc-studio64 ~]# file `which perl`
 > /opt/local/bin/perl: ELF 64-bit LSB executable AMD64 Version 1 [SSE FXSR 
 > FPU], dynamically linked, not stripped
 >
 > [root@pkgsrc-studio64 ~]# perl -v
 > This is perl, v5.10.0 built for i386-solaris-thread-multi-64
 > ...
 >
 > [root@pkgsrc-studio64 ~]# cat /opt/local/etc/mk-compiler.conf
 > # pkgsrc include file for compiler specific options
 > # for Sun Studio 12
 > ABI=                                    64
 > PKGSRC_COMPILER=                        sunpro
 > SUNWSPROBASE=                           /opt/SUNWspro
 > CC=                                     cc
 
 you want -m64 or whatever the option is, esp for x86 on which gcc sucks
 rocks.  except for the bugs that the packages themselves have, its worked
 well for me.
 
 > CXX=                                    CC
 > CPP=                                    ${CC} -E
 > CXXCPP=                                 ${CXX} -E
 >
 > --
 > Filip Hajny
 > Joyent Inc.
 
 my mk.conf has morfed over time and probbably has worts, but looks like:
 
 ABI=64
 
 .ifndef OPSYS
 OPSYS:=        ${:!${UNAME} -s!:S/-//g:S/\///g}
 .endif
 
 .if (${OPSYS} == "SunOS")
 # Solaris Sparc options
 .if (${MACHINE_ARCH} == "sparc")
 PKGSRC_COMPILER=sunpro
 
 # For sparc64, compile 64-bit & w/ large file support.
 .if (${PKGSRC_COMPILER} == "gcc")
 # For gcc: These are all set by the gcc wrapper, but these variables make sure
 # that thinks like libtool see them.
 CC=/usr/local/bin/gcc -static-libgcc -D_LARGEFILE64_SOURCE -mcpu=v9 
-mtune=ultrasparc -m64 -D__sparc_v9__
 GCC=/usr/local/bin/gcc -static-libgcc -D_LARGEFILE64_SOURCE -mcpu=v9 
-mtune=ultrasparc -m64 -D__sparc_v9__
 CXX=/usr/local/bin/g++ -D_LARGEFILE64_SOURCE -mcpu=v9 -mtune=ultrasparc -m64 
-D__sparc_v9__
 CFLAGS+= -static-libgcc -static-libgcc -D_LARGEFILE64_SOURCE -mcpu=v9 
-mtune=ultrasparc -m64 -D__sparc_v9__
 LDLAGS+= -static-libgcc -D_LARGEFILE64_SOURCE -mcpu=v9 -mtune=ultrasparc -m64
 CPPFLAGS+= -D_LARGEFILE64_SOURCE -mcpu=v9 -mtune=ultrasparc -m64 -D__sparc_v9__
 
 .elif (${PKGSRC_COMPILER} == "sunpro")
 
 CC=    /opt/SUNWspro/bin/cc -D_LARGEFILE64_SOURCE -m64 -g
 CPP=   /opt/SUNWspro/bin/cc -D_LARGEFILE64_SOURCE -m64 -E
 CFLAGS=        -D_LARGEFILE64_SOURCE -D_LARGEFILE64_SOURCE -m64 -g 
-L/opt/pkg/lib -L/lib/64 -L/usr/lib/64 -L/usr/ucblib/sparcv9
 CXX=   /opt/SUNWspro/bin/CC -D_LARGEFILE64_SOURCE -m64
 CXXFLAGS=-D_LARGEFILE64_SOURCE -m64
 LDFLAGS=-Wl,-64 -R/opt/pkg/lib -L/opt/pkg/lib -R/lib/64 -L/lib/64 
-R/usr/lib/64 -L/usr/lib/64 -R/usr/ucblib/sparcv9 -L/usr/ucblib/sparcv9
 CPPFLAGS+= -D_LARGEFILE64_SOURCE -m64
 AR=    /usr/ccs/bin/ar
 
 .else
 error
 .endif
 
 SPARC_TARGET_ARCH= sparcv9
 
 .if (${PKGSRC_COMPILER} == "gcc")
 # speed-up gcc
 COPTS+=-pipe
 CFLAGS+=-pipe
 DBG= -static-libgcc -g
 .else
 DBG= -g
 .endif
 
 # pkgsrc tries to figure out where ldd (which it uses to ensure that libraries
 # are found properly after linking) is located with /usr/bin/type, which
 # creates a nice circular exec spin-out...so, just hard-code it.
 LDD=/usr/bin/ldd
 
 # solaris versions dont cut it...
 FETCH_CMD=/opt/pkg/bin/ftp
 TOOLS_PLATFORM.awk?=/opt/pkg/bin/nawk
 TOOLS_PLATFORM.sed?=/opt/pkg/bin/nbsed
 TOOLS_PLATFORM.pax?=/opt/pkg/bin/pax
 TOOLS_PLATFORM.tar?=/opt/pkg/bin/tar
 
 .else
 # Solaris AMD64/x86 options
 #
 PKGSRC_COMPILER=sunpro
 
 # For Solaris amd64, we are much better off using the sunpro compiler.  So,
 # options for sunpro are
 CC=    /opt/SUNWspro/bin/cc -m64 -g
 CPP=   /opt/SUNWspro/bin/cc -m64 -E
 CFLAGS=        -D_LARGEFILE64_SOURCE -m64 -g -L/opt/pkg/lib -L/lib/64 
-L/usr/lib/64 -L/usr/ucblib/amd64
 CXX=   /opt/SUNWspro/bin/CC -m64
 CXXFLAGS= -D_LARGEFILE64_SOURCE -m64
 LDFLAGS= -Wl,-64 -Wl,-R/opt/pkg/lib -Wl,-L/opt/pkg/lib -Wl,-R/lib/64 
-Wl,-L/lib/64 -Wl,-R/usr/lib/64 -Wl,-L/usr/lib/64 -Wl,-R/usr/ucblib/64 
-Wl,-L/usr/ucblib/64
 AR=/usr/ccs/bin/ar
 
 .if (${PKGSRC_COMPILER} == "gcc")
 # speed-up gcc
 COPTS+=-pipe
 CFLAGS+=-pipe
 DBG= -static-libgcc -g
 .else
 DBG= -g
 .endif
 
 # pkgsrc tries to figure out where ldd (which it uses to ensure that libraries
 # are found properly after linking) is located with /usr/bin/type, which
 # creates a nice circular exec spin-out...so, just hard-code it.
 LDD=/usr/bin/ldd
 
 # solaris versions dont cut it...
 TOOLS_PLATFORM.awk?=/opt/pkg/bin/nawk
 TOOLS_PLATFORM.sed?=/opt/pkg/bin/nbsed
 TOOLS_PLATFORM.pax?=/opt/pkg/bin/pax
 TOOLS_PLATFORM.tar?=/opt/pkg/bin/tar
 
 .endif # MACHINE_ARCH sparc
 .endif # OSSYS SunOS
 
 YACC=bison -y
 
 .ifdef BSD_PKG_MK      # begin pkgsrc settings
 
 # The level of debugging output which is displayed whilst making and installing
 # the package.  The default value for this is 0, which will not display the
 # commands as they are executed (normal, default, quiet operation); the value 1
 # will display all shell commands before their invocation, and the value 2 will
 # display both the shell commands before their invocation, and their actual
 # execution progress with set -x will be displayed.
 PKG_DEBUG_LEVEL=0
 
 CONFIGURE_ENV+=        CPPFLAGS=${CPPFLAGS:M*:Q}
 CONFIGURE_ENV+=        CFLAGS=${CFLAGS:M*:Q}
 
 YACC=bison -y
 
 # if we have to build gcc, dont bother with the crap
 BUILD_JAVA=NO
 BUILD_OBJC=NO
 #
 PERL5_USE_THREADS=no
 
 GNU_PROGRAM_PREFIX=
 
 # When binary packages are made, save them in an OS_VERSION and
 # MACHINE_ARCH specific subdirectory.
 PACKAGES=${_PKGSRCDIR}/packages/${OS_VERSION}/${MACHINE_ARCH}
 
 # Automatically build and save binary packages on dependencies.
 DEPENDS_TARGET=package
 
 .endif                 # end pkgsrc settings
 


Home | Main Index | Thread Index | Old Index