fxruby script breaking
Opened this issue · 2 comments
Hello,
I'm running into an error when I try to execute an fxruby script I've written:
C:\Users\Josh\Dropbox\apps\qs_automation>ocra calc_qs_results.rb --dll ruby_builtin_dlls\libssp-0.dll --gem-all
=== Loading script to check dependencies
=== Detected gem did_you_mean-1.4.0 (scripts, files)
=== 0 files, 0 bytes
=== Detected gem ocra-1.3.11 (scripts, files)
=== 7 files, 296119 bytes
=== Detected gem uri-0.10.0 (scripts, files)
=== 0 files, 0 bytes
=== Detected gem csv-3.1.2 (scripts, files)
=== 0 files, 0 bytes
=== Detected gem forwardable-1.3.1 (scripts, files)
=== 0 files, 0 bytes
=== Detected gem date-3.0.0 (scripts, files)
=== 0 files, 0 bytes
=== Detected gem stringio-0.1.0 (scripts, files)
=== 0 files, 0 bytes
=== Detected gem strscan-1.0.3 (scripts, files)
=== 0 files, 0 bytes
=== Detected gem mini_portile2-2.5.0 (scripts, files)
=== 25 files, 47421 bytes
=== Detected gem fxruby-1.6.43-x64-mingw32 (scripts, files)
=== 917 files, 72208383 bytes
=== Including 61 encoding support files (3642880 bytes, use --no-enc to exclude)
=== Building calc_qs_results.exe
=== Adding user-supplied source files
=== Adding ruby executable ruby.exe
=== Adding detected DLL C:/Ruby27-x64/bin/ruby_builtin_dlls/libgmp-10.dll
=== Adding detected DLL C:/Ruby27-x64/bin/ruby_builtin_dlls/libffi-7.dll
=== Adding detected DLL C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/ports/x86_64-w64-mingw32/bin/libstdc++-6.dll
=== Adding detected DLL C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/ports/x86_64-w64-mingw32/bin/libfxscintilla-20.dll
=== Adding detected DLL C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/ports/x86_64-w64-mingw32/bin/libFOX-1.6-0.dll
=== Adding detected DLL C:/Ruby27-x64/bin/ruby_builtin_dlls/zlib1.dll
=== Adding detected DLL C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/ports/x86_64-w64-mingw32/bin/libjpeg-62.dll
=== Adding detected DLL C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/ports/x86_64-w64-mingw32/bin/libpng16-16.dll
=== Adding detected DLL C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/ports/x86_64-w64-mingw32/bin/libtiff-5.dll
=== Adding external manifest C:/Ruby27-x64/bin/ruby_builtin_dlls/ruby_builtin_dlls.manifest
=== Adding supplied DLL ruby_builtin_dlls\libssp-0.dll
=== Adding library files
=== Compressing 90662165 bytes
LZMA 19.00 (x86) : Igor Pavlov : Public domain : 2019-02-21
Input size: 90662165 (86 MiB)
Output size: 12365324 (11 MiB)
=== Finished building calc_qs_results.exe (12416032 bytes)
C:\Users\Josh\Dropbox\apps\qs_automation>calc_qs_results.exe
Traceback (most recent call last):
2: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/src/calc_qs_results.rb:2:in `<main>'
1: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- fox16 (LoadError)
6: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/src/calc_qs_results.rb:2:in `<main>'
5: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require'
4: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
3: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `require'
2: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16.rb:2:in `<top (required)>'
1: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- fox16_c (LoadError)
12: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/src/calc_qs_results.rb:2:in `<main>'
11: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require'
10: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
9: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `require'
8: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16.rb:1:in `<top (required)>'
7: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16.rb:26:in `rescue in <top (required)>'
6: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16.rb:12:in `block in <top (required)>'
5: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/site_ruby/2.7.0/ruby_installer/runtime/singleton.rb:12:in `add_dll_directory'
4: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/site_ruby/2.7.0/ruby_installer/runtime/singleton.rb:12:in `new'
3: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/site_ruby/2.7.0/ruby_installer/runtime/dll_directory.rb:67:in `initialize'
2: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16.rb:27:in `block in <top (required)>'
1: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
C:/Users/Josh/AppData/Local/Temp/ocrC715.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/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/2.7/fox16_c.so (LoadError)
10: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/src/calc_qs_results.rb:2:in `<main>'
9: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require'
8: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
7: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `require'
6: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16.rb:1:in `<top (required)>'
5: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16.rb:26:in `rescue in <top (required)>'
4: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16.rb:10:in `block in <top (required)>'
3: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16.rb:16:in `rescue in block in <top (required)>'
2: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16.rb:27:in `block in <top (required)>'
1: from C:/Users/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
C:/Users/Josh/AppData/Local/Temp/ocrC715.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/Josh/AppData/Local/Temp/ocrC715.tmp/lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/2.7/fox16_c.so (LoadError)
I had to add the --dll ruby_builtin_dlls\libssp-0.dll
to solve the dll issue that's been reported here as well, and the --gem-all
flag was added to try and get around this current problem. Any advice?
The script I'm trying to create into an exe is here: https://github.com/jpearl01/qs_automation/blob/main/calc_qs_results.rb
What is strange is that it DOES seem to be finding the fox16_c.so file if I run with --verbose
:
m lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib
m lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/2.7
a lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/2.7/fox16_c.so
m lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/fox16
From this SO: https://stackoverflow.com/questions/59924813/ruby-sqlite3-ocra-executable-missing-sqlite-native-so/59937281#59937281
I thought that it might be missing a .dll file related to the fxruby library, so I just copied all the required .dll files I found via this:
dumpbin.exe /dependents c:\Ruby27-x64\lib/ruby/gems/2.7.0/gems/fxruby-1.6.43-x64-mingw32/lib/2.7/fox16_c.so > c:\users\Josh\Dropbox\apps\qs_automation\required_dlls
Microsoft (R) COFF/PE Dumper Version 14.28.29335.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file c:\Ruby27-x64\lib\ruby\gems\2.7.0\gems\fxruby-1.6.43-x64-mingw32\lib\2.7\fox16_c.so
File Type: DLL
Image has the following dependencies:
libFOX-1.6-0.dll
libfxscintilla-20.dll
KERNEL32.dll
msvcrt.dll
libwinpthread-1.dll
USER32.dll
WS2_32.dll
libstdc++-6.dll
x64-msvcrt-ruby270.dll
into the bin directory of the ruby version I was using, but still get the same error (the verbose output indicates it was able to find the libFOX-1.6-0.dll and libfxscintilla-20.dll just fine
Same exact problem...