openal-soft icon indicating copy to clipboard operation
openal-soft copied to clipboard

-llog doesn't exist for ios builds

Open hsdk123 opened this issue 3 years ago • 5 comments
trafficstars

Hi, I'm getting a build error on ios stating that -llog doesn't exist. I'm looking through the cmakelists in the repo and it looks like this is only for android - how would I remove the dependency?

hsdk123 avatar Feb 02 '22 12:02 hsdk123

This doesn't seem to happen when building with mac which is a little perplexing.

hsdk123 avatar Feb 02 '22 12:02 hsdk123

As a workaround, you can remove the check from CMakeLists.txt. Though I have no idea why it would try to link with liblog since that can only happen if

check_library_exists(log __android_log_print "" HAVE_LIBLOG)

succeeds, which has no reason to succeed on iOS since neither the lib or function would exists.There was an issue in the past where getting OpenAL Soft's CMake to work with iOS caused these checks to erroneously succeed or fail, but that shouldn't still be an issue.

kcat avatar Feb 02 '22 16:02 kcat

Screen Shot 2022-02-03 at 8 26 30 AM

I also have no idea why, but it seems that __android_log_print evaluates to found on iOS. I'd prefer to not have to fork from this repo and stay aligned, would it be possible to request to wrap the 2 lines outside with a if (ANDROID)?

https://cmake.org/cmake/help/latest/variable/ANDROID.html

hsdk123 avatar Feb 02 '22 23:02 hsdk123

I'd prefer to not have to fork from this repo and stay aligned, would it be possible to request to wrap the 2 lines outside with a if (ANDROID)?

Done with commit 97dbd9a19149b4d71bf375d3354be6eccaa92f7b. I really need to find out why that check is succeeding on iOS though, because if iOS thinks non-existing libraries have non-existing functions, who knows what other library/function checks are erroneously passing.

kcat avatar Feb 03 '22 08:02 kcat

Thank you!

hsdk123 avatar Feb 03 '22 10:02 hsdk123