Hey ruoso! Guess what our magic typemap just came back to bite us in the ass. :) On the mac we don't have my_perl defined for us. Maybe if I put it in the header of each .XS file saying with a #ifdef MacOSX ?
Any way let me know what you think. This is the last step stopping us from complete build on Mac. Also Mike can you update your SDL_perl git repo. And post your output for perl Build realclean perl Build.PL perl Build regards, Kartik On Sun, Feb 21, 2010 at 8:32 PM, Mike Stok <[email protected]> wrote: > Hi Kartik, > > The Channels.c file is attached. The chunk of code around line 499 is > this: > > #line 491 "lib/SDL/Mixer/Channels.c" > Mix_Chunk * RETVAL; > #line 174 "lib/SDL/Mixer/Channels.xs" > RETVAL = Mix_GetChunk(chan); > #line 495 "lib/SDL/Mixer/Channels.c" > ST(0) = sv_newmortal(); > if (RETVAL) { > void** pointers = malloc(2 * sizeof(void*)); > pointers[0] = (void*)RETVAL; > pointers[1] = (void*)my_perl; > sv_setref_pv( ST(0), CLASS, (void*)pointers ); > } else { > XSRETURN_UNDEF; > } > > } > XSRETURN(1); > } > > > Mike > > > > On Feb 21, 2010, at 8:28 PM, Kartik Thakore wrote: > > Ok I updated everything as you said. > > Can you post your lib/SDL/Mixer/Channels.c ? I don't see where the my_perl > is coming from? > > On Sun, Feb 21, 2010 at 8:07 PM, Mike Stok <[email protected]> wrote: > >> >> On Feb 21, 2010, at 7:22 PM, Kartik Thakore wrote: >> >> Mike, >> >> Can you remove --libdir=/usr/lib64 103 in inc/My/Builder/Unix.pm. And try >> this again? >> >> from line >> >> >> I unpacked a clean version from git and removed the --libdir=/usr/lib64 >> from the command: >> >> $cmd = 'CC="gcc ${BUILD64}" USE_ARCH=64' . >> " ./configure --prefix=$prefixdir --enable-static=no >> --enable-shared=yes" . >> ' --disable-mmx --libdir=/usr/lib64' . >> " CFLAGS=-I$prefixdir/include LDFLAGS=-L$prefixdir/lib"; >> >> perl Build.PL >> perl Build >> perl Build install >> >> worked OK. (I did have to CPAN install File::Fetch, Archive::Extract, and >> DIgest::SHA1) >> >> For the http://github.com/kthakore/SDL_perl/tree/redesign archive I just >> downloaded inc/My/Builder/Darwin.pm had a missing = at line 42 - the >> install_base assignment: >> >> sub special_build_settings >> { >> my $self = shift; >> $self->{c_source} = ['launcher.m']; >> $self->{c_sources} = 'MacOSX'; >> $self->{install_base} "SDLPerl.app/Contents/Resources"; >> } >> >> I had to add a "my"at line 50: >> >> my $cflags = `sdl-config --cflags`; >> >> and line 54 >> >> my $libs = `sdl-config --libs`; >> >> That got the perl Build.PL to work, but then the perl Build step gave up >> at: >> >> /usr/bin/gcc-4.2 -I/opt/local/lib/perl5/5.8.9/darwin-2level/CORE >> -DXS_VERSION="2.3_7" -DVERSION="2.3_7" >> -I/Users/mike/perl5/lib/perl5/auto/share/dist/Alien-SDL/v0.8.1_6aca4eea/include/SDL >> -D_GNU_SOURCE=1 -D_THREAD_SAFE >> -I/Users/mike/perl5/lib/perl5/auto/share/dist/Alien-SDL/v0.8.1_6aca4eea/include >> -I/Users/mike/perl5/lib/perl5/auto/share/dist/Alien-SDL/v0.8.1_6aca4eea/include/smpeg >> -I/usr/X11R6/include -I/usr/X11R6/include/GL -I/usr/X11R6/include/gl >> -I/usr/include -I/usr/local/include -DHAVE_SDL -DHAVE_SDL_MIXER -fPIC -c -O2 >> -arch x86_64 -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp >> -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include -O3 -o >> lib/SDL/Mixer/Channels.o lib/SDL/Mixer/Channels.c >> lib/SDL/Mixer/Channels.c: In function ‘XS_SDL__Mixer__Channels_get_chunk’: >> lib/SDL/Mixer/Channels.c:499: error: ‘my_perl’ undeclared (first use in >> this function) >> lib/SDL/Mixer/Channels.c:499: error: (Each undeclared identifier is >> reported only once >> lib/SDL/Mixer/Channels.c:499: error: for each function it appears in.) >> error building lib/SDL/Mixer/Channels.o from 'lib/SDL/Mixer/Channels.c' at >> /Users/mike/perl5/lib/perl5/ExtUtils/CBuilder/Base.pm line 114. >> >> Mike >> >> >> >> On Sun, Feb 21, 2010 at 6:40 PM, Kartik Thakore <[email protected] >> > wrote: >> >>> Hey kmx, >>> >>> There an ENV var we can for forcing the prefix on the configure right? >>> >>> >>> >>> Kartik Thakore >>> >>> On 2010-02-21, at 5:29 PM, Mike Stok <[email protected]> wrote: >>> >>> >>> On Feb 21, 2010, at 4:13 PM, Kartik Thakore wrote: >>> >>> Hi mike I think we have the fix for Alien done. Can you try the github? >>> >>> >>> I tried, using MacPorts Perl and local::lib (because I don't want to >>> install stuff in "system places") and the perl Build step failed: >>> >>> creating libSDL_gfx.la >>> (cd .libs && rm -f libSDL_gfx.la && ln -s ../libSDL_gfx.la libSDL_gfx.la) >>> test -z "/usr/lib64" || ./install-sh -c -d "/usr/lib64" >>> mkdir: /usr/lib64: Permission denied >>> make[1]: *** [install-libLTLIBRARIES] Error 1 >>> make: *** [install-am] Error 2 >>> ###ERROR### [512] during make ... at inc/My/Builder/Unix.pm line 84. >>> >>> I'm happy to try using sudo, but I don't like polluting my system. Let >>> me know what you want me to do. >>> >>> Looks like you have got further, >>> >>> Cheers, >>> >>> Mike >>> >>> >>> On Sun, Feb 21, 2010 at 2:51 PM, Mike Stok < <[email protected]> >>> [email protected]> wrote: >>> >>>> >>>> On Feb 21, 2010, at 2:43 PM, Kartik Thakore wrote: >>>> >>>> hey mike we are closer to a 64 bit mac fix. >>>> >>>> Can you give us the output for >>>> >>>> perl -e 'use Config; print $Config{archname}' >>>> >>>> on you mac? >>>> >>>> >>>> For MacPorts perl (and the perl I built myself): >>>> >>>> ratdog:~ mike$ perl -le 'use Config; print $Config{archname}' >>>> darwin-2level >>>> >>>> For the Apple supplied perl: >>>> >>>> ratdog:~ mike$ /usr/bin/perl -le 'use Config; print $Config{archname}' >>>> darwin-thread-multi-2level >>>> >>>> This is on a Core 2 Duo MacBook Pro running OS X 10.6.2 build 10C540 if >>>> that matters. >>>> >>>> Mike >>>> >>>> >>>> >>>> >>>> On Sun, Feb 21, 2010 at 12:10 AM, Kartik Thakore >>>> <<[email protected]> >>>> [email protected]> wrote: >>>> >>>>> Thanks for trying. >>>>> >>>>> >>>>> On Sat, Feb 20, 2010 at 11:52 PM, Mike Stok < <[email protected]> >>>>> [email protected]> wrote: >>>>> >>>>>> Hi Kartik, >>>>>> >>>>>> On Feb 20, 2010, at 9:30 PM, Mike Stok wrote: >>>>>> >>>>>> Maybe more later... >>>>>> >>>>>> >>>>>> I think I might succeed by setting the build architecture in my >>>>>> macports to i386 in /opt/local/etc/macports/macports.conf, but that means >>>>>> I'll have to rebuild a few things (e.g. macports perl). I'll try in the >>>>>> morning and let you know. >>>>>> >>>>>> I saw your email to teh SDL developers, so I'll check for replies in >>>>>> the morning too. >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Mike >>>>>> >>>>>> -- >>>>>> >>>>>> Mike Stok < <[email protected]>[email protected]> >>>>>> >>>>>> <http://www.stok.ca/%7Emike/>http://www.stok.ca/~mike/<http://www.stok.ca/%7Emike/> >>>>>> >>>>>> The "`Stok' disclaimers" apply. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> -- >>>> >>>> Mike Stok < <[email protected]>[email protected]> >>>> >>>> <http://www.stok.ca/%7Emike/>http://www.stok.ca/~mike/<http://www.stok.ca/%7Emike/> >>>> >>>> The "`Stok' disclaimers" apply. >>>> >>>> >>>> >>>> >>>> >>> >>> -- >>> >>> Mike Stok < <[email protected]>[email protected]> >>> >>> <http://www.stok.ca/%7Emike/>http://www.stok.ca/~mike/<http://www.stok.ca/%7Emike/> >>> >>> The "`Stok' disclaimers" apply. >>> >>> >>> >>> >>> >> >> -- >> >> Mike Stok <[email protected]> >> http://www.stok.ca/~mike/ <http://www.stok.ca/%7Emike/> >> >> The "`Stok' disclaimers" apply. >> >> >> >> >> > > -- > > Mike Stok <[email protected]> > http://www.stok.ca/~mike/ <http://www.stok.ca/%7Emike/> > > The "`Stok' disclaimers" apply. > > > > > >
