Universal Binaries

Harry van der Wolf hvdwolf at gmail.com
Sat Jan 24 05:49:41 PST 2009


2009/1/24 Ryan Schmidt <ryandesign at macports.org>

> On Jan 23, 2009, at 09:11, <timlee at rochester.rr.com> <
> timlee at rochester.rr.com> wrote:
>
>  Joshua Root <jmr at macports.org> wrote:
>>
>>> Timothy Lee wrote:
>>>
>>>> Do you know if its possible for me (on leopard) to build x86 code (all
>>>> my macports ports) that will also run on Tiger?
>>>> Short of physical access to an intel 10.4 install, is there anything I
>>>> can do?
>>>>
>>>
I am the OSX bundle maintainer of avidemux (I maintain others too but via
other ways). I build my avidemux binaries and dependent libs as universal
ones on Leopard (using macports for all necessary libs) and the bundle
(including binary and necessary libraries) is used on Tiger as well as
Leopard. Note that avidemux is available as macports package, but I build
(b)leeding edge svn bundles. I need to compile avidemux for i386 and ppc
from svn trunk and "lipo merge" them to make them universal.
The bundle contains some complicated libraries (glib, pango, cairo, gtk and
they are all built universal and without X11 (so native aqua) via macports)
and this works fine. (Two libs are not yet in macports and I need to make
ports as soon as I have time to do so, but maintaining three packages and
developing my own takes quite some spare time)



>
>>> Don't forget to use Reply All so the discussion goes to the list as
>>> well. There are no guarantees that this will work, but the way to do
>>> what you want would be to set universal_target to 10.4,
>>> universal_sysroot to /Developer/SDKs/MacOSX10.4u.sdk, and
>>> universal_archs to i386. Then build everything with +universal (best to
>>> add it to your variants.conf).
>>>
>>
> Also set x11prefix to /usr/X11R6; Leopard's X11 prefix /usr/X11 does not
> exist on Tiger.
>
>
>  Thanks for the tip!
>> Has anyone tried this? Success/failure stories?
>>
>
> openssl failed for me when I tried it this way on Leopard. Switching back
> to 10.5 and the 10.5 SDK fixed it.


90% builds OK.
Some other binaries and libraries fail to build this universal way: gimp
(now built as i386 aqua), sqlite3 (is a pain in the backside anyway),
subversion (svn), wxwidgets (wxMac), wine, libGLEW, libOrbit, libSDL*,
liba52*, libav*, libbonobo, libboost, libgnome, libpoppler and some others.
I build these binaries/libraries with "sudo port <package> -universal"  as I
have +universal (and -x11) in my variants.conf

Next to that: some libraries can be build universal as static libs, but not
as dynamic libs like x264 (can't remember the other one)
Also: some libs are so POSIX compliant that, when build via macports on
Leopard, they can't be used on Tiger.  (lib)xvid is one. I need to build
that one manually.

Note: I mentioned in a earlier post in this thread that I have
# the SDK "sysroot" to use
universal_sysroot       /Developer/SDKs/MacOSX10.4u.sdk
in my macports.conf. Technically speaking you can just as well use the 10.5
SDK as that one builds for 10.4 too as long as you set the deployment target
to 10.4. I choose the 10.4 SDK as quite some packages are not yet "10.5 SDK
optimized" which led to some errors (pango and gtk). The 10.5 SDK uses some
"new stuff" that works fine on Leopard but not on Tiger as most ports are
actually linux based and ported to Mac. Maybe they are already fixed but I
did not check yet.

Harry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20090124/f751e34b/attachment.html>


More information about the macports-users mailing list