bugDenemo - Bugs: bug #40878, ld: library not found for...

 
 

bug #40878: ld: library not found for -lporttime

Submitted by:  Ryan Schmidt <ryandesign>
Submitted on:  Wed 11 Dec 2013 09:31:49 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Duplicate
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Wed 12 Feb 2014 09:31:00 AM UTC, comment #5:

I applied commit e73202134bfccbf78a958938d5c14147424cd32f to the 1.1.0 source code and ran autoconf to rebuild configure, then configure ran with this output:

And the build succeeded. Thanks!

Ryan Schmidt <ryandesign>
Mon 16 Dec 2013 09:08:08 PM UTC, comment #4:

I pushed in master. Now autotools should detect libporttime and libportmidi and link against which ones are present. Can you please test ?

√Čloi Rivard <eloi>
Project Member
Fri 13 Dec 2013 05:59:35 PM UTC, comment #3:

https://savannah.gnu.org/bugs/?38656

Richard Shann <rshann>
Project Administrator
Thu 12 Dec 2013 10:51:02 PM UTC, comment #2:

I assumed that some prior version of portmidi had used two separate libraries but that the current version no longer did. I checked the portmidi changelog, but unfortunately what I found says:

This implies that on OS X there's only a single portmidi library but on other systems there might still be both. If this is true, this is unfortunate because it means that developers using OS X are likely to write software that doesn't build on other systems, and vice versa.

portmidi doesn't seem to provide a pkg-config .pc file or portmidi-config script either.

Perhaps the portmidi developers can recommend a snippet you can use in your configure script to get the correct library flags to use.

I am not well versed in writing configure scripts but I believe autotools has the capability to determine if a symbol is in a library, or at least to test if a program compiles and runs. So you should be able to write a small program that uses a symbol that would be in porttime in Linux, and try to link it with only -lportmidi. If it succeeds, use -lportmidi only. You could run a second test like the one you already run using both -lportmidi and -lporttime; if that works, use both. If neither version works, complain that portmidi is missing.

Ryan Schmidt <ryandesign>
Thu 12 Dec 2013 08:22:11 AM UTC, comment #1:

My understanding is that some distros split libportmidi into two libraries called libportmidi and libporttime. So those distros that use only one but install a link for the other are coping with that situation.
Your patch would break the build for the other sort of distro - I wonder if there is a way we could make Denemo build in either case?

Richard Shann <rshann>
Project Administrator
Wed 11 Dec 2013 09:31:49 PM UTC, original submission:

Hello, I'm a developer with the MacPorts project, trying to update our denemo port to the latest version.

Denemo 1.1.0 is failing to build on OS X 10.9 Mavericks as follows:

Configure output shows the headers were detected:

However there is indeed no libporttime.dylib in MacPorts' portmidi 217 package, only libportmidi.dylib and libpmjni.dylib.

Brief Googling leads me to see that some distributions have made libporttime a symlink to libportmidi, but if they're the same library, why even try to use libporttime?

I'm attaching a patch to the configure script that fixes the problem for me.

Ryan Schmidt <ryandesign>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29881:  patch-configure.diff added by ryandesign (394B - application/octet-stream - patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by eloi (Posted a comment)
  • -unavailable- added by rshann (Posted a comment)
  • -unavailable- added by ryandesign (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 11 Feb 2014 10:45:40 AM UTCrshannOpen/ClosedOpen=>Closed
    Fri 13 Dec 2013 05:59:35 PM UTCrshannStatusNone=>Duplicate
    Wed 11 Dec 2013 09:31:49 PM UTCryandesignAttached File-=>Added patch-configure.diff, #29881

    Back to the top


    Powered by Savane 3.1-cleanup