Subject: Re: Building Packages on Linux
To: None <netbsd-help@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 06/14/2005 00:00:53
Zafer Aydogan wrote:
> I would like to know, if it is possible to build binary packages on a 
> Linux System (for example SuSE Linux) for NetBSD-i386 ?
> I'm not interested in Cross Compiling on NetBSD for Linux but the
> opposite.

I'm sure someone will correct me if my information is out of date, but
last I knew cross-compiling of packages was essentially impossible.  

The basic problem is that most packages rely on autoconf (or similar)
configure scripts to determine the flavor of the target host.  Examples:
where is libtermcap? is strtok_r(3) present?  

It's possible to build a cache of the "right" answers and make configure
pay attention to it, and that will get you partway home, but you'd still
be a long way from cross-building /usr/pkgsrc.  

The NetBSD build framework OTOH does not interrogate the build system for
target-host facilities.  Complete information is provided by the config
file and the secure, simplifying knowledge that the target system will be
running NetBSD.  

--jkl