Struggling to create exe with script that requires gsl
ruggieroguida opened this issue · 1 comments
Ruby 2.7.1
I keep receiving the error when I execute ocra to convert a script that requires gsl. I have tried all the suggestions from the various comments to previous issues, but I keep receiving the error
Traceback (most recent call last):
2: from C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/src/ground.rb:17:in `<main>'
1: from C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- gsl (LoadError)
6: from C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/src/ground.rb:17:in `<main>'
5: from C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require'
4: from C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
3: from C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `require'
2: from C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/lib/ruby/gems/2.7.0/gems/gsl-2.1.0.3/lib/gsl.rb:11:in `<top (required)>'
1: from C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': 126: The specified module could not be found. - C:/Users/ruggiero/AppData/Local/Temp/ocrE82E.tmp/lib/ruby/gems/2.7.0/gems/gsl-2.1.0.3/lib/gsl_native.so (LoadError)
My latest attempt at the command is
ridk exec ocra --verbose ground.rb --gem-full --dll "ruby_builtin_dlls\libgsl-25.dll" --dll "ruby_builtin_dlls\libgslcblas-0.dll" --dll ruby_builtin_dlls\libssp-0.dll --dll ruby_builtin_dlls\libgmp-10.dll --dll ruby_builtin_dlls\libgcc_s_seh-1.dll --dll ruby_builtin_dlls\libwinpthread-1.dll --output ground.exe
The script works as expected when launched with ridk exec ruby ground.rb
Any suggestion? Thanks
Just in case it helps someone else, this is the command that ended up working
ocra ground.rb --dll ruby_builtin_dlls\libssp-0.dll --dll libgsl-27.dll --dll libgslcblas-0.dll --console --verbose --gem-full --add-all-core --gem-full=gsl
You need to copy libgsl-27.dll
and libgslcblas-0.dll
to the Ruby bin
directory and not to ruby_builtin_dlls