[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Adding MiNT support to pkgsrc?
On Fri, 23 Jan 2009, Mark Duckworth wrote:
It's interesting but wasn't gentoo built because of deficiencies in pkgsrc?
I wasn't aware of that - I though they were pretty much
independent?
Is pkgsrc well suited to cross compiling? That's really what we need and on
my radar we have scratchbox and openembedded.
Generic cross compiling is an interesting challenge - well
written apps using autoconf etc *should* just work, but
many apps want to run a binary built during the build
process, and do not distinguish host vs target (which I'm
sure is no news to you :)
Cross compiling a single app or project is simple enough
(eg: make NetBSD/atari distribution from source on a posix
system via './build.sh -m atari release')
In case its of any interest there are three approaches for
people building pkgsrc packages for slower architectures:
a) setup a fast box with a cross compiling gcc and exported
filesystem to target box, and set the compiler on the target
box to distcc. Build on target box. Works for ~100% of packages,
compiles and links are much speeded up, but configures and
suchlike still take ~forever
b) Ensure the packages *really* support cross compiling and then
build on a fast box. Every package has to be individually
tested and potentially adjusted, but nice and fast when it
works. Joerg has done this for the xorg distribution packages
in pkgsrc.
c) Use an emulator on a fast machine. Can be combined with a) :)
pkgsrc is reasonably well suited for cross compiling - after
extracting a package and applying any pkgsrc patches it will
create a '.tools/bin' directory in the build area and populates
it with symlinks or sh wrapper for the needed build tools, to
ensure the build picks up the right copy of eg: perl rather
than some random one lying around in the path.
It also does similar tricks with include and lib files, setting
-I and -L appropriately so packages only finds the libs and
includes you want it to, so a package doesn't configure and
link against some extra lib which happens to be installed and
isn't recorded in the dependencies so the binary package fails
on a different box at runtime.
But I digress...