port to package amd64 to i386

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Mar 5 16:53:26 UTC 2012

On 05/03/2012 16:42, Bernt Hansson wrote:
> Thank you for the pointer. I do find it a bit overkill to setup jails
> and such, just to build a few ports. I was thinking more along the line of;
> cd /usr/ports/"random port"
> make "it for i386 even if we are building it on amd64, ooh by the way
> build it as a package, and all dependencies as packages as well"
> Oh man, man ports. But I do not find the flag
> -build-for-another-system-cpu-whatever
> Can the ports system be (ab)used in that way?

In general, no.  There may be some ports that you could cross-compile,
but that depends on the upstream software having support for cross
compilation (basically allowing "--target foo" into the compilation
flags.) Even if you fix that you're going to run into difficulties as
soon as you try and compile a port that depends on shared libraries from
another port.  I don't think there's any mechanism for installing 32-bit
shlibs into ${LOCALBASE}/lib32 from packages.

Oh, and making packages is potentially a mine field, as you need to
install the port in order to package it.

About the only way to cross-build ports is to set up a 32-bit jail on a
64-bit host.  I believe that is do-able, but I could be delusional.



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20120305/48f8fa42/signature.pgp

More information about the freebsd-questions mailing list