Menu

#37 app-misc/cwiid-0.6.00_rc3 fails to build with --as-needed

open-fixed
None
5
2011-01-07
2011-01-05
No

app-misc/cwiid-0.6.00_rc3 from pd-overlay fails to build due to incorrect linking order, when we have "-Wl,--as-needed" in our LDFLAGS. The solution is quite simple, and is based on:
http://www.gentoo.org/proj/en/qa/asneeded.xml#doc_chap2_sect6

See the attached patch.

Discussion

  • Denilson Sá

    Denilson Sá - 2011-01-05

    fix-lib-link-order.patch

     
  • Denilson Sá

    Denilson Sá - 2011-01-05

    cwiid-0.6.00_rc3.ebuild

     
  • Denilson Sá

    Denilson Sá - 2011-01-05

    ebuild_changes.patch

     
  • Denilson Sá

    Denilson Sá - 2011-01-05

    Additionally, the ebuild didn't have src_install(), so nothing was being installed.

    I've fixed that, and I've just attached the fixed ebuild (that works for me).
    Also attached the diff between the current and the fixed ebuild.

     
  • Willy Wolff

    Willy Wolff - 2011-01-07

    I have applied your change. But are you sure for the patch?

     
  • Willy Wolff

    Willy Wolff - 2011-01-07
    • assigned_to: nobody --> willy_wolff
    • status: open --> open-fixed
     
  • Denilson Sá

    Denilson Sá - 2011-01-08

    The patch works for me. It just changes the order of the parameters, and thus fixes a linking error at the linking stage. If you wanna reproduce the issue, just add "-Wl,--as-needed" to your LDFLAGS and try compiling.

    Finally, it also removes a call to 'ldconfig', which fixes a sandbox violation.

    So... Yeah, I'm quite sure about my fixes. :)

     
  • Willy Wolff

    Willy Wolff - 2011-01-09

    Your patch doesn't work for me.

    Did you have a /etc/ld.so.cache~ ? This file have sandbox violation.

     
  • Denilson Sá

    Denilson Sá - 2011-01-10

    No, I don't have the backup /etc/ld.so.cache~
    But I remember I had a sandbox violation on /etc/ld.so.cache because it tried to run "ldconfig" at the end of the install stage. So, one of the sed-patches removes that call from the Makefile, solving this issue.

    About the patch itself... (assuming you are talking about fix-lib-link-order.patch) It's weird that it didn't work for you. Anyway, all I did was moving $(LDLIBS) parameter to AFTER the $(OBJECTS) parameter, exactly as described in the official gentoo documentation I linked above.
    Feel free to re-make this patch

     

Log in to post a comment.