From mint-bounce@lists.fishpool.fi Fri Jan 23 11:04:32 2009 Date: Fri, 23 Jan 2009 15:59:42 +0000 (GMT) From: David Brownlee To: Mark Duckworth cc: mint@fishpool.com Subject: Re: [MiNT] Adding MiNT support to pkgsrc? In-Reply-To: <4979DF7B.5010203@atari-source.org> Message-ID: References: <4979DF7B.5010203@atari-source.org> User-Agent: Alpine 2.00 (NEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: abs@absd.org Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: 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...