Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produced ocra binaries are missing libssp-0.dll #168

Open
Speak2Erase opened this issue Nov 10, 2020 · 18 comments
Open

Produced ocra binaries are missing libssp-0.dll #168

Speak2Erase opened this issue Nov 10, 2020 · 18 comments

Comments

@Speak2Erase
Copy link

Speak2Erase commented Nov 10, 2020

From what I can tell libssp-0.dll is a new required DLL for the ruby runtime and should be included in the executable, but ocra fails to recognize and include it by default which can be pretty annoying. Including it by hand works just fine, though.

@Filechaser
Copy link

please tell me how to include it by hand

@Speak2Erase
Copy link
Author

Speak2Erase commented Nov 13, 2020

Use --dll ruby_builtin_dlls\libssp-0.dll

@Filechaser
Copy link

thank you it worked

@jpearl01
Copy link

jpearl01 commented Dec 4, 2020

I also had this problem, and Speak2Erase's work around worked for me as well.

@ghost
Copy link

ghost commented Feb 5, 2021

Same problem here, thanks for your help !

@victords
Copy link

Hi! Even when I use the workaround mentioned above, the executable doesn't run, but it also doesn't show any error messages... :/
I'm building with the --windows argument, if that's relevant. The code is from this repository: https://github.com/victords/super-bombinhas. More specifically, for reproduction purposes, I run "ruby bundle.rb", which generates the file "sb.rb", and then:

ocra --windows --output super-bombinhas-1.2.2.exe --dll ruby_builtin_dlls\libssp-0.dll sb.rb data/**/*

Can somebody help? Thanks!

@Speak2Erase
Copy link
Author

You might want to try moving some of the flags around until after all the command arguments, or swapping the output and dll flags.

@victords
Copy link

victords commented Feb 12, 2021

Hey, thanks for the quick response. I tried these but the result was the same:
ocra --windows --dll ... --output ... sb.rb data/**/*
ocra sb.rb data*** --windows --dll ... --output ...

@Speak2Erase
Copy link
Author

Speak2Erase commented Feb 12, 2021

Np!

Try making the paths to sb.rb and data absolute paths? You might not be pointing to them properly.
You may also want to disable dependency running, by adding the flag --no-dep-run, as it might be trying to run the ruby file to check for dependencies, but can't, or it is able to run the file and your ruby file doesn't output to console at all.

@victords
Copy link

Hi,
I think none of these things you pointed out are the problems... It indeed launches the script and detects the dependencies correctly. I was able to build the executable for this same game before I updated Ruby to 2.7... The problem is that I updated Ruby, possibly ocra itself and also the Gosu gem, so not sure what was the change that broke anything.
I'll try building with the older version of the code and Gosu to see what happens.

Here's the output of the previous tries, by the way:
=== Loading script to check dependencies
=== Detected gem did_you_mean-1.4.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem ocra-1.3.11 (loaded, files)
=== 5 files, 271800 bytes
=== Detected gem uri-0.10.0 (loaded, files)
=== 0 files, 0 bytes
=== Detected gem gosu-1.1.0 (loaded, files)
=== 311 files, 18454741 bytes
=== Detected gem minigl-2.3.5 (loaded, files)
=== 7 files, 153140 bytes
=== Detected gem fileutils-1.4.1 (loaded, files)
=== 0 files, 0 bytes
=== Including 61 encoding support files (3642880 bytes, use --no-enc to exclude)
=== Building super-bombinhas-1.2.2.exe
=== Adding user-supplied source files
=== Adding ruby executable rubyw.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/gosu-1.1.0/lib64/OpenAL32.dll
=== Adding detected DLL C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/gosu-1.1.0/lib64/SDL2.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 110576600 bytes

LZMA 19.00 (x86) : Igor Pavlov : Public domain : 2019-02-21

Input size: 110576600 (105 MiB)
Output size: 76151068 (72 MiB)
=== Finished building super-bombinhas-1.2.2.exe (76200240 bytes)

@victords
Copy link

Yeah, seems to be related to the version of Gosu... With previous Gosu version it worked fine :/

@Speak2Erase
Copy link
Author

Ah, alright then!

@fredlacave
Copy link

I have a project using Gosu ; to make it work, I had to include a few other DLLs :
-dll ruby_builtin_dlls\libssp-0.dll -dll ruby_builtin_dlls\libgcc_s_seh-1.dll --dll ruby_builtin_dlls\libwinpthread-1.dll
Maybe you could try.

@victords
Copy link

victords commented Feb 23, 2021

Hey, I got it working by following this page: https://github.com/gosu/gosu/wiki/Ruby-Packaging-on-Windows
Sorry for not commenting here before. Thanks!

@Speak2Erase
Copy link
Author

@victords @fredlacave Are you using Ruby 3.0? Just wondering.

@victords
Copy link

No, I'm using Ruby 2.7.

@Speak2Erase
Copy link
Author

Hm, that's weird, I'm using 2.7 as well and only have to include libssp.

@roboyeti
Copy link

Using Ruby 3.0.2 on Windows 10, I found Ocra to generate the exe and run the exe with no errors in console mode, but also didn't work at all. Indeed, the link above (https://github.com/gosu/gosu/wiki/Ruby-Packaging-on-Windows) has the fix. For clarity and to capture the information here, the fix is to add the following (at a minimum and for console or windows mode) to the ocra command to create a working exe:

--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

For the record, a test of the following ruby file failed to run with any error or output, so this is a fundamental issue of Ocra not bundling required dlls:

A very simple ruby script

puts "What the heck is wrong with ocra"

That is all folks.

I don't know that every dll above is required for a console program, but I do know the very basic concolse program above was not working until I added these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants