[DRE-maint] Bug#684198: ruby-mkrf: FTBFS with ld that defaults to --as-needed: bad link order

Felix Geyer fgeyer at debian.org
Tue Aug 7 17:32:24 UTC 2012


Package: ruby-mkrf
Version: 0.2.3+dfsg-2
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch quantal

ruby-mkrf fails to build with a linker that defaults to --as-needed.

This is because of incorrect link ordering: it puts libraries before the
objects that use them rather than after.  See:

  http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries

The attached patch fixes this.


Build log:

> cd /tmp/buildd/ruby-mkrf-0.2.3+dfsg/test/sample_files/libxml-ruby-0.3.8/ext/xml/; /usr/bin/ruby1.8 extconf.rb; rake
>  extconf failure: need zlib
> [...]
>   1) Failure:
> test_that_libxml_compiles(TestSampleProjects)
>     [./test/unit/../abstract_unit.rb:42:in `assert_creates_file'
>      ./test/integration/test_sample_projects.rb:20:in `test_that_libxml_compiles']:
> ./test/integration/../sample_files/libxml-ruby-0.3.8/ext/xml/libxml_so.so wasn't created!.
> <false> is not true.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_link_command_order.patch
Type: text/x-diff
Size: 806 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20120807/614715d1/attachment.patch>


More information about the Pkg-ruby-extras-maintainers mailing list