Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building ffmpeg for android on mac, lame fails C preprocessor check #45

Closed
IFDeveloper opened this issue Apr 7, 2015 · 14 comments
Closed
Labels

Comments

@IFDeveloper
Copy link

./cppbuild.sh -platform android-arm install ffmpeg
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/Users/Phoenix/workspace/Frameworks/javacpp-presets/ffmpeg/cppbuild/android-arm/lame-3.99.5':
configure: error: C preprocessor "/lib/cpp" fails sanity check

@saudet
Copy link
Member

saudet commented Apr 8, 2015

This is weird. Does OpenCV compile fine?

@IFDeveloper
Copy link
Author

Yeap, fine. Changing CPP flag makes some progress and again fails

@saudet
Copy link
Member

saudet commented Apr 19, 2015

Odd, I have no problems building for Android on Linux. Is the NDK that different on Mac OS X? BTW, if you don't need to encode in MP3, you can temporarily remove LAME from the build.

@zmingchun
Copy link

I also in trouble with this error on Mac OS X,even though I remove LAME ...Maybe is the C++ build environment missing something.

@zmingchun
Copy link

What's more,this is my log javacpp-ffmpeg-lame-compiled-error-config.log

@saudet saudet added the bug label May 2, 2015
@saudet
Copy link
Member

saudet commented May 2, 2015

@zmingchun It's still trying to build LAME, so you didn't remove it.

I'm not sure why this is happening, so let's mark this as a bug. If anyone finds out the solution, please let us know! For now the workaround is to build under Linux...

@zmingchun
Copy link

@saudet I build ffmpeg for IOS successful,use this shell file build-ffmpeg-android.sh,use gas-preprocessor.pl as c processor ; But I didn't know which one should as gas-preprocessor.pl build for android.

@saudet
Copy link
Member

saudet commented May 3, 2015

Good! Could you propose the changes we should make to the cppbuild.sh file? Thanks!

@IFDeveloper
Copy link
Author

just updated to NDK r10e and all build went OK!!! possibly NDK r10d was missing some links. PLS mark this as SOLVED

@szitguy
Copy link

szitguy commented Oct 9, 2015

@IFDeveloper I use NDK r10e, but still not work

@saudet
Copy link
Member

saudet commented Oct 10, 2015

@szitguy What error do you get?

@szitguy
Copy link

szitguy commented Oct 10, 2015

@saudet
configure: error: C preprocessor "/lib/cpp" fails sanity check
I had already installed XCode and Common Line Tools, but it still not work

@saudet
Copy link
Member

saudet commented Oct 10, 2015

@szitguy Well, you could get rid of LAME if you do not need it...

@kristofgiber
Copy link

Still no solutions to this other than removing LAME? I also have the latest NDK r10e on Mac and having the same error:

configure: error: in `/Users/user/Code/git/javacpp-presets/ffmpeg/cppbuild/android-arm/lame-3.99.5':
configure: error: C preprocessor "/lib/cpp" fails sanity check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants