Kodi Community Forum
Developers wanted to help port XBMC for Mac to PPC (PowerPC) processor architecture - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: Developers wanted to help port XBMC for Mac to PPC (PowerPC) processor architecture (/showthread.php?tid=36229)

Pages: 1 2 3 4 5 6 7 8


- davilla - 2009-02-24

Beenje Wrote:Compiling all the external codec/libs was of course one the first thing I did (including the static libs like SDL - I renamed them lib*-powerpc-osx.a).
I first compiled everything in command line. I created the ARCH=powerpc-osx.
When my exe crashed, I compiled using Xcode because I think it would be easier to debug from there.
Btw I saw that Xcode uses libcdio-osx.a whereas in command line it does not use this static lib (it is compiled).

Is there any specific flag I should use to compile SDL on PPC?
I used the script buildSDL-osx.sh. Should I use --disable-altivec? (I saw --disable-nasm is used for x86).

sounds good, did not know how far you had gone.

libcdio-osx.a is mostly a carry over from the old build style (no make).

nasm is the assembler, typically for mmx, sse2 stuff. That's similar to altivec so I would mimic that.

you crash one up from CGraphicContext::SetVideoResolution. I would set a breakpoint there and start stepping though till it crashes, then start looking at why it crashed.


- davilla - 2009-02-24

Just wanted to add, if you feed me patches I can review and move them into linuxport svn.


- Beenje - 2009-02-25

I think I found my problem!
The script buildSDL-osx.sh patches the libSDL source using SDL-1.2.13-xbmc.patch.
It redefines the function SDL_SetVideoMode by adding the argument "sharedContext":
SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags, void* sharedContext)

In Surface.cpp we call the function with only 4 arguments.
So my pointer shared (which was set to null before the call) was set to a random value and made my application crashes.

This libSDL patch is not coherent with the code...
Is there anything in that patch that is necessaryHuh Or should we build the libSDL without it?

PS: If I compile the libSDL without this patch, my exe goes a bit further (the main window opens!) but crashes shortly after (not linked to SDL apparently)... :-( More debug to come :-)


- Beenje - 2009-02-25

davilla Wrote:Just wanted to add, if you feed me patches I can review and move them into linuxport svn.

I have 2 or 3 files not really clean yet (not compatible with x86).
I'll fix that before.

I have one question about that.
For several codecs (like MP3Codec) I had to add "-lbundle1.o" otherwise I got the error:
ld: symbol dyld_stub_binding_helper not defined (usually in crt1.o/dylib1.o/bundle1.o) for inferred architecture ppc
Should I make a special case for powerpc-osx in the Makefile?
Or can I add this "-lbundle1.o" for intel (osx) as well?

Btw do you know why this is needed on PPC and not x86?
Or did I miss something?


- davilla - 2009-02-25

Beenje Wrote:I think I found my problem!
The script buildSDL-osx.sh patches the libSDL source using SDL-1.2.13-xbmc.patch.
It redefines the function SDL_SetVideoMode by adding the argument "sharedContext":
SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags, void* sharedContext)

In Surface.cpp we call the function with only 4 arguments.
So my pointer shared (which was set to null before the call) was set to a random value and made my application crashes.

This libSDL patch is not coherent with the code...
Is there anything in that patch that is necessaryHuh Or should we build the libSDL without it?

PS: If I compile the libSDL without this patch, my exe goes a bit further (the main window opens!) but crashes shortly after (not linked to SDL apparently)... :-( More debug to come :-)


I would build without the SDL patch for now. A lot in there is legacy from the previous osx devs and I'm not really sure it's needed.


- davilla - 2009-02-25

Beenje Wrote:I have 2 or 3 files not really clean yet (not compatible with x86).
I'll fix that before.

I have one question about that.
For several codecs (like MP3Codec) I had to add "-lbundle1.o" otherwise I got the error:
ld: symbol dyld_stub_binding_helper not defined (usually in crt1.o/dylib1.o/bundle1.o) for inferred architecture ppc
Should I make a special case for powerpc-osx in the Makefile?
Or can I add this "-lbundle1.o" for intel (osx) as well?

