# from John Ralls
# on Monday 04 December 2006 08:50 pm:
Yes, I did build as a universal binary. Yes, it is working now. It is a m=
ess and a complete pain though. (Don't worry, I totally blame apple (well,=
and maybe Schwern a little, but only because he uses a mac.))
I'm trying to get an appbundle out for dotreader and hoping that I can mana=
ge it this way instead of trying to build two complete perl trees or someth=
ing.
>Those are just part of the wx-config --libs command which MakeMaker =A0
>doesn't know how to handle. You can safely ignore them.
Ahh, but the problem is that ExtUtils::MM doesn't know that the "/Developer=
/SDKs/blahblahblah" and "ppc" and "i386" parts go along with the -options w=
hich it is "ignoring".
So, it passes them along and I get compile commands like
"cc ... /Developer/SDKs/MacOSX10.4u.sdk ppc i386 -lfoo"
This gets me some lovely messages like
"ppc - file not found"
Which *really* had me lost until I realized that only
the dashed "unrecognized" bits were being stripped.
I suppose Alien::wxWidgets should try to do something
about those options (unless the plan is to move from MM
to CBuilder?)
*************************************
How I got it working: Hack wx-config
from:
echo $_ldflags "-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
-arch ppc -arch i386 -framework QuickTime ...
to:
echo $_ldflags "-framework QuickTime ...
Then build Alien with the WX_CONFIG set, plus --no-build or whatever.
Now, you can compile Wx-0.65 with this cargo-culty setup (I'm
not sure whether the -isysroot is needed in the latter.)
make -j 2 \
'PASTHRU_INC=3D-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -ar=
ch ppc' \
'OTHERLDFLAGS=3D-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -a=
rch ppc'
(see http://beta.nntp.perl.org/group/perl.macosx/2006/03/msg9703.html)
=46or CBuilder stuff (not Wx), I had to hack my Config.pm because
=2D-extra_compile_flags wouldn't get the -arch options
in the right spot or something.
$ grep Developer $(which_module Config)
'ccflags' =3D> '-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 =
=2Darch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-=
aliasing -I/usr/local/include',
'cppflags' =3D> '-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -=
arch ppc -no-cpp-precomp -no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN=
-no-cpp-precomp -fno-strict-aliasing -I/usr/local/include',
Then I have to pass --extra_linker_flags=3D"-arch i386 -arch ppc"
to Build.PL
There is probably a better way to get that setup with CPAN.pm, etc
but I'm currently not having any luck from the various "o conf"
directives.
I suspect it would be much better to quit using apple's perl and
build my own. Then at least Config.pm would be correct, and
maybe the directory layout would approach sanity.
I also suspect that it might be easier to just build two trees and
then just lipo the corresponding .bundle or .dylib files together.
=2D-Eric
=2D-=20
"Everything should be made as simple as possible, but no simpler."
=2D-Albert Einstein
=2D--------------------------------------------------
http://scratchcomputing.com
=2D--------------------------------------------------
|