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

Failed to build gem native extension on El Capitan #46

Closed
glennfu opened this issue Mar 7, 2016 · 6 comments
Closed

Failed to build gem native extension on El Capitan #46

glennfu opened this issue Mar 7, 2016 · 6 comments

Comments

@glennfu
Copy link

glennfu commented Mar 7, 2016

I tried with both Ruby 2.2.4 and 2.3.0, to install this gem. Here's the output I get:

/Users/Glenn/.rvm/rubies/ruby-2.2.4/bin/ruby -r ./siteconf20160307-31590-1kd5a3y.rb extconf.rb
checking for isc_attach_database() in -lfbclient... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/Glenn/.rvm/rubies/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
    --with-firebird-dir
    --without-firebird-dir
    --with-firebird-include
    --without-firebird-include=${firebird-dir}/include
    --with-firebird-lib
    --without-firebird-lib=${firebird-dir}/lib
    --with-fbclientlib
    --without-fbclientlib
/Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:541:in `try_link0'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:556:in `try_link'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:735:in `try_func'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:966:in `block in have_library'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in postpone'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:321:in `open'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:321:in `open'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:347:in `postpone'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for'
    from /Users/Glenn/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:961:in `have_library'
    from extconf.rb:71:in `block in <main>'
    from extconf.rb:71:in `each'
    from extconf.rb:71:in `find'
    from extconf.rb:71:in `<main>'

extconf failed, exit code 1

Before this I followed the instructions here: http://www.firebirdsql.org/file/documentation/papers_presentations/html/paper-fb-macosx-install.html

Which led me to download the latest Mac version here:
https://sourceforge.net/projects/firebird/files/

Are there other instructions I need to follow in order to get this installed? Please advise, thank you!

@glennfu
Copy link
Author

glennfu commented Mar 7, 2016

Looks like I'd found the wrong installer. Going here:

http://www.firebirdsql.org/en/firebird-2-5/#MacOSX the "FirebirdCS-2.5.5-26952-x86_64.pkg" installed properly for me and then I was able to install the fb gem. All good!

@glennfu glennfu closed this as completed Mar 7, 2016
@athariel
Copy link

@glennfu
I'm getting exactly the same error on El Capitan. I have already spent almost a whole day on it with no success.
Can you please write how did you install fb gem after running the FirebirdCS-2.5.5-26952-x86_64.pkg installer? Did just "gem install fb" work?
Which version of fb gem did you install?

I am running ruby 2.2.4

@glennfu
Copy link
Author

glennfu commented Apr 27, 2016

@athariel Using Ruby 2.3.0 here, but once I installed that Firebird version, "bundle install" worked, where my Gemfile contains "activerecord-fb-adapter". So that should be enough. Maybe add a reboot to the mix?

I also found when I wanted to host a server, I needed to download "FirebirdSS-2.5.5-26952-x86_64.pkg" or the latest "Mac OS X 64-bit Superserver (Intel)" file, and install that.

From there I added to my ~/.bash_profile:

export FIREBIRD_HOME=/Library/Frameworks/Firebird.framework/Resources
export PATH="$PATH:$FIREBIRD_HOME/bin"

I hope that helps!

@athariel
Copy link

athariel commented Apr 27, 2016

@glennfu Thanks a lot! You saved my day!
I don't know what helped, but what I did was:

  1. add FIREBIRD_HOME and PATH in .bash_profile as @glennfu suggested
  2. run bundle install which this time ended with ld: framework not found Firebird error as described here: Can't install on OSX Mavericks #22
  3. run xcode-select --install as sugested in Can't install on OSX Mavericks #22 (after this I still got the error)
  4. reboot my mac
  5. bundle install success!

Maybe it will help someone else.

@glennfu
Copy link
Author

glennfu commented Apr 27, 2016

Yay!

@a0s
Copy link

a0s commented Aug 14, 2019

For those of yours who will face this problem:

  1. For me, it started working only after cloning locally and gem 'fb', path: '../fb'
  2. I suppose that problem is here, Imho it heeds absolute path to Firebird

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

3 participants