rowland / fb

Firebird Extension Library for Ruby
64 stars 36 forks source link

Cannot build on Mac os x Catalina #73

Open rollyar opened 4 years ago

rollyar commented 4 years ago

Hello cannot build the gem, on mac os catalina

Firebird-3.0.5-33220-x86_64

sw_vers ProductName: Mac OS X ProductVersion: 10.15.4 BuildVersion: 19E287

/usr/sbin/pkgutil --packages | grep CL com.apple.pkg.CLTools_Executables com.apple.pkg.CLTools_SDK_macOS1015 com.apple.pkg.CLTools_SDK_macOS1014 com.apple.pkg.CLTools_macOS_SDK

/usr/sbin/pkgutil --pkg-info com.apple.pkg.CLTools_Executables package-id: com.apple.pkg.CLTools_Executables version: 11.4.0.0.1.1583798712 volume: / location: / install-time: 1586826514 groups: com.apple.FindSystemFiles.pkg-group

I have the next error: Building native extensions. This could take a while... /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/open3.rb:213: warning: Insecure world writable dir /Library/Frameworks/Firebird.framework/Resources in PATH, mode 040777 ERROR: Error installing fb: ERROR: Failed to build gem native extension.

current directory: /Users/rolando/.rvm/gems/ruby-2.6.3/gems/fb-0.9.2

/Users/rolando/.rvm/rubies/ruby-2.6.3/bin/ruby -I /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r ./siteconf20200414-1402-141o5gw.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/rolando/.rvm/rubies/ruby-2.6.3/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/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:467:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:552:intry_link0' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:570:in try_link' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:782:intry_func' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:1016:in block in have_library' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:959:inblock in checking_for' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:361:in block (2 levels) in postpone' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:331:inopen' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:361:in block in postpone' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:331:inopen' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:357:in postpone' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:958:inchecking_for' from /Users/rolando/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/mkmf.rb:1011:in have_library' from extconf.rb:90:inblock in

' from extconf.rb:90:in each' from extconf.rb:90:infind' from extconf.rb:90:in `
'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Users/rolando/.rvm/gems/ruby-2.6.3/extensions/x86_64-darwin-19/2.6.0/fb-0.9.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/rolando/.rvm/gems/ruby-2.6.3/gems/fb-0.9.2 for inspection. Results logged to /Users/rolando/.rvm/gems/ruby-2.6.3/extensions/x86_64-darwin-19/2.6.0/fb-0.9.2/gem_make.out

Any help?

rollyar commented 4 years ago

I solved as follow: git clone https://github.com/rowland/fb.git cd db nano extcont.rb change extcont.rb to

#!/usr/bin/env ruby
require 'mkmf'

$CFLAGS += " -DOS_UNIX"
dir_config("firebird")
have_library("fbclient","isc_attach_database", "ibase.h")
create_makefile("fb")

then build and install gem build fb.gemspec gem install fb-0.9.2.gem

douweh commented 4 years ago

I have the same problem, when looking into mkmf.log it states framework not found Firebird. However the framework is available on /Library/Frameworks/Firebird.framework.

Anyone got any clue?

nik736 commented 4 months ago

Did anyone find a solution for this?