bugCompact Disc Input and Control Library - Bugs: bug #41811, When linking libcdio.dylib,...

 
 

bug #41811: When linking libcdio.dylib, include necessary Mac packages

Submitted by:  Jim DeLaHunt <jdlh>
Submitted on:  Sun 09 Mar 2014 12:59:32 AM UTC  
 
Category: compilationSeverity: 5 - Average
Item Group: libcdioStatus: Fixed
Privacy: PublicAssigned to: Rocky Bernstein <rocky>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 09 Mar 2014 03:48:03 AM UTC, comment #1:

Thanks for reporting the problem and submitting a patch. The patch has now been committed in git.

The bug

was fixed after the last release.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Sun 09 Mar 2014 12:59:32 AM UTC, original submission:

I installed pycdio on Python 2.7 on my Mac, via pip. I installed libcdio via MacPorts. When I tried to import pycdio and cdio in Python, I got error messages.

Also, when running cd-info on a valid commercially-produced CD, in the track listings it gave me surprising error messages of the form:
The curious thing about this is that the number of minutes was less than 99. I suspected an integer type mismatch.

I was able to fix this on my Mac by adding a reference to three necessary Mac OS frameworks to in the link rule for libcdio. There was already a macro with the framework references, I just added this macro to the link rule.

A patch file is attached.

I fetched libcdio 0.92 sources from the libcdio git repository, built, and installed, and was able to reproduce the import failure in Python. Sadly, I couldn't reproduce the cd-info error message about truncated track lengths.

This is the Python error message:

I believe the underlying problem is that libcdio needs to refer to three Darwin (Mac OS X) frameworks: CoreFoundation, IOKit, and DiskArbitration. The symbol which wasn't found appears to be related to kIOMasterPortDefault as defined in IOKit:
<https://developer.apple.com/library/mac/documentation/IOKit/Reference/IOKitLib_header_reference/Reference/reference.html#//apple_ref/doc/uid/TP40012419-CHIOKitLibhConstants-SW2>

The dynamic library libcdio.dylib as built from 0.92 does not refer to these frameworks:

The fix which works for me is to use a macro DARWIN_PKG_LIB_HACK, which is defined in configure.ac:370..395 . I append it to the end of the definition of libcdio_la_ldflags in lib/driver/Makefile.am:111. I then run "autoreconf" to propogate the changes from Makefile.am to Makefile.in, and then run ./configure and make as usual.

After applying this patch, the libcdio.dylib library now refers to the frameworks:

And, import of pycdio in Python now works fine:

I don't know quite why this would have stopped working. I don't see any recent changes which clearly would have broken this linking.

I am using quite an old edition of Mac OS X, i.e. 10.5.8 . I don't know if this problem occurs on newer versions of Mac OS X. I expect that a macro named DARWIN_PKG_LIB_HACK would be nicely null on other OS's, but I haven't tested this. And perhaps there is a better place to apply this fix than were I applied it.

Jim DeLaHunt <jdlh>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #30830:  patch_bug_link_mac_frameworks.patch added by jdlh (574B - text/x-c - BUGFIX libcdio link to mac frameworks (git diff --patch format))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rocky (Posted a comment)
  • -unavailable- added by jdlh (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 09 Mar 2014 03:48:03 AM UTCrockyStatusNone=>Fixed
      Assigned toNone=>rocky
      Open/ClosedOpen=>Closed
    Sun 09 Mar 2014 12:59:32 AM UTCjdlhAttached File-=>Added patch_bug_link_mac_frameworks.patch, #30830

    Back to the top


    Powered by Savane 3.1-cleanup1