-
Notifications
You must be signed in to change notification settings - Fork 436
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
isnan, isinf missing in uClibc environment #58
Comments
Thanks for the patch! Could this be added to yajl? |
The correct fix for this is the following, that compiles yajl with -lm when uclibc is detected, instead of having to add it to every program that depends on yajl: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a1134d1..c3a4fad 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,6 +54,11 @@ ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS}) ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS}) +IF(EXISTS "/usr/include/bits/uClibc_config.h") + target_link_libraries(yajl m) + target_link_libraries(yajl_s m) +ENDIF(EXISTS "/usr/include/bits/uClibc_config.h") + #### setup shared library version number SET_TARGET_PROPERTIES(yajl PROPERTIES DEFINE_SYMBOL YAJL_SHARED |
Unfortunately, that is not the correct fix because it does not work when cross-compiling. The initial proposal works fine, though. |
a17r
added a commit
to a17r/gentoo
that referenced
this issue
Aug 18, 2018
See also: lloyd/yajl#58 Closes: https://bugs.gentoo.org/512738 Package-Manager: Portage-2.3.47, Repoman-2.3.10
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Building yajl on a uClibc based Alpine Linux machine failed with the error:
I fixed the issue by linking the json_reformat target with libm:
The text was updated successfully, but these errors were encountered: