use alternate compiler in sandbox
schmonz opened this issue · comments
I'm wanting to do my NetBSD 8.x package builds with clang. Newer NetBSD has clang in the base system, but 8.x doesn't, so I've built it from pkgsrc on the host.
What's a good way to get clang pkg_add'd in the sandbox and have it get used to build the bootstrap and all my packages?
mail/rspamd
recently grew GCC_REQD+=8
and NetBSD 9.2's gcc is still 7.5.0, so I was curious what would happen on my next pkg_comp
run. What happened was, pkgsrc built me a lang/gcc8
and used it to build mail/rspamd
, which was slower (of course) but tolerably automatic, except that when I restarted rspamd
I got this error:
/usr/lib/libstdc++.so.7: version GLIBCXX_3.4.18 required by /opt/pkg/lib/rspamd/librspamd-server.so not defined"
What I'm trying now:
- Build
lang/gcc10
on the host system, with aLOCALBASE
distinct from the target's - Turn it into a fake NetBSD release-set tarball:
tar -P -zcvf /path/to/binary/sets/pkgsrc-gcc10.tar.xz $(pkg_info -qL gcc10)
- Set
GCCBASE
to point at it inextra.mk.conf
, andGCC_REQD=10
to try to avoid older/other pkgsrc gcc versions getting built pkg_comp
extracts it and starts using it for post-bootstrap package builds- At some point it's still trying to build
lang/gcc10
, which I'm still experimenting to see if I can avoid