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

Gem will not install with Rubinius #5

Open
langhorst opened this issue Oct 22, 2013 · 6 comments
Open

Gem will not install with Rubinius #5

langhorst opened this issue Oct 22, 2013 · 6 comments

Comments

@langhorst
Copy link

I attempted to install the lmdb gem on a fresh install of Rubinius through RVM without success. For this build, I created a new gemset in RVM for freshness. Any plans to support compiling lmdb with Rubinius?

➜  ~  rvm --version
rvm 1.23.10 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
➜  ~  ruby --version
rubinius 2.1.1 (2.1.0 be67ed17 2013-10-18 JI) [x86_64-darwin11.4.2]
➜  ~  gem install lmdb
Fetching: lmdb-0.3.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing lmdb:
    ERROR: Failed to build gem native extension.

    /Users/justin/.rvm/rubies/rbx-2.1.1/bin/rbx extconf.rb
checking for lmdb.h... no
checking for limits.h... yes
checking for string.h... yes
checking for stdlib.h... yes
checking for errno.h... yes
checking for sys/types.h... yes
checking for assert.h... yes
checking for ruby.h... yes
checking for rb_funcall_passing_block()... no
creating Makefile

make "DESTDIR="
compiling lmdb_ext.c
lmdb_ext.c:90:10: error: #error "Not implemented"
lmdb_ext.c: In function ‘call_with_transaction_helper’:
lmdb_ext.c:91: warning: control reaches end of non-void function
make: *** [lmdb_ext.o] Error 1


Gem files will remain installed in /Users/justin/.rvm/gems/rbx-2.1.1@lmdb/gems/lmdb-0.3.1 for inspection.
Results logged to /Users/justin/.rvm/gems/rbx-2.1.1@lmdb/gems/lmdb-0.3.1/ext/lmdb_ext/gem_make.out
@minad
Copy link
Owner

minad commented Oct 22, 2013

Yes, this is a known issue. Please provide a patch or ask the rubinius people how to fix that. I need rb_funcall_passing_block. Ruby 1.8 is also unsupported because of that.

@langhorst
Copy link
Author

I'd love to provide a patch, but I know very little about writing C extensions for Ruby. Maybe it's time to learn. I'll ask around and try to get it fixed. Thanks for the comment!

@captainpete
Copy link

@minad, what are your thoughts on an FFI version?
Could an FFI-based approach solve the compatibility issues around 1.8 and Rubinius?

@andoriyu
Copy link

andoriyu commented Oct 1, 2014

FFI version would be great.

@MarcoPeraza
Copy link

MarcoPeraza commented Dec 17, 2016

I'm actually seeing this same error trying to install the gem against MRI Ruby 2.3 on Fedora 25.

Full Ruby Version: ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]

I also get the same error if I install from the latest source.

@MarcoPeraza
Copy link

I was able to get it to compile just by removing the ifndef.

https://github.com/MarcoPeraza/lmdb/commit/d7ef1d01f16267e653650c6c7809ad0a2d8a1aee

It seems to work fine.

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

5 participants