Problems building plex

Python Foundation issues
I've just spent the morning trying to get Plex to build. I'm getting a python related issue, and unfortunately I don't know too much about python and osx. The error message I'm getting (building within xcode, debug build)

Running custom shell script (1 error)
Traceback (most recent call last):
File "./build-number.py", line 4, in ?
from Foundation import NSMutableDictionary
ImportError: No module named Foundation

Is this some PYTHONPATH issue? I believe the Foundation module is standard on osx 1.5 - but for the life of my I can't find it. I'm using python 2.4.5 installed from MacPorts. (checkout of Elan's 0.5 branch)

Hey Pundy, sorry about that! You need to install the Python Objective-C bridge with MacPorts (sudo port install py-pyobjc). Let me know if you have any more issues.



Elan,
I get a compile error while trying to install the py-pyobjc... According to [https://trac.macports.org/ticket/13287](https://trac.macports.org/ticket/13287) it doesn't build on leopard! (but you obviously managed somehow - care to share the secret? :) )

There seems to be mention on py-pyobjc2 in macports - but I am unable to install it getting error "Error: Port py-pyobjc2 not found"
Ideas?


Minor update - I was able to install py-pyobj2 (needed to selfupdate macports), but this hasn't helped. I still get the same Foundation not found error in python.
hmmm


Ahh the magic of macs... (I develop for Linux/Solaris 99%) of the time so this mac thing is a bit new to me.

The steps I took: (just in case others are having similar issues)

1. sudo port upgrade
1. Installed py-pyobjc2 from mac ports (not 100% if I needed this) (sudo port install py-pyobjc2)

2. I found that for some reason (I don't fully know why), that /opt/local/bin/python was pointing to python24 in same dir. Executing this python would load python 2.4 version that couldn't find Foundation module. However I found that /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python was able to deal with the Foundation import... I linked /opt/local/bin/python to this 2.5 version and that seems to get past the python issue. (fingers crossed this is ok - ie using python 2.5 in the build, but still linking against python24 package...)

3. Seems there is some issue with samba3 3.2.0_0 where is doesn't contain one of the required symbols for plex '_smbc_urlencode_', but downgrading to 3.0.28a does the job. Dmetz's post at: [http://forums.plexapp.com/index.php?s=&amp...post&p=3317](http://forums.plexapp.com/index.php?s=&showtopic=401&view=findpost&p=3317) has all the details on doing this.

Successful build! :)

Congratulations, and sorry for the problems. We’ll likely be moving to the new SAMBA to avoid at least some of the pain.



Anyways, welcome to the club :slight_smile:



No worries on the problems. Couple small things coming out of it all tho.
1. probably need to add the py-pyobjc2 port (if it is really needed - I wasn't convinced after everything I did) into the build instructions (on wiki)
2. The how-to build document still mentions XBMC_HOME, but I had to set PLEX_HOME to get it to run. I guess this is following some of the rebranding work. (I don't have permissions to change the wiki)

I'm about to work on a couple smaller tasks to familiarize myself with the code - get a party mode action working (as I want to be able to launch party mode from a single button click instead of going through the menus), and possibly a hibernate action also (to let people sleep the mini from remote). After that I'll get a bit more dirty in the code. Hope this is cool. :)

I’m an happy amature that want to get started with the code. Done some simple C programing and high level programming and scripting before, and now I want to familiarize myself with Plex.



I’ve cloned and updated my git branch, done some happy hacking to get samba to link and to get the python script to run. Had to download the boost port by the way. Should this be included in the ports list?



Now I have a build that completes, but when I am done I seem to be missing an awful lot of files in my target. Comparing my Plex.app package content with Plex.app v0.5RC3 I am missing:



Resources: (What I have)

Plex/PlexHelper

Plex.icns

Plex.nib

(Missing a lot of resource files compared with v0.5RC3)



MacOS (What I have)

Plex

CrashReporter



Frameworks (Missing completely)



What is it that I have done wrong? Did I completely mess things up when I updated my two files referencing the new samba 3.2 symbols? (SMBC) :slight_smile:



I had the same issue with python where I had to make a symbolic link to Apple's python.framework for version 2.5 in the /opt/local/bin.

I edited the wiki to reflect the product name change from XBMC and OSXMBC to that of PLEX.

Woot! After a year or so, I have finally successfully checked out and compiled an executable and ran it without appreciable errors (I'm definitely a much better software tester than developer and that length of time of failure after failure certainly proves it).

Though it promptly crashed out when the automatice library updates of the music files crashed out with a bus error ;)

No it won't launch as it it looking for "Unable to load Q:\language\english\strings.xml: Failed to open file at line 0" and crashes out.

No log as far as I can tell is created anywhere.

(so is the PLEX_HOME not correct?)

This is what I set:

echo $PLEX_HOME

/Users/gordo/Public/plex/build/Debug/Plex.app/Contents/Resources/plex

echo $XBMC_HOME

/Users/gordo/Public/plex/build/Debug/Plex.app/Contents/Resources/plex

I have PLEX_HOME set to “/Path/To/Plex.app/Contents/Resources/Plex”



Note you that should be pointing it at an official downloaded binary, not the built binary in build/debug.



Well, there it is, I deleted the official binary and had a symbolic link to the just-built one. Another thing to note in the WIKI I think. Works and runs...Now to debugging what causes the library scanning of music files crash :)

Thanks to you (and the B-Dawg).

I have built Plex successfully however when I launch it I get a similar error message dialog box saying

"Unable to load Q:\language\english\strings.xml: Failed to open file at line 0"

I have PLEX_HOME as an environment variable set in Xcode set to /Applications/Plex.app/Contents/Resources/Plex.

I always get the message on launch. What is the problem?


UPDATE : I got it working but only if it is launched from within Xcode. For some reason manually launching the built Plex.app from the Finder does not work. Not sure why...

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.