{"action":"created","issue":{"url":"https://api.github.com/repos/bundler/bundler/issues/3385","labels_url":"https://api.github.com/repos/bundler/bundler/issues/3385/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler/issues/3385/comments","events_url":"https://api.github.com/repos/bundler/bundler/issues/3385/events","html_url":"https://github.com/bundler/bundler/issues/3385","id":57247693,"number":3385,"title":"1.8.0 fails to build native extensions with --jobs>1","user":{"login":"antifuchs","id":11864,"avatar_url":"https://avatars.githubusercontent.com/u/11864?v=3","gravatar_id":"","url":"https://api.github.com/users/antifuchs","html_url":"https://github.com/antifuchs","followers_url":"https://api.github.com/users/antifuchs/followers","following_url":"https://api.github.com/users/antifuchs/following{/other_user}","gists_url":"https://api.github.com/users/antifuchs/gists{/gist_id}","starred_url":"https://api.github.com/users/antifuchs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antifuchs/subscriptions","organizations_url":"https://api.github.com/users/antifuchs/orgs","repos_url":"https://api.github.com/users/antifuchs/repos","events_url":"https://api.github.com/users/antifuchs/events{/privacy}","received_events_url":"https://api.github.com/users/antifuchs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-10T22:27:50Z","updated_at":"2015-02-11T10:57:10Z","closed_at":null,"body":"I'm just trying out the new 1.8.0 release, and it's failing to install several gems in our gemfile correctly when used with gems that have native extensions. Versions up to 1.7.13 didn't have that problem. I'm testing this on Linux, with Ruby 2.1.3.\r\n\r\nOne failing gem is a amatch (redacted output since some parts are sensitive):\r\n\r\nThe command I ran is: `bundle install --jobs=8 --disable-shared-gems`.\r\n\r\n```\r\n/usr/lib/rbenv/versions/2.1/lib/ruby/2.1.0/rubygems/ext/builder.rb:160: warning: conflicting chdir during another chdir block\r\n\r\nGem::Ext::BuildError: ERROR: Failed to build gem native extension.\r\n\r\n    /usr/lib/rbenv/versions/2.1/bin/ruby extconf.rb\r\ncreating Makefile\r\nRewriting the generated Makefile to get my compiler output displayed...\r\n\r\nMakefile not found\r\n\r\nGem files will remain installed in /home/vagrant/foo/vendor/bundle/gems/amatch-0.2.11 for inspection.\r\nResults logged to /home/vagrant/foo/vendor/bundle/extensions/x86_64-linux/2.1.0/amatch-0.2.11/gem_make.out\r\n```\r\n\r\n(the `gem_make.out` file contains only the \"Makefile not found\" message above)\r\n\r\nParallel bundler 1.8 is spewing that \"conflicting chdir during another chdir block\" message a lot - almost every second line of output is that message (1.7.x is completely quiet). That there is no Makefile in the directory left behind seems somewhat related, too (:\r\n\r\nBundling in parallel with 1.8.0 reliably fails; however, unsetting the `BUNDLE_JOBS` variable and bundling in serial always works on both 1.7 and 1.8.\r\n\r\nLet me know if you need any more information - happy to run any experiment to track this issue down!"},"comment":{"url":"https://api.github.com/repos/bundler/bundler/issues/comments/73863780","html_url":"https://github.com/bundler/bundler/issues/3385#issuecomment-73863780","issue_url":"https://api.github.com/repos/bundler/bundler/issues/3385","id":73863780,"user":{"login":"indirect","id":78,"avatar_url":"https://avatars.githubusercontent.com/u/78?v=3","gravatar_id":"","url":"https://api.github.com/users/indirect","html_url":"https://github.com/indirect","followers_url":"https://api.github.com/users/indirect/followers","following_url":"https://api.github.com/users/indirect/following{/other_user}","gists_url":"https://api.github.com/users/indirect/gists{/gist_id}","starred_url":"https://api.github.com/users/indirect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indirect/subscriptions","organizations_url":"https://api.github.com/users/indirect/orgs","repos_url":"https://api.github.com/users/indirect/repos","events_url":"https://api.github.com/users/indirect/events{/privacy}","received_events_url":"https://api.github.com/users/indirect/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T10:57:10Z","updated_at":"2015-02-11T10:57:10Z","body":"We might need to abort if jobs is > 1 and rubygems is older than contains that fix.\n\nOn Wed, Feb 11, 2015 at 9:51 PM, Tim Moore <notifications@github.com>\nwrote:\n\n> @antifuchs / @domcleal could you put the output from `bundle env` in a gist and post a link here please? I'm mostly interested in the Rubygems version, but all of that information is useful.\n> Also, see if upgrading Rubygems helps (`gem update --system`). There have been some thread-safety issues fixed in the gem installer (https://github.com/rubygems/rubygems/pull/1005) and as @Who828 mentioned, Bundler 1.8 switches parallel installation on MRI from using forked processes to using threads.\n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/bundler/bundler/issues/3385#issuecomment-73863160"}}