jansson icon indicating copy to clipboard operation
jansson copied to clipboard

Link to libm when necessary

Open reddwarf69 opened this issue 4 years ago • 5 comments

I have a system where isnan is a macro redirecting to __isnan(), which is only defined in libm.

reddwarf69 avatar Nov 10 '20 20:11 reddwarf69

Coverage Status

Coverage decreased (-0.6%) to 95.561% when pulling abb80dc5ca05d19eb524b1e09c31e2d024b565d4 on RedDwarf69:isnan_libm into a740f15c17ef7956b1493d8d1f800896c1e60bad on akheron:master.

coveralls avatar Nov 10 '20 23:11 coveralls

Would it be enough in your system to use -ljansson -lm?

akheron avatar Nov 12 '20 20:11 akheron

Yes, that would work. But if you don't want the patch because it adds complexity for a corner case I will probably just carry the patch locally instead of adding the "fake" direct libm dependency to everything using jansson.

reddwarf69 avatar Nov 12 '20 20:11 reddwarf69

Well, at least it would need to be ported to autoconf also

akheron avatar Nov 13 '20 13:11 akheron

I am doing this as paid work and realistically I am not going to do it for autotools any time soon. There is really a need, though? With or without an autotools fix this fixes something for people using CMake. It's not like they generate the same stuff anyway:

  • The CMake build generates a janssonConfig.cmake file to use by other cmake projects
  • The autotools build generates a libtool file to use by other autotools projects

Autoconf is all but dead (https://lists.gnu.org/archive/html/autoconf/2021-01/msg00049.html), requiring fixing the autotools build system when fixing the cmake build system is only going to stop people from providing cmake fixes.

reddwarf69 avatar Jan 27 '21 13:01 reddwarf69