32-bit/i386 ports/packges on amd64

Coleman Kane zombyfork at gmail.com
Tue Mar 20 18:13:30 UTC 2007


On 3/20/07, Peter Jeremy <peterjeremy at optushome.com.au> wrote:
>
> On 2007-Mar-19 13:37:57 +0200, Andriy Gapon <avg at icyb.net.ua> wrote:
> >I saw a number of questions on this list about installing opera on amd64
> >and about 32-bit java. But I didn't find any comprehensive answers,
> >howtos, etc.
>
> I've had a few tries but not managed to get a 32-bit jdk15 or mysqld
> running with an amd64 kernel.  My suspicion is threading...
>
> >Has anyone managed to develop a well-defined and maintainable way of
> >using i386 packages (and/or ports) on amd64 ?
>
> This falls into the "lots of people would like it but so far no-one
> has implemented it" category.
>
> >BTW, it seems that various Linux distros have developed ways for easy
> >co-existence of x86 and x86_64 packages.
>
> Solaris (and I suspect Linux) has taken the approach that the kernel
> is 64-bit but userland is primarily 32-bit with applications able to
> build/run as 64-bit if desired.  /usr/lib is 32-bit libraries and
> /usr/lib/sparcv9 is 64-bit.  The toolchain and RTLD understand where
> to look.  OTOH, FreeBSD/amd64 is a 64-bit environment with support
> for running 32-bit code:  /usr/lib is 64-bit and /usr/lib32 is 32-bit.
>
> The Solaris approach means that 32-bit applications don't see any
> difference in paths etc whether they are running on a 32-bit or 64-bit
> kernel.  With the FreeBSD approach, applications that poke around too
> closely with dynamic linking need to understand the differences.
>
> The Solaris approach is definitely less painful in the short term
> but there may still be some pain in the future when it moves to
> a 64-bit-only environment.  The FreeBSD approach looks cleaner but
> is definitely more pain in the short term.  As for which is better:
> Have a read of:
> http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=421
>
> --
> Peter Jeremy


Just as an aside, this approach (64-bit OS is 32-bit by default) is the one
employed by many other OSes: MacOS X, Windows XP/Vista, many Linuxen,
etc.... All of these systems actually are based upon the model where the
majority of software is provided as pre-built binaries. I also don't think
that this is a Linux phenomenon so much as just an "easy way out" for the
likes of Fedora, Mandrake, SuSE, etc...

FreeBSD's model tends to expect that new software will be built from ports,
while it provides some pre-built binaries for convenience.

Gentoo (GNU/Linux) also employs a similar approach, and I think that
Gentoo/amd64 treats the system as natively 64-bit by default (at least such
is the case on my Gentoo/ppc64 box). They seem to be attempting to support
or promote (not sure which) the lib32/lib64 phenomenon though and all my lib
directories are actually symlinks to 'lib64'.

--
Coleman Kane


More information about the freebsd-amd64 mailing list