Bug 921650
Summary: | ruby 2.0 creates bad makefiles | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Orion Poplawski <orion> | ||||||||
Component: | ruby | Assignee: | Vít Ondruch <vondruch> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 19 | CC: | bkabrda, cfeist, jeremy, jskarvad, ktdreyer, mmorsi, mtasaka, slukasik, tagoh, vanmeeuwen+fedora, vondruch | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | ruby-2.0.0.247-14.fc19 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2013-07-16 01:35:46 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Orion Poplawski
2013-03-14 15:12:15 UTC
Just FYI, this is difference between Makefile for F18 and Rawhide. Upstream changed the configuration process on last second, apparently breaking everything more than fixing :/ Need to analyze it and report ... Also, there were already some reports with broken builds etc, so it might be fixed upstream, dunno. Forgot to sent the link: https://gist.github.com/voxik/5162950 I'm hitting this with the Ruby bindings for remctl on Fedora 20 also. cd ruby && make install DESTDIR=/builddir/build/BUILDROOT/remctl-3.3-3.fc20.i386 make[2]: Entering directory `/builddir/build/BUILD/remctl-3.3/ruby' make[2]: Leaving directory `/builddir/build/BUILD/remctl-3.3/ruby' make[2]: *** No rule to make target `/builddir/build/BUILDROOT/remctl-3.3-3.fc20 .i386/usr/include/ruby.h', needed by `remctl.o'. Stop. make[1]: *** [install-data-local-ruby] Error 2 make[1]: Leaving directory `/builddir/build/BUILD/remctl-3.3' make: *** [install-am] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.9wCG1w (%install) Is the plan to fix Ruby, or to fix each app individually? First we must understand if it is bug in Ruby or if that is change in "internals" of Ruby which we abused or if it is bug in our configuration. The same problem with ruby bindings for rrdtool. Reported upstream: https://bugs.ruby-lang.org/issues/8115 I used the following as a workaround: $ make DESTDIR="%{buildroot}" hdrdir="%{_includedir}" rubyhdrdir="%{_includedir}" install I also had to create $(RUBYARCHDIR)/$(DLLIB) by hand (e.g. /tmp/usr/lib64/ruby/vendor_ruby), because the following snippet is missing from the new Makefile: $(RUBYARCHDIR)/$(DLLIB): $(DLLIB) -$(Q)$(MAKEDIRS) $(@D) $(INSTALL_PROG) $(DLLIB) $(@D) Umm... the upstream closed https://bugs.ruby-lang.org/issues/8115 , however when I apply r39841 change and rebuild srpm, it fails on test_install_extension_and_script(TestGemInstaller) as http://koji.fedoraproject.org/koji/taskinfo?taskID=5155431 ( ruby-2.0.0.0-5.fc19 successfully builds, so this failure is not due to rubygems 2.0.3: http://koji.fedoraproject.org/koji/taskinfo?taskID=5155429 ) I had to switch to the following workaround: $ mkdir -p "%{buildroot}%{_libdir}/ruby/vendor_ruby" && make DESTDIR="%{buildroot}" hdrdir="%{_includedir}" rubyhdrdir="%{_includedir}" includedir="${_includedir}" install Jaroslav, I used the exact same workaround, but it looks like you may have one typo. includedir="${_includedir}" should probably be includedir="%{_includedir}" (In reply to comment #10) > Jaroslav, I used the exact same workaround, but it looks like you may have > one typo. > > includedir="${_includedir}" > > should probably be > > includedir="%{_includedir}" Thanks for the correction. Actually I had to fix the Makefile in my package, but for this BZ I tried to rewrite the fix by hand for SPEC syntax and I make the typo :) Created attachment 733207 [details] Adjust rubygems to #8115 (In reply to comment #8) It seems to be caused by these two lines [1]. They match until second $. The relevant lines from Makefile without the patch used to look like: RUBYLIBDIR = $(sitelibdir)$(target_prefix) RUBYARCHDIR = $(sitearchdir)$(target_prefix) While with the patch, they look like: RUBYLIBDIR = $(DESTDIR)$(sitelibdir)$(target_prefix) RUBYARCHDIR = $(DESTDIR)$(sitearchdir)$(target_prefix) I am not sure what was the intention in keeping $(target_prefix) in there, but since it is empty, I would suggest to drop it entirely and we should be fine. Please note that upstream version of RubyGems does not already contain this lines, or they were moved on other place, so although we see test suite error, the upstream test suite probably works. [1] https://github.com/ruby/ruby/blob/v2_0_0_0/lib/rubygems/ext/builder.rb#L20-L21 (In reply to comment #12) Please consider this WIP, since it makes fail another test: 7) Failure: test_class_make(TestGemExtExtConfBuilder) [/builddir/build/BUILD/ruby-2.0.0-p0/test/rubygems/test_gem_ext_ext_conf_builder.rb:141]: Expected /\nRUBYARCHDIR\ =\ \/tmp\/test_rubygems_29492\/ext\$\(target_prefix\)\n/ to match "# \xCF\x80\nRUBYARCHDIR = /tmp/test_rubygems_29492/ext\nRUBYLIBDIR = /tmp/test_rubygems_29492/ext\nall:\ninstall:\n". Created attachment 733748 [details]
Adjust rubygems to #8115
So I made patch which is passing Ruby's test suite. Unfortunately, it does not seems to fix our issues :/
(In reply to comment #12) > Please note that upstream version of RubyGems does not already contain this > lines, or they were moved on other place, so although we see test suite > error, the upstream test suite probably works. This is the relevant commit: https://github.com/rubygems/rubygems/commit/83e01ec2bd2131f751c60e73f50c07c5c7455010 Created attachment 765269 [details]
fix for the DESTDIR issue
This patch should fix the issue if anybody cares to test it.
ruby-2.0.0.247-9.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/ruby-2.0.0.247-9.fc19 Package ruby-2.0.0.247-9.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ruby-2.0.0.247-9.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-12118/ruby-2.0.0.247-9.fc19 then log in and leave karma (feedback). Package ruby-2.0.0.247-11.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ruby-2.0.0.247-11.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-12118/ruby-2.0.0.247-11.fc19 then log in and leave karma (feedback). ruby-2.0.0.247-12.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/ruby-2.0.0.247-12.fc19 ruby-2.0.0.247-14.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. |