pkgsrc-Users archive

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

Re: Any hints for bootstrapping in Solaris 10?



Hi.
The 64 bit version of this library is in a different directory :

[root@zone3 etc]$ file /opt/gcc/lib/libssp.so.0
/opt/gcc/lib/libssp.so.0:       ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped

[root@zone3 etc]$ file /opt/gcc/lib/sparcv9/libssp.so.0.0.0
/opt/gcc/lib/sparcv9/libssp.so.0.0.0:   ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped

So for the record yes I'm bootstrapping in 32 bits on Solaris 10. I'm using my own home build GCC 8. At this point, I'm only able to make it work that way. As Jonathan said, It should work and I will eventually investigate (maybe with his help if he doesn't mind) and I'll try to provide a working procedure to make a 64 bits bootstrap on Solaris 10. 

Concerning shells, as I said on Solaris 10, sh and bash are pretty much broken. ksh should be fine but, if I remember correctly, I faced some compatibility issues with some packages. So my quick workaround was to replace the "system" bash (/usr/bin/bash ) with one provided by pkgsrc. You might want to try ksh before doing what I did.

About Solaris 11, that's great. I have a Netra T100 and a SunFire V100. Both a pretty much capped to Solaris 10. Never tried Solaris 11 but from what I read it seems much more compatible with pkgsrc and a lot of software. I'd say if your hardware is Solaris 11 compatible it might be a good idea to upgrade. Solaris 10 is starting to get old and I think we will eventually start to face more and more issues related to its age. In my case, I'll stick to Solaris 10 for my SPARC as long as NetBSD doesn't have any zone/jail/container like technology.


On Sat, Oct 31, 2020 at 7:48 PM Hisashi T Fujinaka <htodd%twofifty.com@localhost> wrote:
On Sat, 31 Oct 2020, Sad Clouds wrote:

> On Sat, 31 Oct 2020 21:01:45 +0000
> Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
>
>> I didn't mean to come across like that, the point is that pkgsrc
>> should just work, and if it doesn't, then we should investigate why,
>> and fix it.
>
> Just for the record, pkgsrc-2020Q3 bootstrap works for me on SPARC
> Solaris 11.3. I don't know what the "official" recommendation is for
> this platform, but as I mentioned previously, I first build my own GCC,
> then bootstrap pkgsrc using that GCC.
>
>
> MAKE_JOBS=64
> GCC_PATH="/opt/gcc-9.2.0-sparc64"
> PKGBUILD_PATH="/opt/pkgbuild"
> PKG_TOP_PATH="/opt/pkg"
> PKG_BIN_PATH="${PKG_TOP_PATH:?}/bin:${PKG_TOP_PATH:?}/sbin:${PKG_TOP_PATH:?}/libexec"
> PKG_MAN_PATH="${PKG_TOP_PATH:?}/man:${PKG_TOP_PATH:?}/share/man"
> SYS_BIN_PATH="/usr/ccs/bin:/usr/ccs/lib:/usr/xpg4/bin:/usr/bin:/sbin:/usr/sbin:/usr/openwin/bin:/usr/dt/bin"
> SYS_MAN_PATH="/usr/man:/usr/openwin/man:/usr/dt/man"
> LD_OPTIONS="-L${GCC_PATH:?}/lib -R${GCC_PATH:?}/lib -L${GCC_PATH:?}/lib/sparcv9 -R${GCC_PATH:?}/lib/sparcv9"
>
> PATH=${PKGBUILD_PATH:?}/scripts:${GCC_PATH:?}/bin:${PKG_BIN_PATH:?}:${SYS_BIN_PATH:?}
> MANPATH=${PKG_MAN_PATH:?}:${SYS_MAN_PATH:?}
>
> export PATH MANPATH LD_OPTIONS
>
> cd /opt/pkgbuild/pkgsrc/bootstrap/
> env MAKECONF="" DISTDIR=${PKGBUILD_PATH:?}/distfiles USE_NATIVE_GCC=yes PKGSRC_COMPILER=gcc \
> CC=${PKGBUILD_PATH:?}/scripts/gcc CXX=${PKGBUILD_PATH:?}/scripts/g++ \
> ./bootstrap --abi 64 --prefer-pkgsrc no --make-jobs ${MAKE_JOBS:?} \
> --workdir ${PKGBUILD_PATH:?}/objects/bootstrap --prefix ${PKG_TOP_PATH:?} --pkgdbdir ${PKG_TOP_PATH:?}/db/pkg
>
> mkdir ${PKGBUILD_PATH:?}/packages/bootstrap && \
> /bin/tar -cf - -C / ${PKG_TOP_PATH:?} | /bin/gzip -c > ${PKGBUILD_PATH:?}/packages/bootstrap/pkgsrc-bootstrap.tgz
>
>
> And for reference:
>
> cat /opt/pkgbuild/scripts/gcc
> #!/bin/ksh
> exec /opt/gcc-9.2.0-sparc64/bin/gcc "$@" -O2 -m64 -mcpu=niagara2 -Wa,-xarch=sparcvis
>
> cat /opt/pkgbuild/scripts/g++
> #!/bin/ksh
> exec /opt/gcc-9.2.0-sparc64/bin/g++ "$@" -O2 -m64 -mcpu=niagara2 -Wa,-xarch=sparcvis

Did you do anything special when you built gcc? I think I somehow built
a 32-bit version:
file /opt/gcc-9.3.0/lib/libssp.so.0.0.0
/opt/gcc-9.3.0/lib/libssp.so.0.0.0:     ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped

--
Hisashi T Fujinaka - htodd%twofifty.com@localhost
BSEE + BSChem + BAEnglish + MSCS + $2.50 = coffee


Home | Main Index | Thread Index | Old Index