sakra / FindMathematica

CMake module for Mathematica.
MIT License
60 stars 12 forks source link

Link failure of MathLink executable on Fedora when libuuid is not installed #3

Closed Expander closed 5 years ago

Expander commented 6 years ago

Dear Sascha Kratky,

we are using your FindMathematica module in to build a MathLink executable for GM2Calc. This works very nicely for all platforms, except Fedora: On Fedora we get a linker error when the MathLink executable (gm2calc.mx) is created and libuuid is not installed:

/usr/bin/c++  -O2 -DNDEBUG  -rdynamic CMakeFiles/gm2calc.mx.dir/gm2calc.tm.c.o  -o ../bin/gm2calc.mx -Wl,-rpath,/usr/local/Wolfram/Mathematica/11.1/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i4.so -lstdc++ -lm -lpthread -lrt -ldl -luuid ../lib/libgm2calc.a
/usr/bin/ld: cannot find -luuid

It seems, that FindMathematica does not check that libuuid is installed on the system, although it links libuuid to the MathLInk executable.

Probably this can be fixed within FindMathematica by requiring that libuuid is installed on the system.

Best regards, Alexander Voigt

sakra commented 6 years ago

Thanks for the hint. I will use find_library in a future version to locate libuuid.

sakra commented 5 years ago

Fixed in FindMathematica 3.2.5.