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

Childprocess v1.0.0 failing to install #143

Closed
fatmcgav opened this issue Jan 30, 2019 · 9 comments
Closed

Childprocess v1.0.0 failing to install #143

fatmcgav opened this issue Jan 30, 2019 · 9 comments

Comments

@fatmcgav
Copy link

I've spotted a failure on some of our CI pipelines this morning, that appears to be related to the release of v1.0.0 of childprocess.

The jobs are failing with:

Fetching: childprocess-1.0.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing fpm:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/childprocess-1.0.0/ext
/usr/bin/ruby2.3 mkrf_conf.rb

current directory: /var/lib/gems/2.3.0/gems/childprocess-1.0.0/ext
/usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/childprocess-1.0.0 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/childprocess-1.0.0
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)

rake failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/childprocess-1.0.0 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/childprocess-1.0.0/gem_make.out

This is running on Ubuntu 16.04, however I've seen similar failures on different OS' aswell...

Any ideas?

Cheers

@enkessler
Copy link
Owner

Hmm. I'm able to install it on both Windows 7 and Ubuntu 18. I figured that there would be breaking changes (thus the bump to 1.x) but I wasn't expecting the gem itself to actually be broken. @sds, have you noticed anything with the released gem?

@fatmcgav, for the time being, stick to the 0.x series and we'll look into it on this end. Thanks for letting us know!

@fatmcgav
Copy link
Author

@enkessler Yeh, we've pinned to 0.9.0 for the time-being...

@farkasmate
Copy link
Contributor

fpm is failing to install because of this.
Installing rake gem is fixing the issue, both < 12.0 rake and the latest.
Should it be a runtime dependency?
https://github.com/enkessler/childprocess/blob/master/childprocess.gemspec#L24

@jordansissel
Copy link

jordansissel commented Jan 30, 2019

I can't reproduce this failure on Fedora 29 -- I tested Ruby 2.3.0 and 2.6.0 (via rvm).

That said, I'll pin childprocess 0.9.0 shortly (on fpm)

@sds
Copy link
Collaborator

sds commented Jan 31, 2019

@farkasmate Could you elaborate on what conditions you're able to see this occur? Better, if you think the solution is to change the development_dependency to a runtime_dependency, can you try and see if that fixes the issue?

When I try installing the gem in a clean environment, I can't reproduce:

$ docker run --rm -it ruby:2.3 gem install childprocess
Fetching childprocess-1.0.0.gem
Building native extensions. This could take a while...
Successfully installed childprocess-1.0.0
1 gem installed

Would love to track this down! If you can provide a command that reproduces in a Docker container, that would make it a lot easier to debug. Thanks!

@farkasmate
Copy link
Contributor

farkasmate commented Jan 31, 2019

ruby:2.3 has rake preinstalled:

$ docker run --rm -it ruby:2.3 gem list rake

*** LOCAL GEMS ***

rake (10.4.2)

But if it's not present the install fails:

$ docker run --rm -it centos:7 bash -c 'yum install -y ruby && gem install childprocess'
...
Fetching: childprocess-1.0.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing childprocess:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby mkrf_conf.rb

rake RUBYARCHDIR=/usr/local/lib64/gems/ruby/childprocess-1.0.0/lib RUBYLIBDIR=/usr/local/lib64/gems/ruby/childprocess-1.0.0/lib
sh: rake: command not found


Gem files will remain installed in /usr/local/share/gems/gems/childprocess-1.0.0 for inspection.
Results logged to /usr/local/share/gems/gems/childprocess-1.0.0/ext/gem_make.out

I've tested #144 in a centos:7 container:

# gem install /tmp/childprocess-1.0.1.gem 
Fetching: rake-11.3.0.gem (100%)
Successfully installed rake-11.3.0
Building native extensions.  This could take a while...
Successfully installed childprocess-1.0.1
Parsing documentation for rake-11.3.0
Installing ri documentation for rake-11.3.0
Parsing documentation for childprocess-1.0.1
Installing ri documentation for childprocess-1.0.1
2 gems installed

farkasmate pushed a commit to farkasmate/childprocess that referenced this issue Jan 31, 2019
@enkessler
Copy link
Owner

@farkasmate I have uninstalled rake and I am now seeing the installation error. So, yes, the problem is that the gem requires rake. Now my question is 'why'? It wasn't a problem before and nothing in the mkrf_conf.rb file (the big new thing in this release) is jumping out at me as needing Rake. Yes, it creates a rakefile at the end but that's just a text file and isn't used. What am I missing?

@farkasmate
Copy link
Contributor

@enkessler It looks like if you have an mkrf_conf file in extensions, than RakeBuilder will always run during install.
https://github.com/rubygems/rubygems/blob/511a0f5105ca95b8e389bf477b6c7cf3e90be7d1/lib/rubygems/ext/builder.rb#L125-L127

@sds
Copy link
Collaborator

sds commented Feb 3, 2019

Released 1.0.1 with @farkasmate's fix.

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

5 participants