Giter Club home page Giter Club logo

Comments (4)

sighmon avatar sighmon commented on August 16, 2024 27

Try: bundle config build.zipruby --with-cflags="-Wno-error=implicit-function-declaration"

I found that when fixing my thin install: macournoyer/thin#365 (comment)

from zipruby.

ohboyd avatar ohboyd commented on August 16, 2024 20

I was able to solve a very similar case thanks to this ticket and a little more information from this stackoverflow post.

I'm using rbenv instead of rvm, and here's my error:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/mikeboyd/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/zipruby-0.3.6/ext
/Users/mikeboyd/.rbenv/versions/2.6.8/bin/ruby -I /Users/mikeboyd/.rbenv/versions/2.6.8/lib/ruby/2.6.0 -r ./siteconf20210812-27664-1wh21cw.rb extconf.rb -v\ 0.3.6\
--with-cflags\=-Wno-error\=implicit-function-declaration
checking for zlib.h... yes
checking for -lz... yes
checking for fseeko()... yes
checking for ftello()... yes
checking for mkstemp()... yes
creating Makefile

current directory: /Users/mikeboyd/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/zipruby-0.3.6/ext
make "DESTDIR=" clean

current directory: /Users/mikeboyd/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/zipruby-0.3.6/ext
make "DESTDIR="
compiling mkstemp.c
mkstemp.c:69:8: error: implicit declaration of function 'getpid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        pid = getpid();
              ^
1 error generated.
make: *** [mkstemp.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/mikeboyd/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/zipruby-0.3.6 for inspection.
Results logged to /Users/mikeboyd/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-20/2.6.0/zipruby-0.3.6/gem_make.out

An error occurred while installing zipruby (0.3.6), and Bundler cannot continue.
Make sure that `gem install zipruby -v '0.3.6' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  zipruby

And here's my solution:

gem install zipruby -v '0.3.6' -- --with-cflags="-Wno-error=implicit-function-declaration"

from zipruby.

veronvynguyen avatar veronvynguyen commented on August 16, 2024

Try: bundle config build.zipruby --with-cflags="-Wno-error=implicit-function-declaration"

I found that when fixing my thin install: macournoyer/thin#365 (comment)

Interesting, this command doesn't appear to be working for me, I ran it before running gem install zipruby -v '0.3.6'

from zipruby.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.