Btw do you know why this is needed on PPC and not x86?
Or did I miss something?

yes, make a special case for powerpc-osx in the Makefile?

I'll look into this further tonight to get the proper syntax that will match what we tend to use on the intel side.


- Beenje - 2009-02-26

I saw two libs that I haven't built:
xbmc/lib/libportaudio/libportaudio-osx.a
system/cdrip/lame_enc-osx.so

For portaudio, we use the lib fom MacPorts, so I guess this one should be removed. Right?
What about lame_enc? Is it used? How was it built?


- davilla - 2009-02-26

Beenje Wrote:I saw two libs that I haven't built:
xbmc/lib/libportaudio/libportaudio-osx.a
system/cdrip/lame_enc-osx.so

For portaudio, we use the lib fom MacPorts, so I guess this one should be removed. Right?
What about lame_enc? Is it used? How was it built?

you should be linking to libportaudio.dylib, libportaudio-osx.a is legacy.

lame_enc-osx.so is built via the command-line make (which Xcode also does)
specific is

make -C xbmc/cdrip

this should have been build during the

make externals more_libs

step


- Beenje - 2009-02-26

davilla Wrote:lame_enc-osx.so is built via the command-line make (which Xcode also does)
specific is

make -C xbmc/cdrip

this should have been build during the

make externals more_libs step

No, sorry. I checked again.
make -C xbmc/cdrip only builds some objects (including EncoderLame.o).

lame_enc-osx.so comes from svn.
And actually I couldn't find where it is used.
So I guess it is legacy.


- davilla - 2009-02-26

Beenje Wrote:No, sorry. I checked again.
make -C xbmc/cdrip only builds some objects (including EncoderLame.o).

lame_enc-osx.so comes from svn.
And actually I couldn't find where it is used.
So I guess it is legacy.

ok, must have slipped through my review of external libs/codecs

try

port install lame

and see if there is a Liblame_enc in opt.

if not don't worry about it.


- Beenje - 2009-02-28

davilla Wrote:Just wanted to add, if you feed me patches I can review and move them into linuxport svn.

I think I can send you a first patch.
The application starts. We can't do much after :p
There is a problem with the textures...
That's a start anyway.

Do you want the static libs as well? (they can be built with buildSDL-osx.sh, build-libcurl-osx.sh and make-xbmc-lib-osx.sh)


- davilla - 2009-02-28

Beenje Wrote:I think I can send you a first patch.
The application starts. We can't do much after :p
There is a problem with the textures...
That's a start anyway.

Do you want the static libs as well? (they can be built with buildSDL-osx.sh, build-libcurl-osx.sh and make-xbmc-lib-osx.sh)

just need the patch to source and any make files.

you can email them to davilla [at] xbmc [dot] org


- Beenje - 2009-03-08

davilla Wrote:just need the patch to source and any make files.

you can email them to davilla [at] xbmc [dot] org

Have you had time to look at the patch I sent?
I noticed that I forgot one Makefile.in Blush
I fixed a few problems with the texture since as well.

I can send you an updated patch via email or XBMC Patch-Tracker.

Gonna work on the fonts now.


- davilla - 2009-03-08

Beenje Wrote:Have you had time to look at the patch I sent?
I noticed that I forgot one Makefile.in Blush
I fixed a few problems with the texture since as well.

I can send you an updated patch via email or XBMC Patch-Tracker.

Gonna work on the fonts now.

In the queue, I hope to get to it today now that TimidityCodec and the fullscreen return to windowed problems are fixed.


- Beenje - 2009-03-08

davilla Wrote:In the queue, I hope to get to it today now that TimidityCodec and the fullscreen return to windowed problems are fixed.

I just sent you a new patch with a few more fixes.
The fonts are displayed properly now Big Grin
You can take direclty this patch and forget the previous one I sent.

I published this patch as well on the trac system.
Maybe it makes it easier for you:
http://trac.xbmc.org/ticket/6038