quarnster / boxeebox-xbmc

Aiming to get xbmc up and running on the boxee box
Other
118 stars 44 forks source link

Build changes part deux #152

Closed quasar1 closed 9 years ago

quasar1 commented 9 years ago

@quarnster Just need you to try this on OSX... I need some sleep now... :D

quasar1 commented 9 years ago

@quarnster I have been testing this further and found although this compiles there was something in the back of my mind telling me something was amiss with the toolchain's GCC. It was finding and using host headers for cross compiling which is basically a bad thing.

Further research led me to a patch for GCC which fixes the issue of GCC using host headers during cross compilation, this seems to correct the glib issue 100%.

I am just about to do a fresh build from scratch to make sure there aren't any other issues that arise from using the GCC patch. If I'm successful I will do another PR.

quasar1 commented 9 years ago

@quarnster I tried to get glib to cross compile with the added libiconv and gettext but failed. I think there's more I can do there but for now I need a way to exclude the building of libiconv and gettext so I can come back to the cross compiling issue at a later date. It's seems Linux doesn't need iconv and gettext and confuses things further when it tries to cross compile.

Default settings: set(ENABLE_ICONV OFF CACHE BOOL "Whether to build with iconv support or not") set(ENABLE_GETTEXT OFF CACHE BOOL "Whether to build with gettext support or not") set(ENABLE_GLIB_LINUX ON CACHE BOOL "Whether to build with glib_linux support or not") set(ENABLE_GLIB_OSX OFF CACHE BOOL "Whether to build with glib_osx support or not")

quasar1 commented 9 years ago

Got the linux glib to cross compile in the end but I had to compile it without cross compiling first. I think autoconf causes issues when cross compiling in this build environment.

Am I right in thinking I need to add CONF_PARAM for iconv, gettext, glib_linux and glib_osx to the boxeebox/CMakeLists.txt ?

At the moment this works for me so I might add these changes to the test repo as I'm getting a bit behind in the Kodi updates.

Apologies for the aggravation this may be causing...

quarnster commented 9 years ago

You're running linux in a virtual environment, right? It might actually be better to run freebsd instead as then it'll be much clearer that you are cross compiling for a different system. But do whatever seems to work and causes less pain :)

quasar1 commented 9 years ago

i386 or amd64? Any specific version? Just out of interest what environment do you use?

On a semi related note, for the Boxee intel sdk I'm having issues compiling, my cmake is too old (2.8). So setting up a different virtual build env makes sense.

quarnster commented 9 years ago

amd64 would be even better as that is another step away from what the boxeebox uses. I'm just building directly on my macbook pro laptop, no virtual environment.

quasar1 commented 9 years ago

So what apps do you need to build on the macbook? I'm toying with a yosemite zone VM install or maybe a dual boot, never used OSX before.

quarnster commented 9 years ago

If it errors out trying to install anything, you might have to install XCode via the App Store (do you have appstore access with the vm?) and then install the command line tools from inside Xcode. I think you just have to open up xcode and go to preferences or something to find that option, don't recall of the top of my head.

OSX is based on FreeBSD so uses BSD versions instead of gnu versions of some programs. That's the reason you have to brew install gnu-sed and do:

ln -s /usr/local/bin/gsed sed
export PATH=$PWD:$PATH

so that gnu-sed is used instead of bsd-sed for example. Also as clang is default on OSX you have to do:

export CC=/usr/local/bin/gcc-4.9
export CXX=/usr/local/bin/g++-4.9
export CPP=/usr/local/bin/cpp-4.9
export LD=/usr/local/bin/gcc-4.9

so that it uses gcc instead.

Using FreeBSD is probably similar in that department, with the major difference being that instead of brew whatever package-manager FreeBSD uses nowadays is used instead.

Also I personally like iTerm2 instead of the standard terminal program, but that's optional.

quasar1 commented 9 years ago

Well yosemite zone on Oracle Virtual Box was a complete failure even after extensive customisations and jumping through hoops. Mainly due to my CPU being too new. However, on VMware workstation it installed without issue and I'm up and running with the app store currently downloading xcode. Only time will tell if it can produce the goods without further issues. Its going to be a learning curve from here on in to find my way around OSX and the compiling stuff. Thanks for all your information, a great help.

quasar1 commented 9 years ago

Update: yosemite zone was very unstable, found a Mavericks .vmdk which seems to work perfect even though I can only use 2 cores on my 4 core CPU. Just having a go with the boxeebox-sdk, seems I need a number of additional prerequisites including 'go'. Might invest in a cheap Mac Mini :)

quarnster commented 9 years ago

Or try freebsd for free ;)

Might give a freebsd vm a go myself, it's been a really long time since I ran it and I'd like to check it out

quasar1 commented 9 years ago

I had a brief go at freebsd the other day and hit a number of walls, thought OSX may be a bit easier getting an env which was a bit more noob friendly. I may go back to it at some point. I started with the latest version 10.1 amd64 VM image, I found it overwhelming so ditched it to try the hackintosh OSX methods and that was even more overwhelming until I found the Mavericks .vdmk. Not sure if I took the correct path, only time will tell.

quasar1 commented 9 years ago

FYI. Ready made FreeBSD 10.1 VM's for Virtualbox and VMWare. http://www.osboxes.org/freebsd/

Untested.