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

Version 1.15 seems to have problem with Arm Linux (Raspberry Pi) #893

Closed
printfinn opened this issue Mar 27, 2021 · 6 comments
Closed

Version 1.15 seems to have problem with Arm Linux (Raspberry Pi) #893

printfinn opened this issue Mar 27, 2021 · 6 comments

Comments

@printfinn
Copy link

I was upgrading Rails to 6.0.3.6 from 6.0.3.4 on my Raspberry Pi, after bundle update, ffi gem updated to version 1.15.
But it encounters:

symbol lookup error: ***/gems/ffi-1.15.0/lib/ffi_c.so: undefined symbol: pthread_atfork

After I downgrade ffi gem to 1.14.2 (specify it in Gemfile), the problem disappeared.

I'll leave this issue closed, just in case anyone finds the same problem.

@mariuz
Copy link

mariuz commented Apr 9, 2021

The same issue we have with Graviton instances on AWS

@larskanis larskanis reopened this Apr 9, 2021
@larskanis
Copy link
Member

I think the issue is very similar to scipy/scipy#11323 . The use of pthread_atfork was introduced in ffi-1.15.0, so we probably have to add -lpthread or -pthread to our compiler options.

@adeserg
Copy link

adeserg commented May 7, 2021

Good afternoon.
I'm new to rails but using scaffold I got this error, you could help me solve it. Try to download a better version and delete the last one, but still reinstall it.Beforehand thank you very much.

rails_generate: symbol lookup error: /home/phablet/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.so: undefined symbol: pthread_atfork

@printfinn
Copy link
Author

Good afternoon.
I'm new to rails but using scaffold I got this error, you could help me solve it. Try to download a better version and delete the last one, but still reinstall it.Beforehand thank you very much.

rails_generate: symbol lookup error: /home/phablet/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.so: undefined symbol: pthread_atfork

I don't quite get you, but maybe you didn't modify your Gemfile in your rails project, so the ffi gem remained the latest version.
You need to append this line:
gem "ffi", "~> 1.14.2"
to your Gemfile, then run bundle again.

@larskanis
Copy link
Member

I'll fix this issue in the next release. Until then you should be able to use ffi-1.15.0 by either:

gem inst ffi -- --with-ldflags=-pthread

or with bundler:

bundle config build.ffi --with-ldflags=-pthread

@printfinn
Copy link
Author

I'll fix this issue in the next release. Until then you should be able to use ffi-1.15.0 by either:

gem inst ffi -- --with-ldflags=-pthread

or with bundler:

bundle config build.ffi --with-ldflags=-pthread

Thank you @larskanis !
I used the second method and it works like a charm on my Raspberry Pi!

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

4 participants