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 Dec 11 21:31:49 2013  
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 Feb 12 09:31:00 2014, 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 Dec 16 21:08:08 2013, 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 Dec 13 17:59:35 2013, comment #3:


Richard Shann <rshann>
Project Administrator
Thu Dec 12 22:51:02 2013, 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 Dec 12 08:22:11 2013, 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 Dec 11 21:31:49 2013, 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):

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 Feb 11 10:45:40 2014rshannOpen/ClosedOpen=>Closed
    Fri Dec 13 17:59:35 2013rshannStatusNone=>Duplicate
    Wed Dec 11 21:31:49 2013ryandesignAttached File-=>Added patch-configure.diff, #29881

    Back to the top

    Powered by Savane 3.1-cleanup1