ueno / ruby-gpgme

a ruby interface to GnuPG Made Easy (GPGME).
GNU Lesser General Public License v2.1
232 stars 99 forks source link

Install failure on FreeBSD 10.0-RELEASE #79

Open rikrose opened 8 years ago

rikrose commented 8 years ago

% sudo gem install ruby-gpgme -v '1.0.7' :) Building native extensions. This could take a while... ERROR: Error installing ruby-gpgme: ERROR: Failed to build gem native extension.

current directory: /usr/local/lib/ruby/gems/2.1/gems/ruby-gpgme-1.0.7

/usr/local/bin/ruby21 -r ./siteconf20160315-18317-6dfvjc.rb extconf.rb checking for gpgme-config... yes checking for gpgme >= 1.1.3... /usr/local/lib/ruby/2.1/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/2.1/mkmf.rb:541:intry_link0' from /usr/local/lib/ruby/2.1/mkmf.rb:834:in try_run' from extconf.rb:12:inblock in

' from /usr/local/lib/ruby/2.1/mkmf.rb:912:in block in checking_for' from /usr/local/lib/ruby/2.1/mkmf.rb:351:inblock (2 levels) in postpone' from /usr/local/lib/ruby/2.1/mkmf.rb:321:in open' from /usr/local/lib/ruby/2.1/mkmf.rb:351:inblock in postpone' from /usr/local/lib/ruby/2.1/mkmf.rb:321:in open' from /usr/local/lib/ruby/2.1/mkmf.rb:347:inpostpone' from /usr/local/lib/ruby/2.1/mkmf.rb:911:in checking_for' from extconf.rb:11:in
'

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

/usr/local/lib/ruby/gems/2.1/extensions/amd64-freebsd-10/2.1/ruby-gpgme-1.0.7/mkmf.log

extconf failed, exit code 1


The mkmf log contains:

find_executable: checking for gpgme-config... -------------------- yes


"cc -o conftest -I/usr/local/include/ruby-2.1//amd64-freebsd10 -I/usr/local/include/ruby-2.1//ruby/backward -I/usr/local/include/ruby-2.1/ -I. -I/usr/local/include -isystem /usr/local/include -O2 -pipe -isystem /usr/local/include -fstack-protector -fno-strict-aliasing -fPIC -I/usr/local/include/gpgme -I/usr/local/include conftest.c -L. -L/usr/local/lib -L. -L/usr/local/lib -fstack-protector -rdynamic -L/usr/local/lib -lgpgme -lassuan -lgpg-error -lruby21 -lexecinfo -lcrypt -lm -lpthread -L/usr/local/lib -lc" /usr/local/lib/libassuan.so: undefined reference to gpgrt_asprintf' /usr/local/lib/libassuan.so: undefined reference togpgrtvasprintf' cc: error: linker command failed with exit code 1 (use -v to see invocation) checked program was: /* begin / 1: #include "ruby.h" 2: 3: int main(int argc, char _argv) 4: { 5: return 0; 6: } /* end /

This may be a clang versus gcc issue, but I'm not certain.

jecornwall commented 8 years ago

I'm getting the same error on OSX 10.11.4 (or at least this part of it):

Undefined symbols for architecture x86_64:
  "_gpgrt_asprintf", referenced from:
      __assuan_log_control_channel in libassuan.a(libassuan_la-assuan-logging.o)
      __assuan_debug_add in libassuan.a(libassuan_la-debug.o)
  "_gpgrt_vasprintf", referenced from:
      __assuan_debug in libassuan.a(libassuan_la-debug.o)
      __assuan_debug_begin in libassuan.a(libassuan_la-debug.o)
      __assuan_debug_add in libassuan.a(libassuan_la-debug.o)

It's attempting to install version 2.0.12 with Ruby 2.3.0

carpodaster commented 8 years ago

Which version of libassuan do you have installed ? I can install ruby-gpgme v1.0.7 on FreeBSD 10.3-RELEASE with libassuan v2.4.2 alright.

Ruby interpreter was /usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby

jecornwall commented 8 years ago

On OS X running brew upgrade gnupg2 installed the missing dependencies for me.