ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:100022] [Ruby master Misc#17174] "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4
@ 2020-09-16  5:29 nakilon
  2020-10-06 11:19 ` [ruby-core:100308] " nakilon
  2024-03-27  1:03 ` [ruby-core:117337] " hsbt (Hiroshi SHIBATA) via ruby-core
  0 siblings, 2 replies; 3+ messages in thread
From: nakilon @ 2020-09-16  5:29 UTC (permalink / raw)
  To: ruby-core

Issue #17174 has been reported by Nakilon (Victor Maslov).

----------------------------------------
Misc #17174: "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4
https://bugs.ruby-lang.org/issues/17174

* Author: Nakilon (Victor Maslov)
* Status: Open
* Priority: Normal
----------------------------------------
My native extension gem compiles fine with all versions of Ruby on macOS but only with Ruby 2.3 on Alpine. It throws various `Error relocating`, `symbol not found` when I require the `.o` file. Here I made a branch to reproduce it in Docker quickly.
```
git clone https://github.com/Nakilon/dhash-vips.git --branch alpine-compilation-issues alpine-compilation-issues && cd alpine-compilation-issues
```
```
# compiles and does not fail on require
docker build - -t temp-ruby2.3.8 --build-arg RUBY_VERSION=2.3.8 --build-arg ALPINE_VERSION=3.8 <Dockerfile

# Error relocating /dhash-vips/idhash.so: rb_deprecate_constant: symbol not found - /dhash-vips/idhash.so (LoadError)
docker build - -t temp-ruby2.4.10 --build-arg RUBY_VERSION=2.4.10 --build-arg ALPINE_VERSION=3.11 <Dockerfile

# Error relocating /dhash-vips/idhash.so: rb_int_modulo: symbol not found - /dhash-vips/idhash.so (LoadError)
docker build - -t temp-ruby2.5.8 --build-arg RUBY_VERSION=2.5.8 --build-arg ALPINE_VERSION=3.12 <Dockerfile

# Error relocating /dhash-vips/idhash.so: rb_int_pow: symbol not found - /dhash-vips/idhash.so (LoadError)
docker build - -t temp-ruby2.6.6 --build-arg RUBY_VERSION=2.6.6 --build-arg ALPINE_VERSION=3.12 <Dockerfile
```
I wanted to ask in the Mailing List but for some reason my email didn't reach it. Guy on Freenode recommended to post here.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:100308] [Ruby master Misc#17174] "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4
  2020-09-16  5:29 [ruby-core:100022] [Ruby master Misc#17174] "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4 nakilon
@ 2020-10-06 11:19 ` nakilon
  2024-03-27  1:03 ` [ruby-core:117337] " hsbt (Hiroshi SHIBATA) via ruby-core
  1 sibling, 0 replies; 3+ messages in thread
From: nakilon @ 2020-10-06 11:19 UTC (permalink / raw)
  To: ruby-core

Issue #17174 has been updated by Nakilon (Victor Maslov).


Nakilon (Victor Maslov) wrote:
> docker build - -t temp-ruby2.3.8 --build-arg RUBY_VERSION=2.3.8 --build-arg ALPINE_VERSION=3.8 <Dockerfile

Also tried the same version of Alpine but higher Ruby -- ruby:2.4.6-alpine3.8 -- got the same 

```
in `require_relative': Error relocating /dhash-vips/idhash.so: rb_deprecate_constant: symbol not found
```

that as I suppose confirms that it's not just Alpine/musl issue but something has changed in Ruby since 2.4

Meanwhile ruby:slim docker images work fine (tested 2.4.9 and 2.7.2) but they are too large...

----------------------------------------
Misc #17174: "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4
https://bugs.ruby-lang.org/issues/17174#change-87893

* Author: Nakilon (Victor Maslov)
* Status: Open
* Priority: Normal
----------------------------------------
My native extension gem compiles fine with all versions of Ruby on macOS but only with Ruby 2.3 on Alpine. It throws various `Error relocating`, `symbol not found` when I require the `.o` file. Here I made a branch to reproduce it in Docker quickly.
```
git clone https://github.com/Nakilon/dhash-vips.git --branch alpine-compilation-issues alpine-compilation-issues && cd alpine-compilation-issues
```
```
# compiles and does not fail on require
docker build - -t temp-ruby2.3.8 --build-arg RUBY_VERSION=2.3.8 --build-arg ALPINE_VERSION=3.8 <Dockerfile

# Error relocating /dhash-vips/idhash.so: rb_deprecate_constant: symbol not found - /dhash-vips/idhash.so (LoadError)
docker build - -t temp-ruby2.4.10 --build-arg RUBY_VERSION=2.4.10 --build-arg ALPINE_VERSION=3.11 <Dockerfile

# Error relocating /dhash-vips/idhash.so: rb_int_modulo: symbol not found - /dhash-vips/idhash.so (LoadError)
docker build - -t temp-ruby2.5.8 --build-arg RUBY_VERSION=2.5.8 --build-arg ALPINE_VERSION=3.12 <Dockerfile

# Error relocating /dhash-vips/idhash.so: rb_int_pow: symbol not found - /dhash-vips/idhash.so (LoadError)
docker build - -t temp-ruby2.6.6 --build-arg RUBY_VERSION=2.6.6 --build-arg ALPINE_VERSION=3.12 <Dockerfile
```
I wanted to ask in the Mailing List but for some reason my email didn't reach it. Guy on Freenode recommended to post here.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:117337] [Ruby master Misc#17174] "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4
  2020-09-16  5:29 [ruby-core:100022] [Ruby master Misc#17174] "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4 nakilon
  2020-10-06 11:19 ` [ruby-core:100308] " nakilon
@ 2024-03-27  1:03 ` hsbt (Hiroshi SHIBATA) via ruby-core
  1 sibling, 0 replies; 3+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2024-03-27  1:03 UTC (permalink / raw)
  To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)

Issue #17174 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Open to Closed

Unfortunately, there is no active maintainer for musl or alpine platform.

I tagged them to [musl](https://bugs.ruby-lang.org/projects/ruby-master/issues?fields%5B%5D=issue_tags&operators%5Bissue_tags%5D=%3D&set_filter=1&values%5Bissue_tags%5D%5B%5D=musl). We welcome patch for them.

----------------------------------------
Misc #17174: "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4
https://bugs.ruby-lang.org/issues/17174#change-107491

* Author: Nakilon (Victor Maslov)
* Status: Closed
----------------------------------------
My native extension gem compiles fine with all versions of Ruby on macOS but only with Ruby 2.3 on Alpine. It throws various `Error relocating`, `symbol not found` when I require the `.o` file. Here I made a branch to reproduce it in Docker quickly.
```
git clone https://github.com/Nakilon/dhash-vips.git --branch alpine-compilation-issues alpine-compilation-issues && cd alpine-compilation-issues
```
```
# compiles and does not fail on require
docker build - -t temp-ruby2.3.8 --build-arg RUBY_VERSION=2.3.8 --build-arg ALPINE_VERSION=3.8 <Dockerfile

# Error relocating /dhash-vips/idhash.so: rb_deprecate_constant: symbol not found - /dhash-vips/idhash.so (LoadError)
docker build - -t temp-ruby2.4.10 --build-arg RUBY_VERSION=2.4.10 --build-arg ALPINE_VERSION=3.11 <Dockerfile

# Error relocating /dhash-vips/idhash.so: rb_int_modulo: symbol not found - /dhash-vips/idhash.so (LoadError)
docker build - -t temp-ruby2.5.8 --build-arg RUBY_VERSION=2.5.8 --build-arg ALPINE_VERSION=3.12 <Dockerfile

# Error relocating /dhash-vips/idhash.so: rb_int_pow: symbol not found - /dhash-vips/idhash.so (LoadError)
docker build - -t temp-ruby2.6.6 --build-arg RUBY_VERSION=2.6.6 --build-arg ALPINE_VERSION=3.12 <Dockerfile
```
I wanted to ask in the Mailing List but for some reason my email didn't reach it. Guy on Freenode recommended to post here.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-27  1:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16  5:29 [ruby-core:100022] [Ruby master Misc#17174] "Error relocating, symbol not found" error when compiling a native extension on Alpine with Ruby >=2.4 nakilon
2020-10-06 11:19 ` [ruby-core:100308] " nakilon
2024-03-27  1:03 ` [ruby-core:117337] " hsbt (Hiroshi SHIBATA) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).