Summary: | Generated Makefile for ruby bindings is not parallel safe (breaks net-analyzer/rrdtool) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | MATSUU Takuto (RETIRED) <matsuu> |
Component: | New packages | Assignee: | Gentoo Ruby Team <ruby> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | matsuu, netmon, wolf31o2 |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://redmine.ruby-lang.org/issues/show/1337 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 238568 | ||
Attachments: |
rrdtool-1.3.3.ebuild-parallel.patch
rrdtool-1.3.3-with-ruby.log rrdtool emerge log with MAKEOPTS=-j1 |
Description
MATSUU Takuto (RETIRED)
![]() Created attachment 166787 [details, diff]
rrdtool-1.3.3.ebuild-parallel.patch
Please, attach full build output. -j1 is only workaround which we should avoid as much as possible... Created attachment 166948 [details]
rrdtool-1.3.3-with-ruby.log
no ruby binding are installed.
it seems that 'mkmf' ruby module has something problem.
Created attachment 166950 [details]
rrdtool emerge log with MAKEOPTS=-j1
Please, provide full build output of broken build. I need to see how it fails... rrdtool-1.3.3-with-ruby.log is broken build. it has no emerge error, but /usr/lib64/python2.5/site-packages/rrdtoolmodule.so is not provided. please check `diff -u rrdtool-1.3.3-with-ruby.log rrdtool-1.3.3-with-ruby-j1.log`. This is ruby build problem so this is impossible to fix in rrdtool. Makefile for ruby bindings is created with ruby extconf.rb where extconf.rb is really short file: ======================================== require 'mkmf' if /linux/ =~ RUBY_PLATFORM $LDFLAGS += '-Wl,--rpath -Wl,$(EPREFIX)/lib' elsif /solaris/ =~ RUBY_PLATFORM $LDFLAGS += '-R$(EPREFIX)/lib' elsif /hpux/ =~ RUBY_PLATFORM $LDFLAGS += '+b$(EPREFIX)/lib' elsif /aix/ =~ RUBY_PLATFORM $LDFLAGS += '-Wl,-blibpath:$(EPREFIX)/lib' end dir_config("rrd","../../src","../../src/.libs") have_library("rrd", "rrd_create") create_makefile("RRD") ======================================== Resulted Makefile is not parallel safe... ================================================================ install: install-so ## Not affects install-rb install-so: $(RUBYARCHDIR) install-so: $(RUBYARCHDIR)/$(DLLIB) $(RUBYARCHDIR)/$(DLLIB): $(DLLIB) $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) $(RUBYARCHDIR): $(MAKEDIRS) $@ ================================================================ So it calls $(RUBYARCHDIR) and $(RUBYARCHDIR)/$(DLLIB) in parallel. From make file info: " One file can be the target of several rules. All the prerequisites mentioned in all the rules are merged into one list of prerequisites for the target. " So reasons found but this is definitely not rrdtool issue. This is the issue with ruby 1.8.6_p287-r1. Ruby is this know issue? It wasnt' a known issue to the ruby herd. It's not clear to me where the real problem is. Perhaps ruby's mkmf should write out parallel make safe Makefiles, but it can only do that if it understands the dependencies. In any case I think some investigation into the ruby side of things is needed first. So, rather than forcing -j1 on everybody, can we "fix" rrdtool's ebuild to only use -j1 if USE=ruby, or, even better... simply patch the generated Makefile after it's been created? I found the issue and reported to upstream. http://redmine.ruby-lang.org/issues/show/1337 I think it would be good idea to backport the patch to ruby-1.8.7_p72-r10.ebuild. http://redmine.ruby-lang.org/attachments/download/338 (In reply to comment #9) > So, rather than forcing -j1 on everybody, can we "fix" rrdtool's ebuild to > only use -j1 if USE=ruby Since this issue affects only 'make install' do you think it's worth additional logic in ebuild? (In reply to comment #10) > http://redmine.ruby-lang.org/attachments/download/338 MATSUU, these are really great news. Thank you for localizing and fixing this issue. @ruby: Could you backport patch, please? :) (In reply to comment #11) > @ruby: Could you backport patch, please? :) > Fixed in ruby-1.8.6_p287-r13.ebuild, ruby-1.8.7_p72-r11.ebuild and ruby-1.9.1-r1.ebuild. Built rrdtool successfully against it multiple times. Thanks everyone! |