-
Notifications
You must be signed in to change notification settings - Fork 51
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
binary C extension not built? #148
Comments
Most probably, as I cannot see any reason for the error. The CI on Ruby 3.0 fails with a bundler error stating: ERROR: Error installing /home/runner/work/iodine/iodine/pkg/iodine-0.7.56.gem:
ERROR: Failed to build gem native extension.
No such file or directory @ dir_s_mkdir - /home/runner/work/iodine/iodine/vendor/bundle/ruby/3.0.0/gems/iodine-0.7.56/ext/iodine/.gem.20230707-1798-pdmzvu I am not sure why your version fails silently, but there's a bundler issue somewhere that I haven't looked into working around quite yet. Once I upgraded to Ruby 3.1.3p185, my build issue was resolved. I don't know if that will solve your issue. Sorry about that. |
ArchLinux version of ruby has been quite outdated for a long time https://archlinux.org/packages/extra/x86_64/ruby/, they don't seem to care much about it. If I want to use a more recent version of Ruby I usually use asdf-vm on my dev machines. But on my desktop I wanted to avoid installing dev tools for virtual environments and use only the system ruby. Based on what you told me, installing asdf-ruby + ruby 3.2+ will probably workaround this compilation issue that appears only on 3.0-3.1.3. |
|
@noraj in both logs it says "successfully installed", whats the issue? |
In addition, in both logs it links iodine.so correctly and installs it without error. Now, if iodine.so doesn't get loaded, that may be possible because of a name clash in the load path, where it finds iodine.rb first and thus doesn't load iodine.so. Not sure if that is the case here, but that happened to me once, thats why (@boazsegev) i renamed iodine.so to iodine_ext.so in isomorfeus-iodine. @noraj you can verify that by patching the gem in its path, possibly copying the built extension in its place to iodine_ext.so and tinkering a bit in irb to see if it gets loaded. |
The issue is what is explained in the original message (#148 (comment)), the gem is installed successfully but the iodine C binary is not built. You can see both log file have very different size.
If you diff both, you'll see there are tons of stuff being build for 3.2 that is not for 3.0.
|
@noraj i see that, if i inspect the files, looking fo "compiling " i see 32 hits in both of them, i see the *.c *.h files are copied correctly. |
So the issue seems to be, that it cannot find the built extension, see above. |
And sure, you cannot use the gem built for 3.0 with 3.2 or the other way around, if you switch rubies, are the gem paths updated accordingly? Otherwise load will fail. |
So it's something from the ruby environment. 3.0 being archlinux system ruby with gem installed as user. |
Then check $LOAD_PATH, see if /home/noraj/.local/share/gem/ruby/3.0.0/gems/ |
Oh yes, it tries to load from it, so i'm back on this possibly being a name clash, as described above (@boazsegev) |
Hi @janbiedermann and @noraj , Thank you both for hunkering down on this one. I wasn't sure what the root cause was until @janbiedermann brought it up. I released a patch that names the library file to This patch doesn't solve the CI tests failing on Ruby 3+, but they might solve this issue. Thanks again and please keep me posted so I know if this help. Cheers, |
Can someone try with a suer install?
In your
Maybe it's a path issue when you use |
@noraj but it tries to load from the right path |
|
Hm, it installs from and at same time it concludes: I can only conclude, that your system ruby is broken or your filesystem or there is a symlink somwhere thats broken or something like that. My recommendation:
|
It's maybe confusing but |
Also the C extension is built:
The require tries |
On asdf ruby 3.2
So in asdf ruby 3.2 tt's put in |
install should copy the *.so as final step from ext to lib |
Interestingly with asdf ruby 3.1.0 there is the extension on both lib and ext:
|
Yes, thats correct, thats how it should be |
(@boazsegev glad you renamed the ext, although thats not the problem here, i remember, that i had to make that change, when i build iodine withing the ruby tree for debugging) |
So now I can conclude this is not an issue with ruby 3.0 or 3.1, not an issue with the system/user install, but seems to be an issue with ArchLinux ruby. I'll check the probably apply a wrong patch or bad compilation flags. |
Ok found the issue, it related to ArchLinux build. There is a patch to disable to copy of the .so from Upstream issue https://bugs.archlinux.org/task/70959 |
System Information
Description
The binary
lib/iodine/iodine
seems to be missing.Expected behavior
No error loading the gem.
Actual behavior
Notes
Install:
I see no error while install, is the C building failing silently?
The text was updated successfully, but these errors were encountered: