naxingyu / opensmile

A github repo of the openSMILE feature extraction tool.
http://www.audeering.com/research/opensmile
Other
214 stars 79 forks source link

buildAndroid.sh doesn't compile binaries on Mac OSX #17

Open Ventis opened 5 years ago

Ventis commented 5 years ago

Hi,

I've been trying to compile the binaries for Android using the buildAndroid.sh script on Mac OSX but I'm having little luck. I've used the android r10e NDK bundle to compile and I've changed the buildAndroid.sh script's content to correctly point to the NDK directory. I've also change the following line export NDK_TOOLCHAIN=${NDK}/toolchains/${CROSS_COMPILE}-4.9/prebuilt/linux-x86_64/bin to read export NDK_TOOLCHAIN=${NDK}/toolchains/${CROSS_COMPILE}-4.9/prebuilt/darwin-x86_64/bin because OSX.

However, the build always fails with the following error:

src/core/smileCommon.cpp: In function 'int clock_gettime(int, timespec*)':
src/core/smileCommon.cpp:171:31: error: 'TIMEVAL_TO_TIMESPEC' was not declared in this scope
   TIMEVAL_TO_TIMESPEC (&tv, tp); // Convert into `timespec'.
flache commented 5 years ago

I also had these kind of issues on mac osx (after resolving some of them new ones steadily showed up) so I decided to run the compilation on a remote linux machine at the end, it worked way better then. Sorry if this advice does not help much

Ventis commented 5 years ago

Unfortunately, that's what I eventually resorted to as well. Ran a Docker image with Ubuntu, and the NDK installed.

chausner-audeering commented 3 years ago

For anyone having compilation issues with 2.3 on OS X, you may want to move to the new version 3.0 which ships with pre-built OS X binaries. The build process relies on CMake now and should work out-of-the-box on recent versions of OS X.