AppleTV 2 (black) - Build XBMC under 10.7.4 / Xcode 4.3

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Cranial Offline
Fan
Posts: 738
Joined: Aug 2008
Reputation: 3
Location: Sydney, Australia
Post: #1
Just for my own amusement, I've been trying to build XBMC for iOS/ATV2 under Lion 10.7.4 and Xcode 4.3.

Xcode 4.3 has moved to everything being wrapped up in a .app and is now located in /Applications. There is no /Developer anymore.

This is how it's gone so far:

First up I was getting errors of autoconf not found. Realised that autoconf, automake, lib tool and stuff are no longer packaged with Xcode. I'm sure there's reasons for this, and I'm also none of those reasons help us end users in any way.....

Did some googling, and found a guide for installing the latest versions of these tools from source on 10.6.8, and luckily this script works for 10.7.4.

Got it from here: Install tools - How-to

Basically this is the script:

Code:
curl -O http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
tar -xzvf m4-1.4.13.tar.gz
cd m4-1.4.13
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
tar -xzvf autoconf-2.65.tar.gz
cd autoconf-2.65
./configure --prefix=/usr/local # ironic, isn't it?
make
sudo make install
cd ..
# here you might want to restart your terminal session, to ensure the new autoconf is picked up and used in the rest of the script
curl -O http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
tar xzvf automake-1.11.tar.gz
cd automake-1.11
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz
tar xzvf libtool-2.2.6b.tar.gz
cd libtool-2.2.6b
./configure --prefix=/usr/local
make
sudo make install

So after getting these tools installed I managed to progress a little further.

Next issue I realised that the build scripts and what not all look for /Developer, and as this no longer exists we had a problem. To solve this I symlinked /Developer to /Applications/Xcode.app/Contents/Developer .

This got me further.

So with all of this I've managed to get to make xcode_depends but during that process it errors out with:

Code:
/usr/bin/ranlib: file: dllloader.a(ldt_keeper.o) has no symbols
make -C lib
make -C ffmpeg
Makefile:2: config.mak: No such file or directory
Makefile:45: /common.mak: No such file or directory
Makefile:84: /libavutil/Makefile: No such file or directory
Makefile:84: /library.mak: No such file or directory
Makefile:161: /doc/Makefile: No such file or directory
Makefile:162: /tests/Makefile: No such file or directory
make[2]: *** No rule to make target `/tests/Makefile'.  Stop.
make[1]: *** [ffmpeg] Error 2
make: *** [dvdpcodecs] Error 2

Well, that's as far as I've gotten so far. Run out of time to investigate any further for now, but thought maybe this info would be useful to anyone else messing around with it.

And of course, any of the steps I've done come with a zero responsibility guarantee... if your computer breaks, your cat dies, or your ear gets itchy, it isn't my fault!
find quote
davilla Online
Team-XBMC Developer
Posts: 11,389
Joined: Feb 2008
Reputation: 64
Post: #2
Pull mainline and rebuild depends. It will take care of all that for you now. Xcode3/Xcode4 support under 10.6 sdk has just been added.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
Cranial Offline
Fan
Posts: 738
Joined: Aug 2008
Reputation: 3
Location: Sydney, Australia
Post: #3
Wow, I just can't keep up with you guys. Awesome, I'll give it a go.

Wait, so you're saying all the steps are unnecessary now? As in autoconf and symlinking /Developer and stuff ?
(This post was last modified: 2012-05-12 02:15 by Cranial.)
find quote
davilla Online
Team-XBMC Developer
Posts: 11,389
Joined: Feb 2008
Reputation: 64
Post: #4
(2012-05-12 02:12)Cranial Wrote:  Wow, I just can't keep up with you guys. Awesome, I'll give it a go.

Wait, so you're saying all the steps are unnecessary now? As in autoconf and symlinking /Developer and stuff ?

Yep, the depends bootstrap will build autoconfig if needed and find Xcode and it's SDKs.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
Cranial Offline
Fan
Posts: 738
Joined: Aug 2008
Reputation: 3
Location: Sydney, Australia
Post: #5
(2012-05-12 04:21)davilla Wrote:  Yep, the depends bootstrap will build autoconfig if needed and find Xcode and it's SDKs.

Awesome. Didn't think this would happen so quickly with all the other merges to mainline and everything happening right now.

Thanks for your work Davilla.
find quote
Cranial Offline
Fan
Posts: 738
Joined: Aug 2008
Reputation: 3
Location: Sydney, Australia
Post: #6
Just cleaned up all of my previous stuff, removing autconf and the symlink so I could test it out clean.

Now errors out with this:

Code:
Making all in man
Updating man page autoreconf.1
PATH="../tests:../build-aux:$PATH"; \
    export PATH; \
    /bin/sh /Users/lowey/Source/xbmc/tools/darwin/depends/autoconf/autoconf-2.63/build-aux/missing --run help2man \
        --include=autoreconf.x \
        --include=./common.x \
        --source='GNU Autoconf 2.63' \
        --output=autoreconf.1.t `echo 'autoreconf' | sed 's,.*/,,'`
/Users/lowey/Source/xbmc/tools/darwin/depends/autoconf/autoconf-2.63/build-aux/missing: line 52: help2man: command not found
WARNING: `help2man' is missing on your system.  You should only need it if
     you modified a dependency of a manual page.  You may need the
     `Help2man' package in order for those modifications to take
     effect.  You can get `Help2man' from any GNU archive site.
