Compiling PS3 Media Server on OSX

For help and support with issues specific to Mac OS X
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Re: Compiling PS3 Media Server on OSX

Postby pk.oddity » Sun Jun 05, 2011 2:56 pm

I've been lurking in the background keeping touch with all things OSX.

However, once I realized I couldn't play HQ MKV files on any of the lastest stable releases of PMS I thought I'd give compiling my own copy of PMS a go. 1.23 to be exact.

I was actually able to do it quite easily using XCode 4 and this http://otmanix.de/english/2011/02/12/compiling-ps3-media-server-on-mac-os-x/.

Yet, when I tried to compile Raptor399's .sh version of it, I came across this error.

Code: Select all
ar rc libz.a adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
gcc -mmacosx-version-min=10.5 -isystem /Developer/SDKs/MacOSX10.5.sdk -arch i386 -I/Users/PK/pms/target/include -fPIC -DPIC -c -o objs/zutil.o zutil.c
ar: libz.a: Inappropriate file type or format
make: *** [libz.a] Error 1
make: *** Waiting for unfinished jobs....
Fatal error occurred, aborting build.

I'm pretty new at all this, but it is kind of fun. Even though I have 1.23 compiled I'd like to try Raptor399's. Any help would be nice. Thanks.
pk.oddity
 
Posts: 11
Joined: Sun Jun 05, 2011 2:43 pm

Re: Compiling PS3 Media Server on OSX

Postby Raptor399 » Sun Jun 05, 2011 6:04 pm

If you look closely, my script is actually following Otmanix's recipe. ;-)
It goes a step further though, because Otmanix uses the precompiled binaries that come shipped with PMS and I specifically wanted to update those.

I don't have Xcode 4 myself (using 3.2.6 here), maybe I should install it to see what errors pop up.

As for the error you get... What strikes me as odd is that there are actually two commands there:

Code: Select all
ar rc libz.a [...] zutil.o
gcc [...] -o objs/zutil.o zutil.c


The first command requires the file that is the result of the second command! This may be an unwanted side effect of the multithreaded compilation.

Try editing the script to set the number of threads to 1:
Code: Select all
THREADS="1"


Let me know if that works for you. If it does, I will remove the unsafe multithreading from the script.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Compiling PS3 Media Server on OSX

Postby delight » Sun Jun 05, 2011 10:06 pm

I would love to try a newer version of PMS, but I my girlfriend won't let me install more stuff on her mac so I can't try compiling it myself :cry: Is there any plans for releasing a compiled dmg-file of the latest version of this wonderful software for OSX any time soon, or should I just try convincing my gf that she needs Xcode in order to use her computer safely?

thanks
delight
 
Posts: 1
Joined: Sun Jun 05, 2011 10:28 am

Re: Compiling PS3 Media Server on OSX

Postby pk.oddity » Mon Jun 06, 2011 12:06 am

Raptor I tried playing with the thread count and still got the same error. It kept stopping on the file format error so I deleted the zlib folder and files, retried and it worked...

but now I'm getting this error.
Code: Select all
config.status: creating expat_config.h
/bin/sh ./libtool --silent --mode=compile gcc -I./lib -I. -mmacosx-version-min=10.5 -isystem /Developer/SDKs/MacOSX10.5.sdk -arch x86_64 -I/Users/PK/pms/target/include -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H -o lib/xmlparse.lo -c lib/xmlparse.c
/bin/sh ./libtool --silent --mode=compile gcc -I./lib -I. -mmacosx-version-min=10.5 -isystem /Developer/SDKs/MacOSX10.5.sdk -arch x86_64 -I/Users/PK/pms/target/include -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H -o lib/xmltok.lo -c lib/xmltok.c
lib/xmlparse.c:81:2: error: #error memmove does not exist on this platform, nor is a substitute available
make: *** [lib/xmlparse.lo] Error 1
make: *** Waiting for unfinished jobs....
Fatal error occurred, aborting build.


EDIT: I think this issue is with XCode 4, gonna try reinstalling..
pk.oddity
 
Posts: 11
Joined: Sun Jun 05, 2011 2:43 pm

Re: Compiling PS3 Media Server on OSX

Postby kickstart » Mon Jun 06, 2011 4:59 am

Noticed this error in the traces section after building and patching using Raptor's script:
Code: Select all
main] INFO  20:36:43.904 Checking MPlayer font cache. It can take a minute or so.
[main] ERROR 20:36:44.035 Cannot launch MPlayer / Check the presence of osx/mplayer ...
java.io.IOException: Cannot run program "osx/mplayer" (in directory "/var/folders/he/heYT--HeF0GHqbo0mmkqf++++TI/-Tmp-/ps3mediaserver"): error=2, No such file or directory
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) ~[na:1.6.0_24]
   at net.pms.PMS.checkProcessExistence(PMS.java:271) [pms.jar:na]
   at net.pms.PMS.init(PMS.java:414) [pms.jar:na]
   at net.pms.PMS.get(PMS.java:1324) [pms.jar:na]
   at net.pms.PMS.main(PMS.java:1410) [pms.jar:na]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_24]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_24]
   at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_24]
   at apple.launcher.LaunchRunner.run(LaunchRunner.java:116) [na:na]
   at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51) [na:na]
   at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52) [na:na]
