Opened 3 years ago

Last modified 3 years ago

#12596 new Bug Report - General

OS X Linking error re ApplicationServices framework

Reported by: ctreleaven@… Owned by: JYA
Priority: minor Milestone: unknown
Component: Ports - OSX Version: Master Head
Severity: medium Keywords:
Cc: ctreleaven@… Ticket locked: no

Description

Building and installing master (as of 9 Jan 2016) appears to succeed but launching any program results in the following error:

Incompatible library version: /opt/local/bin/mythavtest requires version 64.0.0 or later, but /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices provides version 1.0.0

Note that MacPorts? does a scan for such issues and reports that 23 MythTV programs and 28 libraries/filters exhibit the same issue.

I found that the linker arguments did not include '-framework ApplicationServices?". Adding "--extra-ldflags='-framework ApplicationServices?" to the configure flags works around the problem.

I believe '-framework Security' should also be added for completeness. For example, mythavtest (see otool -L /opt/local/bin/mythavtest) links to:

/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57337.20.43)

The Security framework is also missing from the linker arguments.

Not sure where the proper fix[es] should be.

Attachments (2)

myavtest link 2016 Jan 9.txt (2.1 KB) - added by ctreleaven@… 3 years ago.
Example of linking arguments
0.28pre configure phase 2016Jan09.txt (6.1 KB) - added by ctreleaven@… 3 years ago.
extract from build log

Download all attachments as: .zip

Change History (11)

comment:1 Changed 3 years ago by ctreleaven@…

Should add that I'm running OS X 10.10.5 wtih Xcode 7.2 and up-to-date command line tools.

comment:2 Changed 3 years ago by JYA

Must be something unique to how mac port is building, because ApplicationServices? should be added automatically by default

comment:3 Changed 3 years ago by ctreleaven@…

I'm attaching the 'ld' line (wrapped) from the build log before I added the --extra-ldflags. You can see that neither -framework ApplicationServices? or -framework Security appears. Could you compare to one of your recent builds?

BTW, I can upload the entire build log, if you like. It shows all the arguments used (to configure and make, etc) as well as all the environment variables. But it is over 30k lines!

Changed 3 years ago by ctreleaven@…

Example of linking arguments

comment:4 Changed 3 years ago by JYA

I've just checked my local mythfrontend app (otool -L /path/to/mythfrontend.app/Content/MacOS/mythfrontend it's not linked to this framework and it loads just fine. Same with the backend.

Which configure argument are you providing?

Changed 3 years ago by ctreleaven@…

extract from build log

comment:5 Changed 3 years ago by ctreleaven@…

See attachment.

comment:6 Changed 3 years ago by JYA

oh, I had missed the error you got.

The issue isn't that you're not linking to the framework, it's that it's linked but using the wrong version number.

this is purely a compilation/linker issue.

I had that occurring with the osx-qt-packager at some stage, but I can't remember what I did to get around the issue.

comment:7 Changed 3 years ago by JYA

I think I remember, it was something to do with using -mmacosx-version-min=10.5 vs -mmacosx-version-min=10.6 or later...

Try that in your build configuration

comment:8 Changed 3 years ago by JYA

I can't tell from the log if this is used or not. But that's because the configure log doesn't show the content of environment variables

comment:9 in reply to:  8 Changed 3 years ago by ctreleaven@…

Replying to jyavenard:

I can't tell from the log if this is used or not. But that's because the configure log doesn't show the content of environment variables

Actually lines 5 through 22 show all the environment variables set for the configure phase.

I'm travelling for a few days so I'll try -mmacosx-version-min=blah when I get back.

Note: See TracTickets for help on using tickets.