tech-pkg archive

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

Re: Cross-compiling pkgsrc



> On Sep 13, 2023, at 8:18 AM, Brook Milligan <brook%nmsu.edu@localhost> wrote:
> 
> I’m trying to cross-compile pkgsrc again now that I have the NetBSD host set up with the results of build.sh.
> 
> I’m following information in 
> 
> https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/doc/HOWTO-use-crosscompile 
> 
> with an unprivileged bootstrap of pkgsrc.
> 
> As described, my mk.conf has the following:
> 
>   USE_CROSS_COMPILE?= yes
> 
> The following looks like the reasonable set of minimal dependencies, i.e., what I would expect from a typical pkgsrc setup:
> 
> # cd /pkgsrc/pkgtools/digest
> # bmake clean-depends clean USE_CROSS_COMPILE=no
> ===> Cleaning for cwrappers-20220403
> ===> Cleaning for mktools-20220614
> ===> Cleaning for digest-20220214
> 
> However, I believe the following should do the same, since digest should be a native package even in the cross-compile setup.  It clearly adds a bunch of additional dependencies, which result in a circular dependency graph.
> 
> # cd /pkgsrc/pkgtools/digest
> # bmake clean-depends clean
> ===> Cleaning for cwrappers-20220403
> ===> Cleaning for mktools-20220614
> ===> Cleaning for checkperms-1.12
> ===> Cleaning for gmake-4.4.1
> ===> Cleaning for perl-5.36.1
> ===> Cleaning for gsed-4.9nb1
> ===> Cleaning for gcc6-6.5.0nb8
> ===> Cleaning for digest-20220214

One additional data point: 

# cd /pkgsrc/pkgtools/digest
# make clean-depends clean
===> Cleaning for cwrappers-20220403
===> Cleaning for mktools-20220614
===> Cleaning for digest-20220214

The native make seems to handle the dependencies as I would have expected (and as bmake does without cross compiling), but the pkgsrc bmake clearly adds more.  The same is true for a not-unprivileged pkgsrc bootstrap.

By the way, the PATH includes the pkgsrc installed ${LOCALBASE}/bin:${LOCALBASE}/sbin prior to the normal path so that packages will be found.

I’m not sure whether cross-compiling would just work if I use make and not bmake, or if there is more to this.

Thanks for any help with this.

Cheers,
Brook



Home | Main Index | Thread Index | Old Index