Closed bingyunxl closed 8 years ago
env: openwrt 1407
203-fix-json-compile.patch.txt
this patch file can fix this error, pls close this issue
thanks for the patch, instead of adding a new test, can you try replacing float.h
with math.h
on lines 115 & 116 of configure.ac
and reporting back the result. (remove the change you proposed in the patch as well before running the build).
AC_CHECK_DECLS([_isnan], [], [], [[#include <float.h>]])
AC_CHECK_DECLS([_finite], [], [], [[#include <float.h>]])
@sevan sorry, it dosen't work, still print this error
And if you try
AC_CHECK_DECLS([_isnan], [LIBS="$LIBS -lm"], [], [[#include <math.h>]])
AC_CHECK_DECLS([_finite], [LIBS="$LIBS -lm"], [], [[#include <math.h>]])
It dosen't work again, but follow your mind, I change configure.ac at line 113 & 114 like this:
AC_CHECK_DECLS([isnan], [LIBS="$LIBS -lm"], [], [[#include
then, compile pass
Thanks, I'll follow up with upstream to see why they take this approach, according to the POSIX spec, those functions should be defined in math.h, I'm assuming this may have something to do with Windows based on a comment but not sure, either way, It's redundant in coova as we don't support Windows
Asked a question upstream, json-c/json-c/issues/217
isnan and isinf are defined in glibc, but not in uclibc. I stumbled accross this yesterday and came up with 0d523af6cf213aeac4752597df635a636c759553.
/home/wplus/openwrt_x86_1407/build_dir/target-i386_i486_uClibc-0.9.33.2/coova-chilli-master/json/.libs/libjson.so: undefined reference to
__isinf' /home/wplus/openwrt_x86_1407/build_dir/target-i386_i486_uClibc-0.9.33.2/coova-chilli-master/json/.libs/libjson.so: undefined reference to
__isnan' collect2: error: ld returned 1 exit status make[6]: * [chilli] Error 1 make[6]: Leaving directory `/home/wplus/openwrt_x86_1407/build_dir/target-i386_i486_uClibc-0.9.33.2/coova-chilli-master/src' make[5]: * [all-recursive] Error 1 make[5]: Leaving directory/home/wplus/openwrt_x86_1407/build_dir/target-i386_i486_uClibc-0.9.33.2/coova-chilli-master/src' make[4]: **\* [all-recursive] Error 1 make[4]: Leaving directory
/home/wplus/openwrt_x86_1407/build_dir/target-i386_i486_uClibc-0.9.33.2/coova-chilli-master' make[3]: [all] Error 2 make[3]: Leaving directory`/home/wplus/openwrt_x86_1407/build_dir/target-i386_i486_uClibc-0.9.33.2/coova-chilli-master' make[2]: \ [/home/wplus/openwrt_x86_1407/build_dir/target-i386_i486_uClibc-0.9.33.2/coova-chilli-master/.built] Error 2 make[2]: Leaving directory/home/wplus/openwrt_x86_1407/feeds/oldpackages/net/coova-chilli' make[1]: *** [package/feeds/oldpackages/coova-chilli/install] Error 2 make[1]: Leaving directory
/home/wplus/openwrt_x86_1407' make: *\ [package/coova-chilli/install] Error 2