Some questions about Git and Compiling 0.5b10

Hey guys - I am trying to get the new version compiling. I want to play around with the source - although my c++ and mac programming experience is pretty non-existent.



My first question about Git - Elan said to run this to update your branch “git pull origin/v0.5” but I get this when I try


Dans-MacBook-Pro:xbmc-fork dan$ git pull origin/v0.5<br />
fatal: 'origin/v0.5': unable to chdir or not a git archive<br />
fatal: The remote end hung up unexpectedly<br />
Cannot get the repository state from origin/v0.5<br />
Dans-MacBook-Pro:xbmc-fork dan$



What do I need to do to just update the the newest branch?

I did have an older version compiling but when I rechecked out the branch yesterday and I get this error:

Dans-MacBook-Pro:xbmc-fork dan$ xcodebuild -parallelizeTargets -configuration Debug<br />
=== BUILDING NATIVE TARGET XBMC WITH CONFIGURATION Debug ===<br />
<br />
Checking Dependencies...<br />
Invalid value '4.2' for GCC_VERSION<br />
** BUILD FAILED **


Do I need to update GCC? I am using XCode 3.0 and had an older version compiling a few weeks ago.

I tried blanking out GCC_VERSION and it compiled but when I run it starts up and crashes

Dans-MacBook-Pro:xbmc-fork dan$ export XBMC_HOME=/Path/To/OSXBMC.app/Contents/Resources/XBMC<br />
Dans-MacBook-Pro:xbmc-fork dan$ ./build/Debug/XBMC<br />
Cannot install Smart Crash Reporter.<br />
sh: /Users/dan/Library/Application Support/XBMC/XBMCHelper: No such file or directory<br />
Fatal error encountered, aborting<br />
Error log at /Users/dan/Library/Logs/xbmc.log<br />
Abort trap



A copy of the stack

Thread 0 Crashed:<br />
0   libSystem.B.dylib			 	0x90097b9e __kill + 10<br />
1   libSystem.B.dylib			 	0x9010eec2 raise + 26<br />
2   libSystem.B.dylib			 	0x9011e47f abort + 73<br />
3   XBMC							  0x000da995 CApplication::FatalErrorHandler(bool, bool, bool) + 173 (Application.cpp:565)<br />
4   XBMC							  0x000e9a0e CApplication::Create(void*) + 4492 (Application.cpp:1448)<br />
5   XBMC							  0x005a453c SDL_main + 580 (XboxMediaCenter.cpp:85)<br />
6   XBMC							  0x009f776c -[SDLMain



Which might have to do with me blanking out the GCC_VERSION :)
Like I said, I'm new to Git and C++ and Mac programming (I am a C# developer) so any help would be great.
Thanks!

I am now building with GCC 4.2, so you’ll need to download the iPhone SDK (which sounds like the wrong thing, but it works and XCode 3.1 has some nice bugfixes over XCode 3.0).



In terms of the pull, try:



$ git pull origin v0.5



and see if that works better for you.

Elan - thanks for the quick response. Updating XCode to 3.1 fixed the GCC_VERSION issue.

And let’s just say the crash I was seeing had was because OSXBMC wasn’t in /Path/To/OSXBMC.app :slight_smile: I really have to read things instead of just cut and pasting.



The git issue was a bit more odd. I had to add this to xbmc-fork/.git/config


[remote "origin"]<br />
		url = git://github.com/elan/xbmc-fork.git<br />
		fetch = +refs/heads/*:refs/remotes/origin/*



Then run "git pull origin v0.5" and it says "Already up-to date". So hopefully that is working now. Not sure why I needed to add that - but maybe someone will find this useful.

Thanks!

Instead of manually adding to your .git/config file you can do:



$ git remote add origin git://github.com/elan/xbmc-fork.git



Just FYI :slight_smile:

Ok - I had this building fine but had to reinstall my OS.

Now I keep getting this error when I compile



Undefined symbols:<br />
  "_smbc_urlencode", referenced from:<br />
	  CSMB::URLEncode(CStdStr<char> const&)in FileSmb.o<br />
ld: symbol(s) not found<br />
collect2: ld returned 1 exit status<br />
** BUILD FAILED **<br />
<br />
The following build commands failed:<br />
XBMC:<br />
	Ld /Users/dan/projects/xbmc-fork2/build/Debug/XBMC normal i386<br />
(1 failure)



I even found the backup I made of my projects and found the clone that was compiling without a problem before and it is giving me the same error.

All the macport stuff ran without a problem (I ran it again and it says everything is up to date), I am using the iPhone SDK and my OS is up to date.
Any ideas?

I have that symbol:



nm /opt/local/lib/samba3/libsmbclient.dylib | grep _smbc_urlencode<br /> 00001350 T _smbc_urlencode<br /> <br /> Let's see what version I have:<br /> <br /> sudo port installed | grep samba

samba3 @3.0.28_0 (active)

That’s it! MacPorts updated to Samba to 3.2.0 on 7/2. It doesn’t seem to be compatible with Plex.



To down grade, it’s kind of a pain. In case anyone runs into the same issue first deactive the current version of Samba:

$ sudo port deactivate samba3 @3.2.0_0+darwin_9 - or whatever version you are on or you could uninstall Samba too.



To downgrade you must look through the macports SVN for the revision they upgraded to the new version. You want to go back to and install it from there. This tells you how to do it - http://trac.macports.org/wiki/howto/InstallingOlderPort.



For this I went to http://trac.macports.org/browser/trunk/dpo…amba3?rev=34870



Create a Samba3 folder on you destop and grab the Portfile (click on it and then Download in he original format) and move it into Samba3. Create a new folder in Samba3 called files and grab patch-source_smbd_utmp_c.diff and move it into files.



Browse to it in the terminal and run $sudo port install. This will get you to @3.0.28a_0+darwin_9, not quite what Elan had but Plex should compile.



Again - thanks for the quick response Elan!

Note that it’s just the one symbol that needs changing at this point - they’ve gone to an upper case SMBC. The XBMC project is also considering moving to 3.2 as it apparently has better compatibility with Vista.



One thing to watch is that v3.2 has moved to the GPLv3 license. I have no idea whether or not that has any implications one way or another for a GPLv2+ licensed project, but it may pay to have a read up before jumping over to that for later versions of Plex.



Cheers,

Jonathan

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