Sun

Problem bootstrapping pkgsrc

Have been trying to bootstrap pkgsrc, but it fails after running for 15 or so minutes on my Ultra 45.

Trying to bootstrap with SUNWgcc on Solaris 10.

Log:

Code: Select all

gcc -O2 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=022 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libarchive/libarchive -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libfetch -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work -DHAVE_NBCOMPAT_H=1 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat -c b64.c
gcc -O2 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=022 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libarchive/libarchive -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libfetch -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work -DHAVE_NBCOMPAT_H=1 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat -c bignum.c
gcc -O2 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=022 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libarchive/libarchive -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libfetch -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work -DHAVE_NBCOMPAT_H=1 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat -c bufgap.c
gcc -O2 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=022 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libarchive/libarchive -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libfetch -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work -DHAVE_NBCOMPAT_H=1 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat -c digest.c
gcc -O2 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=022 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libarchive/libarchive -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libfetch -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work -DHAVE_NBCOMPAT_H=1 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat -c libverify.c
In file included from libverify.c:36:
/usr/include/stdbool.h:42:2: #error "Use of <stdbool.h> is valid only in a c99 compilation environment."
libverify.c:181: error: syntax error before "growbuf"
libverify.c: In function `growbuf':
libverify.c:190: error: `false' undeclared (first use in this function)
libverify.c:190: error: (Each undeclared identifier is reported only once
libverify.c:190: error: for each function it appears in.)
libverify.c:195: error: `true' undeclared (first use in this function)
libverify.c: At top level:
libverify.c:200: error: syntax error before "obuf_add_mem"
libverify.c: In function `obuf_add_mem':
libverify.c:204: error: `false' undeclared (first use in this function)
libverify.c:208: error: `true' undeclared (first use in this function)
libverify.c: At top level:
libverify.c:215: error: syntax error before "obuf_printf"
libverify.c: In function `obuf_printf':
libverify.c:219: error: `bool' undeclared (first use in this function)
libverify.c:219: error: syntax error before "ret"
libverify.c:223: error: `ret' undeclared (first use in this function)
libverify.c:223: error: `true' undeclared (first use in this function)
libverify.c:233: error: `false' undeclared (first use in this function)
libverify.c: In function `fmt_binary':
libverify.c:490: error: `false' undeclared (first use in this function)
libverify.c:493: error: `true' undeclared (first use in this function)
libverify.c: At top level:
libverify.c:623: error: syntax error before "fmt_fingerprint"
libverify.c: In function `fmt_fingerprint':
libverify.c:628: error: `false' undeclared (first use in this function)
libverify.c: In function `str_to_keyid':
libverify.c:659: warning: integer constant is too large for "unsigned long" type
libverify.c:660: warning: integer constant is too large for "unsigned long" type
libverify.c:661: warning: integer constant is too large for "unsigned long" type
libverify.c:662: warning: integer constant is too large for "unsigned long" type
libverify.c: In function `fmt_time':
libverify.c:744: error: `false' undeclared (first use in this function)
libverify.c: At top level:
libverify.c:1506: error: syntax error before "fmt_pubkey"
libverify.c: In function `fmt_pubkey':
libverify.c:1509: error: `false' undeclared (first use in this function)
libverify.c: At top level:
libverify.c:1533: error: syntax error before "fmt_userid"
libverify.c:1546: error: syntax error before "fmt_trust"
libverify.c: In function `fmt_trust':
libverify.c:1552: error: `false' undeclared (first use in this function)
libverify.c: At top level:
libverify.c:1562: error: syntax error before "fmt_primary"
libverify.c: In function `fmt_primary':
libverify.c:1571: error: `false' undeclared (first use in this function)
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/netpgpverify
*** Error code 1

Stop.
bmake[1]: stopped in /usr/pkgsrc/pkgtools/pkg_install
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/pkgtools/pkg_install
===> exited with status 1
aborted.


My PATH setting:

Code: Select all

/opt/csw/gnu:/opt/csw/sbin:/opt/csw/bin:/bin:/sbin:/usr/sbin:/usr/bin:/opt/SUNWjet/bin:/usr/sfw/bin:/usr/sfw/sbin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/openwin/bin:/usr/ucb


Really thankful for some help :)
:Octane: Dual 300mhz R12k - 256mb RAM - 146GB 15k RPM HD - V6 Graphics
I remember something like this getting pkgsrc bootstrapped on my Ultra-3 and I don't remember how I fixed it. What gcc version?
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , 175MHz R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...
ClassicHasClass wrote: What gcc version?


Output from "gcc -v":

Code: Select all

Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
:Octane: Dual 300mhz R12k - 256mb RAM - 146GB 15k RPM HD - V6 Graphics
So running this takes me a bit further:

Code: Select all

env "CFLAGS=-std=gnu99 -O2 -I CC=/usr/sfw/bin/gcc" ./bootstrap --compiler gcc


Now it stops here:

Code: Select all

===> Building for bsdinstall-20160108
gcc -std=gnu99 -O2 -I CC=/usr/sfw/bin/gcc  -Werror  -D_PATH_DEVNULL=\"/dev/null\" -DTARGET_STRIP=\"/usr/ccs/bin/strip\" -DHAVE_NBCOMPAT_H=1 -I/usr/pkgsrc/bootstrap/work/wrk/sysutils/bsdinstall/work/libnbcompat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c bsdinstall.c
bsdinstall.c: In function `main':
bsdinstall.c:188: warning: implicit declaration of function `errx'
bsdinstall.c:264: warning: implicit declaration of function `err'
bsdinstall.c:265: warning: implicit declaration of function `getmode'
bsdinstall.c:340: warning: implicit declaration of function `warnx'
bsdinstall.c:377: warning: implicit declaration of function `warn'
*** [bsdinstall.o] Error code 1

bmake: stopped in /usr/pkgsrc/bootstrap/work/wrk/sysutils/bsdinstall/work/bsdinstall-20160108
1 error

bmake: stopped in /usr/pkgsrc/bootstrap/work/wrk/sysutils/bsdinstall/work/bsdinstall-20160108
*** Error code 2

Stop.
bmake[1]: stopped in /usr/pkgsrc/sysutils/bsdinstall
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/sysutils/bsdinstall
===> exited with status 1
aborted.


Any ideas? Have been searching around a bit, but I can't find anything that really helps me getting further.
:Octane: Dual 300mhz R12k - 256mb RAM - 146GB 15k RPM HD - V6 Graphics
Knezzen wrote: Now it stops here:

Code: Select all

bsdinstall.c: In function `main':
bsdinstall.c:188: warning: implicit declaration of function `errx'
bsdinstall.c:264: warning: implicit declaration of function `err'
bsdinstall.c:265: warning: implicit declaration of function `getmode'
bsdinstall.c:340: warning: implicit declaration of function `warnx'
bsdinstall.c:377: warning: implicit declaration of function `warn'

I'm not at all familiar with pkgsrc, but I can tell you that errx, err, warnx, and warn are all functions that are defined in err.h which simply doesn't exist on Solaris 10. Those functions all appear to be part of (GNU and BSD) libc. A quick Google search suggests that pkgsrc/pkgtools/libnbcompat might be of help on platforms lacking them in their native libc.

As for getmode, it also seems to be a BSD-specific function (not even in GNU libc). I suspect it, too, can be found in libnbcompat since that's a NetBSD-compatibility library.

Sorry I can't offer more specific advice. All I can tell you for sure is that the code is written to assume to the presence of err.h and its functions, but you're building on a platform without them.
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500
HP C8000
No, I know it works, because I have a pkgsrc-built curl on my Solaris 10 Ultra-3. Same compiler, gcc 3.4.3.

However, while trying to figure out why so I could tell you, the machine had a heat failure and crapped on the file system. So, guess I'll be reconstructing that. Anyway, it *does* work.
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , 175MHz R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...
And, by the way, I'm pretty furious at it right now.
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , 175MHz R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...
Picking through the ashes, it appears it built libnbcompat as part of bootstrap. So I'm surprised your system didn't do that.
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , 175MHz R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...
Very strange indeed. Will try some more later tonight. Might it have something to do with all the OpenCSW-stuff in my PATH?
:Octane: Dual 300mhz R12k - 256mb RAM - 146GB 15k RPM HD - V6 Graphics
Wouldn't think so, though tbh I don't have those in my path.

I looked at your bsdinstall warnings. Those shouldn't have caused a fatal error except that -Werror was on. You've also got a -DHAVE_NBCOMPAT_H=1. Did something else build it?
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , 175MHz R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...
ClassicHasClass wrote: I looked at your bsdinstall warnings. Those shouldn't have caused a fatal error except that -Werror was on. You've also got a -DHAVE_NBCOMPAT_H=1. Did something else build it?


Not that I know of. I only ran ./bootstrap, nothing got built manually. Have too look into it when I get home from work.
Thought i'd try bootstrapping it using Solaris Studio tonight as well.
:Octane: Dual 300mhz R12k - 256mb RAM - 146GB 15k RPM HD - V6 Graphics
I'm strongly suspecting your path is indeed to blame. I'm not at the machine right now (I finally pieced /usr back together) but ISTR I had some similar glitch. However, it didn't get anywhere near as far as you until I thinned it out.
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , 175MHz R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...
I got it to work last night with gcc 4 from OpenCSW. It built right away without any issues what so ever.

Changed $PATH to /bin:/sbin:/opt/csw/bin and ran "./bootstrap" without any flags at all from /usr/pkgsrc/bootstrap.
Will investigate further tonight if the actual packages build like they should as well :)
:Octane: Dual 300mhz R12k - 256mb RAM - 146GB 15k RPM HD - V6 Graphics