bugCompact Disc Input and Control Library - Bugs: bug #49907, subdir-objects breaks symbol...

 
 

bug #49907: subdir-objects breaks symbol versioning

Submitted by:  Jan Steffens <heftig>
Submitted on:  Wed 21 Dec 2016 11:31:15 PM UTC  
 
Category:  compilation Severity:  5 - Average
Item Group:  libcdio Status:  Works For Me
Privacy:  Public Assigned to:  Rocky Bernstein <rocky>
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Mon 09 Oct 2017 04:40:11 PM UTC, comment #6:

Sorry for the delay. Nicholas seems MIA.

I've applied the patch in commit ddd9848

Since I make mistakes, please double check that this addresses the problem, and get back to with the results so we can close or address further.

Thanks.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Thu 05 Oct 2017 03:39:26 AM UTC, comment #5:

I can confirm this bug. Currently I get the following output during build:

one possible fix is to change the file name generation in the Makefile:

but I prefer the already submitted patch, which is much simpler and makes the process much more robust.

Stefan BrĂ¼ns <stefanbruens>
Thu 22 Dec 2016 04:09:41 AM UTC, comment #4:

The attached patch seems to work and still passes the test suite.

However, the libraries no longer export the symbols _init, _fini, _edata, _end and __bss_start. I'm not sure how significant this is, since I think the ELF section headers supply the same information to the dynamic linker.

(file #39292)

Jan Steffens <heftig>
Thu 22 Dec 2016 03:25:01 AM UTC, comment #3:

Whoops, that should have been subdir-objects, not shared-objects.

Jan Steffens <heftig>
Thu 22 Dec 2016 03:24:01 AM UTC, comment #2:

Yes, that target.

I originally stumbled upon this because gvfs stopped building.

gvfs uses libcdio_cdda (from libcdio-paranoia). libcdio_cdda when built against libcdio 0.93 references mmc_get_hwinfo@@CDIO_16.

The link of gvfsd-cdda fails because ld cannot find this symbol in libcdio 0.94. It only provides an unversioned mmc_get_hwinfo.

This is on Arch Linux x86_64.

Basically, the recipe looks through the .lo objects the library depends on in order to find the actual object files hidden by libtool. It then extracts the symbols from these files, compares them to the list of to-be-exported symbols and writes a version script which exports and/or hides the symbols found, as well as assigning them all a version.

The problem with shared-objects is that the lo files now lie in subdirectories, but the paths to the actual object files are still relative to the lo files, not the Makefile, and the recipe ignores that.

Poking through the objects feels like a giant hack. There is probably a simpler way of handling the version script.

Jan Steffens <heftig>
Thu 22 Dec 2016 01:02:26 AM UTC, comment #1:

To be clear, you mean the libcdio.la.ver target, right?

It might help if you could give some specific details to look for so we can know that this is fixed.

Nicolas would you look at and advise?

Via remake one can stop at the target and write out the expanded set of bash commands, if that will help.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Wed 21 Dec 2016 11:31:15 PM UTC, original submission:

The version script generator script in lib/driver/Makefile.am broke in 0.94.

It expects the pic_object paths to be relative to lib/driver, but with subdir-objects some of the objects are in subdirectories like lib/driver/mmc instead, and the pic_object paths are relative to those subdirectories.

As a result, a lot of symbols are silently left unversioned.

Jan Steffens <heftig>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by stefanbruens (Posted a comment)
  • -email is unavailable- added by rocky (Updated the item)
  • -email is unavailable- added by heftig (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-24 rocky StatusIn Progress => Works For Me
    2017-10-09 rocky StatusNone => In Progress
        Assigned tonboullis => rocky
    2016-12-22 heftig Attached File- => Added 0001-Simplify-version-script-generation.patch, #39292
    2016-12-22 rocky Assigned toNone => nboullis

    Back to the top


    Powered by Savane 3.3