• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 10
[MAC] Compiling on OSX Lion / Xcode 4.1`
#1
Greetings,

Was curious if anyone has successfully built XBMC on Lion with Xcode 4.1 yet?

I was reading README.osx.. starting line by line with its instructions, installed Xcode (Which now must be downloaded from App store).

Can get through 3.1 (bootstrap, configure in depends dir).

Can't make it through the 'make -C tools/darwin/depends/xbmc

autopoint doesn't exist natively with xcode 4.1 on Lion (not sure if it did in any prios release), but after installing gettext.. that issue is resolved

Next issue, boost doesn't exist.. compiled it via 'brew'.. though no matter where I placed it, or modifying includes, xbmc would never agree it was found (im sure my mistake)

The stranger part.. It was setting g++ and cpp to use versions that don't exist on lion, not sure how it determined to use those versions. (Ie it was hard linking to /usr/bin/cpp-4.0 and /usr/bin/g++-4.0, but on Lion with xcode 4.1, both of those are 4.2. I'd guess having something to do with "configuring for darwin osx-10.4-i386"

I can figure out the boost issue im sure, but curious why it might be assuming wrong compilers..

Here is config.log from AE branch.

Thanks!


This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by darwin-depends configure 1.00, which was
generated by GNU Autoconf 2.61. Invocation command line was

$ ./configure --with-darwin=osx

## --------- ##
## Platform. ##
## --------- ##

hostname = Living-Room-Mini.local
uname -m = x86_64
uname -r = 11.0.1
uname -s = Darwin
uname -v = Darwin Kernel Version 11.0.1: Wed Jun 29 19:53:22 PDT 2011; root:xnu-1699.23.2~1/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 11.0.1: Wed Jun 29 19:53:22 PDT 2011; root:xnu-1699.23.2~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3
Primary memory available: 2.00 gigabytes
Default processor set: 74 tasks, 345 threads, 4 processors
Load average: 0.50, Mach factor: 3.48
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/X11/bin
PATH: /usr/local/git/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1720: result: configuring for darwin osx-10.4-i386
configure:1722: result: creating hostroot at /Users/Shared/xbmc-depends
configure:1729: result: creating build toolchain at /Users/Shared/xbmc-depends/toolchain
configure:1733: result: creating tarball storage at /Users/Shared/xbmc-depends/tarballs
configure:1737: result: creating hostroot directories at /Users/Shared/xbmc-depends/osx-10.4_i386
configure:1887: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by darwin-depends config.status 1.00, which was
generated by GNU Autoconf 2.61. Invocation command line was

CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status

on Living-Room-Mini.local

config.status:570: creating Makefile
config.status:570: creating Makefile.include
config.status:570: creating config.site
config.status:570: creating config.site.mk
configure:2760: result: setting up config.site files
configure:2764: result: setting up python26 Makefile

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=

## ----------------- ##
## Output variables. ##
## ----------------- ##

DEFS='-DPACKAGE_NAME=\"darwin-depends\" -DPACKAGE_TARNAME=\"darwin-depends\" -DPACKAGE_VERSION=\"1.00\" -DPACKAGE_STRING=\"darwin-depends\ 1.00\" -DPACKAGE_BUGREPORT=\"http://trac.xbmc.org\"'
ECHO_C='ECHO_N=''
ECHO_T=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
PACKAGE_BUGREPORT='http://trac.xbmc.org'
PACKAGE_NAME='darwin-depends'
PACKAGE_STRING='darwin-depends 1.00'
PACKAGE_TARNAME='darwin-depends'
PACKAGE_VERSION='1.00'
PATH_SEPARATOR=':'
SHELL='/bin/sh'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
use_arch='i386'
use_darwin='osx'
use_prefix='/Users/Shared/xbmc-depends/osx-10.4_i386'
use_sdk='10.4'
use_staging='/Users/Shared/xbmc-depends'
use_toolchain='/Users/Shared/xbmc-depends/toolchain'

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME "darwin-depends"
#define PACKAGE_TARNAME "darwin-depends"
#define PACKAGE_VERSION "1.00"
#define PACKAGE_STRING "darwin-depends 1.00"
#define PACKAGE_BUGREPORT "http://trac.xbmc.org"

configure: exit 0


This was on a 2011 mac mini intel video, base model.
Reply
#2
This might need to wait till after AudioEngine changes allow for the removal of SDLMixer, since that's one of the major dependency problems.
Reply
#3
./configure --help
Reply
#4
davilla Wrote:./configure --help

Hey Davilla,

Thanks.. That's actually where I started, along with the README.osx.

When at the step to configure in xbmc/tools/darwin/depends , the README is pretty specific with the options required. Is the README out of date?

configure --help in that specific depends category only has 4 options really (beyond paths, etc). --with-darwin (for building with osx as default), --with-arch, which says i386 is default for osx (though I tried x86_64 as well), and --with-sdk.. which is says 4.2 is for IOS, not osx.

Could you possibly tell me what it is that I'm missing in those options?
Something that's not in the README.osx it would seem?

Looking at one of your posts from 2011-07-09, I can't even issue the with-sdk command without it failing. To use sdk 4.2 (Im guessing you are saying not to use 10.4 with Lion perhaps.. i dunno what you meant beyond reading the configure help over and over).. if you specify darwin=osx, sdk=4.2 is not vaild (error in configure of --with-sdk=4.2).

Don't think it can be the arch type, if you try to build with x86_64 it fails pretty quick

pcre_exec.c:4996: warning: incompatible implicit declaration of built-in function ‘memcpy’
make[3]: *** [pcre_exec.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [pcre-7.9/.libs/(LIBNAME).dylib] Error 2

I suspect you're saying to catch the part that the opions are 4.2 or 10.4, and that 4.2 is not valid for osx, so you must use 10.4, which I don't have, because I'm running xcode 4.1 (per the subject of this thread). However, the README.osx says to download the latest xcode, which is what I did "Install latest Xcode." (section 3.0 of readme), then it goes on to say to get SDK 10.4, which you can't with 4.1.

I guess I was just confused by it telling me to get the latest, but also to get an unobtainable SDK with that version

I guess the main response to my title is "No, you can't compile XBMC on Lion with xcode 4.1.. use a much older xcode". correct?
Reply
#5
sdk=4.2, silly rabbit

--with-sdk build depend libs using sdk 10.4 (default osx) or
4.2 (default ios)

4.2 is ios

try --with-sdk=10.5 or 10.6 but that's going to require some changes in the xcode project to find the depends as the prefix changes.

You best best is to install xcode 3.x on Lion. Then you will not have any issues. You have have xcode4 and xcode3 installed at the same time.
Reply
#6
I've installed xcode 3.2 and copy MacOSX10.4u.sdk from other mac running 10.6.8. I'm trying to compile xbmc on lion, but I 've got this error at make step building xbmc dependences:

Code:
install_name_tool: can't open file: /Users/Shared/xbmc-depends/osx-10.4_i386/lib/libboost_date_time.dylib (No such file or directory)
make[1]: *** [.installed] Error 1
make: *** [boost] Error 2

anybody can help me?

BR
Reply
#7
most likely there some other error before that.

make -C tools/darwin/depends/boost distclean
make -C tools/darwin/depends/boost

pastebin the entire output.
Reply
#8
Here you are Davilla.

http://pastebin.com/bvLPexpU

Thx!

BR
Reply
#9
I've tried to rebuild all the xbmc dependences. (make distclean under tool/darwin/dependences). New error:

http://pastebin.com/V9FKYw04

BR
Reply
#10
i5Js Wrote:Here you are Davilla.

http://pastebin.com/bvLPexpU

Thx!

BR

dies here "ld: library not found for -lstdc++"

Did you symlink the install of 10.4sdk into xcode4 or did you just drag it into place. If the later, that's not correct, you can't just copy sdk's around.
Reply
#11
thx, but how can I fix it?
Reply
#12
davilla Wrote:dies here "ld: library not found for -lstdc++"

Did you symlink the install of 10.4sdk into xcode4 or did you just drag it into place. If the later, that's not correct, you can't just copy sdk's around.

You're right, I just copy it....

The problem is that It's impossible install xcode 4.02 in Lion.
Reply
#13
see http://stackoverflow.com/questions/53334...to-xcode-4
Reply
#14
I think there is an easier way:

** Convert xcode 3.0.2 and xcode 4.02 dmg into a read/write image with disk utility.
** Open both of them and, show inside Xcode and iOS SDK installer.
** For xcode 3.2.6: edit iPhoneSDKSL and find function isDevToolsCompatible(). Then remove 10.7 and put 10.8 or 10.9 for example... Save it and Install xcode.
** For xcode 4.0.2: edit the same file and delete all checks about OS version. Save it and install xcode.

Results:

Code:
kaya:depends i5Js$ ls -l /Developer/SDKs/
total 0
drwxr-xr-x  7 root  wheel  238 18 may  2009 MacOSX10.4u.sdk
drwxr-xr-x  7 root  wheel  238 24 jun  2010 MacOSX10.5.sdk
drwxr-xr-x  7 root  wheel  238 15 feb  2011 MacOSX10.6.sdk
kaya:depends i5Js$


Building xbmc dependences....

EDIT 1: xbmc dependences build successfully !

Building environment....

EDIT2: error in make xcode_depends step:

Code:
make -C tools/EventClients/Clients/OSXRemote
xcodebuild -sdk macosx10.4 -configuration Release
dyld: Library not loaded: @rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation
  Referenced from: /Developer/usr/bin/xcodebuild
  Reason: image not found
make[1]: *** [all] Trace/BPT trap: 5
make: *** [eventclients] Error 2


BR
Reply
#15
Ooooo, that's a nice trick.
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 10

Logout Mark Read Team Forum Stats Members Help
[MAC] Compiling on OSX Lion / Xcode 4.1`0