make[4]: *** [autoreconf.1] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [autoconf-2.63/bin/autoconf] Error 2
make: *** [/Users/Shared/xbmc-depends/toolchain/bin/autoconf] Error 2
./bootstrap: line 17: autoconf: command not found

I'm guessing help2man is going to be needed to be added to the requirements?
find quote
davilla Online
Team-XBMC Developer
Posts: 11,389
Joined: Feb 2008
Reputation: 64
Post: #7
help2man is already there, make clean in tools/darwin/depends 1st.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
davilla Online
Team-XBMC Developer
Posts: 11,389
Joined: Feb 2008
Reputation: 64
Post: #8
make sure you install xcode's command-line tools.

you might also need to do

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
Cranial Offline
Fan
Posts: 738
Joined: Aug 2008
Reputation: 3
Location: Sydney, Australia
Post: #9
Thanks for your time Davilla,

For some reason clean isn't working on depends, I'll have to try to nut out what I've messed up. Might just end up dumping the source and starting completely fresh. But for now, yes, it's all my errors Wink
find quote
davilla Online
Team-XBMC Developer
Posts: 11,389
Joined: Feb 2008
Reputation: 64
Post: #10
make distclean is the big nuke in depends.

both make clean and make distclean always works, if not, I'd like to see your errors.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
Cranial Offline
Fan
Posts: 738
Joined: Aug 2008
Reputation: 3
Location: Sydney, Australia
Post: #11
(2012-05-12 15:54)davilla Wrote:  make distclean is the big nuke in depends.

both make clean and make distclean always works, if not, I'd like to see your errors.

I've run make distclean in depends. Then git pull in xbmc.

I get to ./bootstrap and error out with this:

Code:
Making all in man
Updating man page autoreconf.1
PATH="../tests:../build-aux:$PATH"; \
    export PATH; \
    /bin/sh /Users/lowey/Source/xbmc/tools/darwin/depends/autoconf/autoconf-2.63/build-aux/missing --run help2man \
        --include=autoreconf.x \
        --include=./common.x \
        --source='GNU Autoconf 2.63' \
        --output=autoreconf.1.t `echo 'autoreconf' | sed 's,.*/,,'`
/Users/lowey/Source/xbmc/tools/darwin/depends/autoconf/autoconf-2.63/build-aux/missing: line 52: help2man: command not found
WARNING: `help2man' is missing on your system.  You should only need it if
     you modified a dependency of a manual page.  You may need the
     `Help2man' package in order for those modifications to take
     effect.  You can get `Help2man' from any GNU archive site.
make[4]: *** [autoreconf.1] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [autoconf-2.63/bin/autoconf] Error 2
make: *** [/Users/Shared/xbmc-depends/toolchain/bin/autoconf] Error 2
./bootstrap: line 17: autoconf: command not found

I'm a bit lost now?

If I install autoconf, automake etc. myself I get a lot further but error out during make xcode_depends (sorry, haven't got the error saved, it take a while to re run all of this).

*edit*

With autoconf already installed, I get this far:

Code:
checking for a thread-safe mkdir -p... ../build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for strip... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip
configure: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org.
checking for gcc... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... configure: error: cannot compute suffix of executables: cannot compile and link
See `config.log' for more details.
configure: error: ./configure failed for gettext-tools
make[1]: *** [gettext-0.17] Error 1
make: *** [gettext] Error 2

I'm sure the issues are somehow my fault with all the uneducated messing around I've been doing on my system.

*edit 2*

Noticed some related commits have just gone through, I'll make distclean and start again.
(This post was last modified: 2012-05-13 08:32 by Cranial.)
find quote
Cranial Offline
Fan
Posts: 738
Joined: Aug 2008
Reputation: 3
Location: Sydney, Australia
Post: #12
Okay, dumped my install of autoconf, automate, m4 and libtool.

Ran distclean on depends.

Git pull.

First run of of ./bootstrap errors out on autoconf/help2man.

Ran ./bootstrap again and all good.

configure runs fine.

make errors out with this:

Code:
tar xf /Users/Shared/xbmc-depends/tarballs/libcdio-0.82.tar.gz

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
make[1]: *** [libcdio-0.82] Error 2
make: *** [libcdio] Error 2
find quote
g-off Offline
Fan
Posts: 631
Joined: Aug 2011
Reputation: 3
Post: #13
I may be pointing out the obvious here but maybe tarball is broken and needs to be downloaded again?
Try doing a
tar tvf /Users/Shared/xbmc-depends/tarballs/libcdio-0.82.tar.gz
and see if it freaks out
find quote
Cranial Offline
Fan
Posts: 738
Joined: Aug 2008
Reputation: 3
Location: Sydney, Australia
Post: #14
I'm such a dumbass, I'm sure I'd tried that, but obviously missed it.

Thanks g-off.

Sometimes the obvious isn't that obvious.
find quote
davilla Online
Team-XBMC Developer
Posts: 11,389
Joined: Feb 2008
Reputation: 64
Post: #15
remember, things are still in flux as we hunt down local differences.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
Post Reply