1. Kaspar Schiess
  2. nanomsg
  3. Issues

Issues

Issue #1 resolved

hard-coded darwin gcc build output

Don Park
created an issue

gem 'nanomsg'

$ bundle
Installing nanomsg (0.2.0) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/local/ruby/2.0.0-p247/bin/ruby extconf.rb --with-cflags="-I/usr/local/nanomsg/0.1-alpha/include" --with-ldflags=-L/usr/local/nanomsg/0.1-alpha/lib 
checking for main() in -lnanomsg... yes
creating Makefile

make "DESTDIR="
linking shared-object nanomsg.so
constants.o: file not recognized: File format not recognized

$ file gems/ruby/2.0.0/gems/nanomsg-0.2.0/ext/constants.o
gems/ruby/2.0.0/gems/nanomsg-0.2.0/ext/constants.o: Mach-O 64-bit object

gcc is building a Mach-O object on an x86_64 machine, which is related to ext/Makefile containing "arch = x86_64-darwin12.3.0" though Im not sure what the fix is.

Comments (7)

  1. Kaspar Schiess repo owner

    What operating system are you building on? How did you install Ruby (with what commands, from what source)? What version of Ruby did you install? Did you install other (binary) extensions before this one? (aka: Has the compilation process involving mkmf.rb worked once?)

  2. Don Park reporter

    It looks like that fixes up the installation process, thanks!

    donp@wafer:~$ mkdir nn
    donp@wafer:~$ cd nn
    donp@wafer:~/nn$ cat > Gemfile
    source 'https://rubygems.org'
    gem 'nanomsg'
    donp@wafer:~/nn$ bundle install --path gems
    Fetching gem metadata from https://rubygems.org/..
    Resolving dependencies...
    Installing nanomsg (0.3.1) 
    Using bundler (1.3.5) 
    Your bundle is complete!
    It was installed into ./gems
    
  3. Log in to comment