Front page | perl.wxperl.users |
Postings from February 2010
Re: wxPerl on Snow Leopard
From: Michael Ziege
February 8, 2010 11:46
Re: wxPerl on Snow Leopard
Message ID: email@example.com
although I followed the instructions below and also read various posts
about building wxPerl on Mac OS X Snow Leopard, I still got errors
I built wxWidgets 32bit version as explained here:
with the following flags:
arch_flags="-arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags"
which gave me a working wxWidget installation, the demo applications
running fine and wx-config --version returning
Then I downloaded and installed perl-5.10.1 in 32bit mode like this (as
mentioned in Ed's post below):
./Configure -Dld='env MACOSX_DEPLOYMENT_TARGET=10.5 gcc' -Darch=i386 \
-Accflags="-arch i386 -nostdinc -B$SDK/usr/include/gcc
-Aldflags="-arch i386 -Wl,-syslibroot,$SDK" \
-Dprefix=/usr/local -Alddlflags="-arch i386" \
-Dld="env MACOSX_DEPLOYMENT_TARGET=10.5 cc" -de
Everything went fine. Tests passed almost all, except
Then I downloaded and installed Alien-wxWidgets-0.50. It recognised the
installed wxWidget under /usr/local, tests passed.
Finally I checked out wxPerl from the svn repository:
svn co https://wxperl.svn.sourceforge.net/svnroot/wxperl/wxPerl/trunk wxPerl
After configuration with:
perl Makefile.PL --wx-version=2.8
make gives the following errors:
/usr/local/bin/perl script/make_v_cback.pl > cpp/v_cback_def.h
/usr/local/bin/perl script/copy_files.pl files.lst
cp cpp/overload.h blib/lib/Wx/cpp/overload.h
cp cpp/wxapi.h blib/lib/Wx/cpp/wxapi.h
cp cpp/constants.h blib/lib/Wx/cpp/constants.h
cp cpp/helpers.h blib/lib/Wx/cpp/helpers.h
cp cpp/setup.h blib/lib/Wx/cpp/setup.h
cp cpp/v_cback_def.h blib/lib/Wx/cpp/v_cback_def.h
cp cpp/streams.h blib/lib/Wx/cpp/streams.h
cp cpp/chkconfig.h blib/lib/Wx/cpp/chkconfig.h
cp cpp/compat.h blib/lib/Wx/cpp/compat.h
cp Opt blib/arch/Wx/build/Opt.pm
cp cpp/v_cback.h blib/lib/Wx/cpp/v_cback.h
cp cpp/event.h blib/lib/Wx/cpp/event.h
cp typemap blib/lib/Wx/typemap
cp cpp/e_cback.h blib/lib/Wx/cpp/e_cback.h
cp lib/Wx/Event.pm blib/lib/Wx/Event.pm
cp build/Wx/build/MakeMaker.pm blib/lib/Wx/build/MakeMaker.pm
cp build/Wx/Overload/Driver.pm blib/lib/Wx/Overload/Driver.pm
cp build/Wx/Overload/Handle.pm blib/lib/Wx/Overload/Handle.pm
cp lib/Wx/App.pm blib/lib/Wx/App.pm
cp build/Wx/build/MakeMaker/Hacks.pm blib/lib/Wx/build/MakeMaker/Hacks.pm
cp lib/Wx/Mini.pm blib/lib/Wx/Mini.pm
cp build/Wx/build/MakeMaker/Core.pm blib/lib/Wx/build/MakeMaker/Core.pm
cp lib/Wx/Timer.pm blib/lib/Wx/Timer.pm
cp build/Wx/build/Options.pm blib/lib/Wx/build/Options.pm
cp lib/Wx/Locale.pm blib/lib/Wx/Locale.pm
cp build/Wx/build/Utils.pm blib/lib/Wx/build/Utils.pm
cp lib/Wx/Api.pod blib/lib/Wx/Api.pod
cp lib/Wx/Thread.pod blib/lib/Wx/Thread.pod
cp lib/Wx/ArtProvider.pm blib/lib/Wx/ArtProvider.pm
cp lib/Wx/Loader.pod blib/lib/Wx/Loader.pod
cp build/Wx/build/MakeMaker/Any_OS.pm blib/lib/Wx/build/MakeMaker/Any_OS.pm
cp lib/Wx/RadioBox.pm blib/lib/Wx/RadioBox.pm
cp lib/Wx/Menu.pm blib/lib/Wx/Menu.pm
cp Wx.pm blib/lib/Wx.pm
cp build/Wx/build/MakeMaker/Win32.pm blib/lib/Wx/build/MakeMaker/Win32.pm
/usr/local/bin/perl script/wxperl_overload cpp/ovl_const.cpp
cp lib/Wx/RichText.pm ../../blib/lib/Wx/RichText.pm
-noprototypes -nolinenumbers -typemap
/usr/local/lib/perl5/5.10.1/ExtUtils/typemap -typemap ../../typemap
-typemap typemap RichText.xs > RichText.xsc && mv RichText.xsc RichText.c
g++ -arch i386 -UWX_PRECOMP -c -I. -I../..
-I/usr/local/include/wx-2.8 -fno-common -DPERL_DARWIN -no-cpp-precomp
-arch i386 -nostdinc -B/Developer/SDKs/MacOSX10.5.sdk//usr/include/gcc
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-I/opt/local/include -O3 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\"
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ RichText.c
RichText.c: In function ‘void XS_Wx__RichTextEvent_GetFlags(CV*)’:
RichText.c:206: error: expected type-specifier
RichText.c:206: error: expected unqualified-id before ‘&’ token
RichText.c:206: error: expected `)' before ‘&’ token
make: *** [RichText.o] Error 1
make: *** [subdirs] Error 2
make: *** [subdirs] Error 2
Is there a point I'm missing?
Thanks for any help.
Am 07.10.09 17:03, schrieb Ed Heil:
> Hey folks, just sharing a data point -- how I compiled my own Perl and
> then my own wxWidgets and wxPerl on Snow Leopard, making them
> backwards-compatible to Leopard (hopefully, haven't had a chance to
> test that yet).
> From here:
> I learned that wxWidgets on Snow Leopard doesn't work as a 64-bit
> build, you have to build it as 32-bits only. This is just as well
> since I wanted a build that was portable to Leopard anyway. I
> followed their instructions and compiled it this way:
> -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5
> I also set the prefix to /opt/d3/wx. That happens to be where I want
> this stuff.
> I modified my PATH to include /opt/d3/wx/bin so that I would pick up
> that wx-config command.
> I ran into a lot of trouble with my first build of Perl because it was
> 64-bit and wouldn't play nice with my newly built 32-bit wxWidgets
> when I tried to install Wx, so I had to start over and make a 32-bit
> perl (again, that's what I really wanted anyway cause I wanted this
> usable on older Intel machines running Leopard). I had a hard time
> figuring out how to build a thoroughly 32-bit perl on snow leopard.
> After a fair amount of trial and error and reading the README.macosx I
> came up with this (note that I'm installing it to /opt/d3/perl):
> export MACOSX_DEPLOYMENT_TARGET=10.5; export
> SDK=/Developer/SDKs/MacOSX10.5.sdk/; ./Configure -Dld='env
> MACOSX_DEPLOYMENT_TARGET=10.5 gcc' -Darch=i386 -Accflags="-arch i386
> -nostdinc -B$SDK/usr/include/gcc -B$SDK/usr/lib/gcc
> -isystem$SDK/usr/include -F$SDK/System/Library/Frameworks"
> -Aldflags="-arch i386 -Wl,-syslibroot,$SDK" -Dprefix=/opt/d3/perl
> -Alddlflags="-arch i386" -Dld="env MACOSX_DEPLOYMENT_TARGET=10.5 cc"
> once I installed it I updated my PATH, so now it starts with
> /opt/d3/wx/bin and /opt/d3/wx/bin.
> When building stuff using CPAN I occasionally ran into trouble with
> architecture clashes. I ended up writing a little script that
> aggressively set all the env variables I could think of to guarantee
> that we used my chosen SDK for everything, and sourcing it before
> doing any cpan install work:
> export MACOSX_DEPLOYMENT_TARGET=10.5
> export SDK=/Developer/SDKs/MacOSX10.5.sdk/
> export LD='env MACOSX_DEPLOYMENT_TARGET=10.5 gcc'
> export CCFLAGS="-arch i386 -nostdinc -B$SDK/usr/include/gcc
> -B$SDK/usr/lib/gcc -isystem$SDK/usr/include
> export LDFLAGS="-arch i386 -Wl,-syslibroot,$SDK"
> export LDDLFLAGS="-arch i386"
> export LD="env MACOSX_DEPLOYMENT_TARGET=10.5 cc"
> With all that done, I was able to install Alien::wxWidgets from
> source; it found /opt/d3/wx/bin/wx-config in my path, and I told it to
> use that.
> Then I was able to install Wx from source; I disabled stc because I
> hadn't built it.
> This recipe may or may not fill anyone else's needs but it seems to
> have worked out neatly for me, and hopefully it'll save somebody else
> some time.
> Ed Heil
Michael Ziege, eLearning coordinator, special division Geoscience
Faculty of Mathematics and Natural Sciences
University of Zurich
Winterthurerstr. 190, Y 25 K 08
Tel: +41 44 635 5261