configure: error: C preprocessor "/lib/cpp" fails sanity check
#1
Trying to build for Android x86 on a Mac. configure fails with the error in the subject.

OS X El Cap 10.11.6
Android NDK r10e
Xcode 8.0 Build version 8A218a
config.log: http://pastebin.com/Rx2Dt8VG

My configure command:
$ ./configure --with-tarballs=/Users/Shared/xbmc-depends/tarballs --host=i686-linux-android --with-sdk-path=/Users/poertel/Library/Android/sdk --with-ndk=/Users/poertel/Library/Android/sdk/ndk-bundle --with-toolchain=/Volumes/android-dev/android/android-toolchain-x86/android-17 --prefix=/Volumes/android-dev/android/xbmc-depends

fwiw, how I built the toolchain:
./make-standalone-toolchain.sh --ndk-dir=../../ --install-dir=/Volumes/android-dev/android/android-toolchain-x86/android-17 --platform=android-17 --toolchain=x86-4.8 --arch=x86 --system=linux-x86_64

Any idea what I'm doing wrong?
Reply
#2
I'm not an android dev, but is there some 64/32bit mismatch?
You build 32bit, but your toolchain is 64bit.
Also your config.log shows some sizeof(int) asserts.
Reply
#3
if you build our master branch you need NDK12b and SDK21
https://github.com/xbmc/xbmc/pull/10685
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
Awesome, thanks for the update. I'll try it tonight.
Reply
#5
Did you follow the readme about building for android on osx? About the need of a case sensitive filesystem and thelike? Its a long time ago i tried it ... It was on osx 10.9 or so - not sure if this still works.
Also xcode doesn't matter here as you use the android toolchain to compile...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#6
Ah, I think I found my issue. Was using android-ndk-r10e-linux-x86_64.zip instead of android-ndk-r10e-darwin-x86_64.zip.
Reply
#7
New problems.

$ make -C tools/depends/target/xbmc
... lots of output ...
checking for main in -lEGL... no
configure: error: Could not find a required library. Please see the README for your platform.

Full output: http://pastebin.com/dM5Pb5wC

config command used: $ ./configure --with-tarballs=/Users/Shared/xbmc-depends/tarballs --host=i686-linux-android --with-sdk-path=/Users/poertel/Library/Android/sdk --with-ndk=/Users/poertel/android-ndk-r12b --with-toolchain=/Volumes/android-dev/android/android-toolchain-x86/android-21 --prefix=/Volumes/android-dev/android/xbmc-depends

config.log: http://pastebin.com/SSqKAEP6
Reply
#8
Oh, my config failed. I shouldn't expect make to work. Just glancing at config.log, I see some missing things:

/Volumes/android-dev/android/android-toolchain-x86/android-21/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot find -lpython2.7
/Volumes/android-dev/android/android-toolchain-x86/android-21/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot find -lintl
/Volumes/android-dev/android/android-toolchain-x86/android-21/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot find -lssl
/Volumes/android-dev/android/android-toolchain-x86/android-21/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot find -lcrypto

Not sure what to do about them though.
Reply
#9
Your depends build didn't get through i guess - do

Code:
make -C tools/depends/

And you are sure that you want for x86 android not arm android?

Also you changed ndk versions in between tries. I suggest to git clean -xffd your tree and start again (bootstrap depends, configure depends, build depends and so on)
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#10
Somehow I was skipping that step. I misread it as applying only to "anyone working on the dependencies themselves". I'm a little confused how it could have affected my configure though. Nonetheless, when I reset state, I no longer see errors in configure. I'll chalk it up to some half-finished state. I was resetting the environment occasionally, but I guess not that time (and thanks for git clean -xffd. I was deleting the whole tree and downloading again. Which is why I wasn't doing it often enough Smile

So now I'm getting a failure building gettext. Still digging, but this is the error:

./localename.c: In function '_nl_locale_name_thread_unsafe':
./localename.c:2690:30: warning: initialization makes pointer from integer without a cast
locale_t thread_locale = uselocale (NULL);
^
./localename.c:2691:26: error: 'LC_GLOBAL_LOCALE' undeclared (first use in this function)
if (thread_locale != LC_GLOBAL_LOCALE)
^
./localename.c:2691:26: note: each undeclared identifier is reported only once for each function it appears in

Will keep digging later tonight.

And I'm doing x86 out of a slight preference for developing in an emulator.
Reply
#11
Was able to build deps successfully on Ubuntu, so this looks like an OS X issue.
Reply
#12
Well sdk and ndk are the same. You really have a case sensitive filesystem created for this did you?
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#13
Yup.

I also downloaded and built gettext from that project's site, not cross-compiling or anything, on regular HFS+, and it was fine. I could try building that with the custom toolchain. There should be a small number of variables to tweak. One of them should trigger the failure.
Reply
#14
trying this out atm (also osx 10.11.6)

i had no issue to compile gettext ... i am hanging at linking pillow (pythonmodule-pil) atm ... but i am out of time for now. later
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#15
Was able to build depends successfully now - i had to manually remove the -ltiff from the pillow linker line (it seems it found some libtiff on my osx system which it tried to link to - so this stupid python shit is to stupid to do proper cross compile and only look for libs where it is supposed to look).

It failes here at "make -C tools/depends/target/cmakebuildsys" - which isn't even up to date in the readme.

Using normale make buildsystem fails on libdvd stuff because it was not updated to latest changes there (libdvd* was moved to depends).

So i used latest sdk and ndk 12b also i have java 1.8 installed on my osx and can confirm that i was not able to build for android atm. Though the error seems to be generic and i wonder why jenkins builds without issues ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
configure: error: C preprocessor "/lib/cpp" fails sanity check0