NetBSD / pkgsrc

Automatic conversion of the NetBSD pkgsrc CVS module, use with care
https://www.pkgsrc.org
308 stars 163 forks source link

Bootstrap fails on FreeBSD #148

Open yonas opened 1 month ago

yonas commented 1 month ago
$ ./bootstrap --unprivileged
...
===> Installing dependencies for cwrappers-20220403
===> Overriding tools for cwrappers-20220403
===> Extracting for cwrappers-20220403
/bin/cp -R /home/yonas/git/pkgsrc/pkgtools/cwrappers/files/bin /home/yonas/git/pkgsrc/bootstrap/work/wrk/pkgtools/cwrappers/work/cwrappers-20220403
/usr/bin/touch /home/yonas/git/pkgsrc/bootstrap/work/wrk/pkgtools/cwrappers/work/cwrappers-20220403/transform-gcc.c
/bin/rm -f /home/yonas/git/pkgsrc/bootstrap/work/wrk/pkgtools/cwrappers/work/libnbcompat/config.guess /home/yonas/git/pkgsrc/bootstrap/work/wrk/pkgtools/cwrappers/work/libnbcompat/config.sub
/bin/ln -fs /home/yonas/git/pkgsrc/mk/gnu-config/config.guess /home/yonas/git/pkgsrc/bootstrap/work/wrk/pkgtools/cwrappers/work/libnbcompat/config.guess
/bin/ln -fs /home/yonas/git/pkgsrc/mk/gnu-config/config.sub /home/yonas/git/pkgsrc/bootstrap/work/wrk/pkgtools/cwrappers/work/libnbcompat/config.sub
===> Patching for cwrappers-20220403
===> Creating toolchain wrappers for cwrappers-20220403
===> Configuring for cwrappers-20220403
=> Configuring and building libnbcompat
checking build system type... x86_64-unknown-freebsd14.1
checking host system type... x86_64-unknown-freebsd14
checking for x86_64-unknown-freebsd14-gcc... clang
checking whether the C compiler works... no
configure: error: in `/home/yonas/git/pkgsrc/bootstrap/work/wrk/pkgtools/cwrappers/work/libnbcompat':
configure: error: C compiler cannot create executables
See `config.log' for more details
*** Error code 77

Stop.
bmake[1]: stopped making "install" in /home/yonas/git/pkgsrc/pkgtools/cwrappers
*** Error code 1

Stop.
bmake: stopped making "install" in /home/yonas/git/pkgsrc/pkgtools/cwrappers
===> exited with status 1
aborted.

The log for libnbcompat: https://pastebin.mozilla.org/TAAfh5rZ

bsiegert commented 1 month ago

Unfortunately, the log in the pastebin is for a different invocation. You need to look for config.log in /home/yonas/git/pkgsrc/pkgtools/cwrappers/work/libnbcompat. Could you post that one please?

It might be due to a newer compiler that doesn't allow implicit function declarations. Try adding -Wno-implicit-function-declarations to your CFLAGS.

yonas commented 1 month ago

@bsiegert Here's the log with -Wno-implicit-function-declarations: https://paste.mozilla.org/xVmiBSSg

yonas commented 1 month ago

eval: clang: not found. I'll make a sym link and re-run.

yonas commented 1 month ago

Got further by installing gcc. Ran into this error:

===> running: /bin/sh /home/yonas/git/pkgsrc/bootstrap/work/bin/install-sh -c -o yonas -g yonas -m 755 /home/yonas/git/pkgsrc/bootstrap/work/pkg_install/add/pkg_add /home/yonas/git/pkgsrc/bootstrap/work/sbin/pkg_add
===> running: /bin/sh /home/yonas/git/pkgsrc/bootstrap/work/bin/install-sh -c -o yonas -g yonas -m 755 /home/yonas/git/pkgsrc/bootstrap/work/pkg_install/admin/pkg_admin /home/yonas/git/pkgsrc/bootstrap/work/sbin/pkg_admin
===> running: /bin/sh /home/yonas/git/pkgsrc/bootstrap/work/bin/install-sh -c -o yonas -g yonas -m 755 /home/yonas/git/pkgsrc/bootstrap/work/pkg_install/create/pkg_create /home/yonas/git/pkgsrc/bootstrap/work/sbin/pkg_create
===> running: /bin/sh /home/yonas/git/pkgsrc/bootstrap/work/bin/install-sh -c -o yonas -g yonas -m 755 /home/yonas/git/pkgsrc/bootstrap/work/pkg_install/info/pkg_info /home/yonas/git/pkgsrc/bootstrap/work/sbin/pkg_info
===> running: (cd /home/yonas/git/pkgsrc/pkgtools/cwrappers && /home/yonas/git/pkgsrc/bootstrap/work/bin/bmake  MAKE_JOBS=1 PKG_COMPRESSION=none PKGSRC_KEEP_BIN_PKGS=no MAKECONF=/home/yonas/git/pkgsrc/bootstrap/work/mk.conf install)
===> Installing dependencies for cwrappers-20220403
=> Build dependency gcc6>=6.5.0nb9: NOT found
=> Verifying reinstall for ../../lang/gcc6
=> Bootstrap dependency digest>=20211023: NOT found
=> Verifying reinstall for ../../pkgtools/digest
===> Installing dependencies for digest-20220214
=> Tool dependency cwrappers>=20150314: NOT found
=> Verifying reinstall for ../../pkgtools/cwrappers
ERROR: This package has set PKG_FAIL_REASON:
ERROR: Circular dependency detected
*** Error code 1

Stop.
bmake[3]: stopped making "reinstall" in /home/yonas/git/pkgsrc/pkgtools/cwrappers
*** Error code 1

Stop.
bmake[2]: stopped making "reinstall" in /home/yonas/git/pkgsrc/pkgtools/digest
*** Error code 1

Stop.
bmake[1]: stopped making "reinstall" in /home/yonas/git/pkgsrc/lang/gcc6
*** Error code 1

Stop.
bmake: stopped making "install" in /home/yonas/git/pkgsrc/pkgtools/cwrappers
===> exited with status 1
aborted.