Expander / tsil-mma

Mathematica interface for TSIL
GNU General Public License v3.0
5 stars 0 forks source link

Cannot open src/LibraryLink.so on MacOS #2

Closed Expander closed 4 years ago

Expander commented 4 years ago

Warning during compilation:

ld: warning: could not create compact unwind for _TSIL_rk6: stack subq instruction is too different from dwarf stack size

Then:

Cannot open src/LibraryLink.so
Expander commented 4 years ago

@ammohseni could you please paste the exact compiler/XCode version you're using here? And could you please also paste the exact commands you've executed?

The following works for me:

mkdir build
cd build
cmake -DTSIL_DIR=$HOME/packages/tsil-1.45 -DCMAKE_CXX_FLAGS=-DTSIL_SIZE_LONG ..
make
make test
math -run "<< ../example/example.m"

Could you please try precisely these steps?

ammohseni commented 4 years ago

Hello,

I followed the steps but again I get

[ 50%] Building CXX object src/CMakeFiles/LibraryLink.dir/librarylink.cpp.o [100%] Linking CXX shared module LibraryLink.dylib ld: warning: could not create compact unwind for _TSIL_rk6: stack subq instruction is too different from dwarf stack size ld: warning: could not create compact unwind for _TSIL_rk6_STU: stack subq instruction is too different from dwarf stack size ld: warning: could not create compact unwind for _TSIL_rk6_ST: stack subq instruction is too different from dwarf stack size [100%] Built target LibraryLink

after running "make" and

Mathematica 12.0.0 Kernel for Mac OS X x86 (64-bit) Copyright 1988-2019 Wolfram Research, Inc.

LibraryFunction::noopen: Cannot open src/LibraryLink.so.

LibraryFunction::noopen: Cannot open src/LibraryLink.so.

LibraryFunction::noopen: Cannot open src/LibraryLink.so.

General::stop: Further output of LibraryFunction::noopen will be suppressed during this calculation. $Failed[N[{1, 2, 3, 4, 5, Re[10 + I], Im[10 + I], 1}]] A(x,qq) = $Failed[N[{1, 1}]] Ap(x,qq) = $Failed[N[{1, 1}]] Aeps(x,qq) = $Failed[N[{1, 1}]] B(x,y,s,qq) = $Failed[N[{1, 2, Re[10 + I], Im[10 + I], 1}]] Bp(x,y,s,qq) = $Failed[N[{1, 2, Re[10 + I], Im[10 + I], 1}]] dBds(x,y,s,qq) = $Failed[N[{1, 2, Re[10 + I], Im[10 + I], 1}]] Beps(x,y,s,qq) = $Failed[N[{1, 2, Re[10 + I], Im[10 + I], 1}]] I(x,y,z,qq) = $Failed[N[{1, 2, 3, 1}]] Ip(x,y,z,qq) = $Failed[N[{1, 2, 3, 1}]] Ip2(x,y,z,qq) = $Failed[N[{1, 2, 3, 1}]] Ipp(x,y,z,qq) = $Failed[N[{1, 2, 3, 1}]] Ip3(x,y,z,qq) = $Failed[N[{1, 2, 3, 1}]] M(x,y,z,u,v,s) = $Failed[N[{1, 2, 3, 4, 5, Re[10 + I], Im[10 + I]}]] S(x,y,z,s,qq) = $Failed[N[{1, 2, 3, Re[10 + I], Im[10 + I], 1}]] T(x,y,z,s,qq) = $Failed[N[{1, 2, 3, Re[10 + I], Im[10 + I], 1}]] Tbar(x,y,z,s,qq) = $Failed[N[{1, 2, 3, Re[10 + I], Im[10 + I], 1}]] U(x,y,z,u,s,qq) = $Failed[N[{1, 2, 3, 4, Re[10 + I], Im[10 + I], 1}]] V(x,y,z,u,s,qq) = $Failed[N[{1, 2, 3, 4, Re[10 + I], Im[10 + I], 1}]]

after running "math -run "<< ../example/example.m"".

BTW: after running "make test" I get (it seems to run successfully) :

Running tests... Test project /Applications/Mathematica.app/Contents/AddOns/Applications/tsil-mma-master/build Start 1: test_LibraryLink 1/1 Test #1: test_LibraryLink ................. Passed 1.65 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) = 1.65 sec

ammohseni commented 4 years ago

I also searched the build folder it seems that no LibraryLink.so exists.

Regards.

ammohseni commented 4 years ago

And I forgot to mention the compiler version:

The CXX compiler identification is AppleClang 11.0.3.11030032

Best regards.

Expander commented 4 years ago

Many thanks for the info, this is very helpful!

Since you're using MacOS, it may be that the library is called LibraryLink.dylib on your machine. Could you please check whether the file build/src/LibraryLink.dylib exists? If it does exist, could you please replace LibraryLink.so by LibraryLink.dylib in example/example.m and run the following command again:

math -run "<< ../example/example.m"

Thanks in advance!

ammohseni commented 4 years ago

Hi,

Yes, it worked. Thanks a lot.

Regards.

Expander commented 4 years ago

Perfect! I'll add some lines in the README.md file to tell the user how to proceed on MacOS.

Many thanks for helping debugging this issue!