QuantLib-SWIG
QuantLib-SWIG copied to clipboard
Running on M1 Mac doesn't work
After running the build and install for the Swig library on the M1 I am getting the folling error when running "make check":
Making check in CSharp /Applications/Xcode.app/Contents/Developer/usr/bin/make check-am /Applications/Xcode.app/Contents/Developer/usr/bin/make check-local ln -f cpp/libNQuantLibc.dylib examples/ cd examples && LD_LIBRARY_PATH=. /usr/local/share/dotnet/dotnet run -c Release --project BermudanSwaption/BermudanSwaption.csproj Unhandled exception. System.TypeInitializationException: The type initializer for 'QuantLib.NQuantLibcPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'NQuantLibc' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libNQuantLibc, 0x0001): tried: 'libNQuantLibc' (no such file), '/usr/local/lib/libNQuantLibc' (no such file), '/usr/lib/libNQuantLibc' (no such file), '/Users/nickmarriott/Documents/dev/work/QuantLib-SWIG/CSharp/examples/libNQuantLibc' (no such file) at QuantLib.NQuantLibcPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_NQuantLibc(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate) at QuantLib.NQuantLibcPINVOKE.SWIGExceptionHelper..cctor() in /Users/nickmarriott/Documents/dev/work/QuantLib-SWIG/CSharp/csharp/NQuantLibcPINVOKE.cs:line 105 --- End of inner exception stack trace --- at QuantLib.NQuantLibcPINVOKE.SWIGExceptionHelper..ctor() at QuantLib.NQuantLibcPINVOKE..cctor() in /Users/nickmarriott/Documents/dev/work/QuantLib-SWIG/CSharp/csharp/NQuantLibcPINVOKE.cs:line 125 --- End of inner exception stack trace --- at QuantLib.NQuantLibcPINVOKE.new_Date__SWIG_1(Int32 jarg1, Int32 jarg2, Int32 jarg3) at QuantLib.Date..ctor(Int32 d, Month m, Int32 y) in /Users/nickmarriott/Documents/dev/work/QuantLib-SWIG/CSharp/csharp/Date.cs:line 139 at BermudanSwaption.Run.Main(String[] args) in /Users/nickmarriott/Documents/dev/work/QuantLib-SWIG/CSharp/examples/BermudanSwaption/BermudanSwaption.cs:line 74 make[3]: *** [check-local] Error 134 make[2]: *** [check-am] Error 2 make[1]: *** [check] Error 2 make: *** [check-recursive] Error 1
The dylib is available under /Users/nickmarriott/Documents/dev/work/QuantLib-SWIG/CSharp/examples/
Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.
May you try modifying Makefile.am in the CSharp folder so that it sets DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH?
This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.
This issue was automatically closed because it has been stalled for two weeks with no further activity.