Front page | perl.wxperl.users |
Postings from February 2010
Re: wxPerl on Snow Leopard
Thread Previous
|
Thread Next
From:
Michael Ziege
Date:
February 8, 2010 11:46
Subject:
Re: wxPerl on Snow Leopard
Message ID:
20100208151806.27851.qmail@lists-nntp.develooper.com
hi
although I followed the instructions below and also read various posts
about building wxPerl on Mac OS X Snow Leopard, I still got errors
compiling it.
I built wxWidgets 32bit version as explained here:
http://wiki.wxwidgets.org/Development:_wxMac#Building_under_10.6_Snow_Leopard
with the following flags:
arch_flags="-arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.5"
./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags"
LDFLAGS="$arch_flags" \
OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags"
which gave me a working wxWidget installation, the demo applications
running fine and wx-config --version returning
2.8.10
Then I downloaded and installed perl-5.10.1 in 32bit mode like this (as
mentioned in Ed's post below):
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=/usr/local -Alddlflags="-arch i386" \
-Dld="env MACOSX_DEPLOYMENT_TARGET=10.5 cc" -de
Everything went fine. Tests passed almost all, except
../lib/locale.t.
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:
bash-3.2$ make
/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
touch copy_files
cp lib/Wx/Event.pm blib/lib/Wx/Event.pm
cp build/Wx/build/MakeMaker/Win32_MinGW.pm
blib/lib/Wx/build/MakeMaker/Win32_MinGW.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/Any_wx_config.pm
blib/lib/Wx/build/MakeMaker/Any_wx_config.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 build/Wx/build/MakeMaker/MacOSX_GCC.pm
blib/lib/Wx/build/MakeMaker/MacOSX_GCC.pm
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
cp build/Wx/build/MakeMaker/Win32_MSVC.pm
blib/lib/Wx/build/MakeMaker/Win32_MSVC.pm
/usr/local/bin/perl script/wxperl_overload cpp/ovl_const.cpp
cpp/ovl_const.h overload.lst
Writing 'cpp/ovl_const.h'.
Writing 'cpp/ovl_const.cpp'.
touch overload
cp lib/Wx/RichText.pm ../../blib/lib/Wx/RichText.pm
/usr/local/bin/perl /usr/local/lib/perl5/5.10.1/ExtUtils/xsubpp
-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/lib/wx/include/mac-ansi-release-2.8
-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
-B/Developer/SDKs/MacOSX10.5.sdk//usr/lib/gcc
-isystem/Developer/SDKs/MacOSX10.5.sdk//usr/include
-F/Developer/SDKs/MacOSX10.5.sdk//System/Library/Frameworks
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-I/opt/local/include -O3 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\"
"-I/usr/local/lib/perl5/5.10.1/darwin-2level/CORE" -DWXPL_EXT
-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[2]: *** [RichText.o] Error 1
make[1]: *** [subdirs] Error 2
make: *** [subdirs] Error 2
Is there a point I'm missing?
Thanks for any help.
- Michael
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:
>
> http://wiki.wxwidgets.org/Development:_wxMac#Building_under_10.6_Snow_Leopard
>
> 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"
> -de
>
> 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
> -F$SDK/System/Library/Frameworks"
> 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
> ed@donor.com
--
Michael Ziege, eLearning coordinator, special division Geoscience
Faculty of Mathematics and Natural Sciences
University of Zurich
Winterthurerstr. 190, Y 25 K 08
CH-8057 Zurich
Switzerland
Tel: +41 44 635 5261
Mail: michael.ziege@geo.uzh.ch
Web: http://www.geo.uzh.ch/elearning
Thread Previous
|
Thread Next