Caused by: java.io.IOException: error=2, No such file or directory
   at java.lang.UNIXProcess.forkAndExec(Native Method) ~[na:1.6.0_24]
   at java.lang.UNIXProcess.<init>(UNIXProcess.java:53) ~[na:1.6.0_24]
   at java.lang.ProcessImpl.start(ProcessImpl.java:91) ~[na:1.6.0_24]
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) ~[na:1.6.0_24]
   ... 11 common frames omitted
[main] INFO  20:36:44.038 Done!
kickstart
 
Posts: 6
Joined: Mon Jun 06, 2011 4:50 am

Re: Compiling PS3 Media Server on OSX

Postby Raptor399 » Mon Jun 06, 2011 7:12 am

pk.oddity wrote:Raptor I tried playing with the thread count and still got the same error. It kept stopping on the file format error so I deleted the zlib folder and files, retried and it worked...


Hmmm, strange. I do not see why deleting would help. But hey, if it works, it works! ;-)

About the new error: that is also strange. Check "src/expat-2.0.1/lib/macconfig.h", line 22. That should read "#define HAVE_MEMMOVE", so your error should not occur because "src/expat-2.0.1/lib/xmlparse.c", line 76 reads:

Code: Select all
/* Handle the case where memmove() doesn't exist. */
#ifndef HAVE_MEMMOVE
#ifdef HAVE_BCOPY
#define memmove(d,s,l) bcopy((s),(d),(l))
#else
#error memmove does not exist on this platform, nor is a substitute available
#endif /* HAVE_BCOPY */
#endif /* HAVE_MEMMOVE */


Maybe something went wrong with "configure"?
I don't know what influence XCode 4 has on the whole process.

kickstart wrote:Noticed this error in the traces section after building and patching using Raptor's script:


That is a known bug in PMS, see issue 968. It is just a message, though. PMS actually does know where to find the binaries, despite the error. You can safely ignore it.
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: Compiling PS3 Media Server on OSX

Postby pk.oddity » Mon Jun 06, 2011 8:34 am

XCode 4 gave me issues (googling memmove error came up with a lot finds / info). So I tried XCode 3.2.5 and it was able to compile. I have a working copy, but was still unable to properly play HQ MKV files.. issues with the audio encoding, but maybe I just need to mess around with PMS settings. (I did do the ac3 fixed edits).
pk.oddity
 
Posts: 11
Joined: Sun Jun 05, 2011 2:43 pm

Re: Compiling PS3 Media Server on OSX

Postby kickstart » Mon Jun 06, 2011 10:05 am

pk.oddity wrote:XCode 4 gave me issues (googling memmove error came up with a lot finds / info). So I tried XCode 3.2.5 and it was able to compile. I have a working copy, but was still unable to properly play HQ MKV files.. issues with the audio encoding, but maybe I just need to mess around with PMS settings. (I did do the ac3 fixed edits).


Do the MKV files happen to be encoded with AAC audio?
kickstart
 
Posts: 6
Joined: Mon Jun 06, 2011 4:50 am

Re: Compiling PS3 Media Server on OSX

Postby daboblin » Mon Jun 06, 2011 10:31 am

daboblin wrote:Hmm, I did the same and it's still failing at the same point. I wonder if the dev tools need to be at a certain rev? I have both Xcode 3.2.5 and Xcode 4 installed, but 3.2.5 is in /Developer. I could try updating to 3.2.6 I guess.


So I updated to 3.2.6 and I got a failed build, complaining about the fact that libjpeg was a 32-bit binary. I removed the old binary library, rebuilt and hey presto it's working! I haven't tested audio etc yet but at least it's running and detecting the PS3. Great.
daboblin
 
Posts: 5
Joined: Sat Jun 04, 2011 4:59 am

Re: Compiling PS3 Media Server on OSX

Postby pk.oddity » Mon Jun 06, 2011 2:41 pm

Do the MKV files happen to be encoded with AAC audio?


Actually, I was mistaken MKV files came up "Corrupt File" when I tried to play them. The files were MPEG Audio encoded btw.
pk.oddity
 
Posts: 11
Joined: Sun Jun 05, 2011 2:43 pm

PreviousNext

Return to Mac OS X Support

Who is online

Users browsing this forum: No registered users and 6 guests