Opened 10 years ago
Closed 5 years ago
#12596 closed Bug Report - General (Fixed)
OS X Linking error re ApplicationServices framework
| Reported by: | Owned by: | JYA | |
|---|---|---|---|
| Priority: | minor | Milestone: | 31.1 |
| 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)
Change History (13)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Must be something unique to how mac port is building, because ApplicationServices should be added automatically by default
comment:3 by , 10 years ago
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!
comment:4 by , 10 years ago
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?
comment:6 by , 10 years ago
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 by , 10 years ago
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
follow-up: 9 comment:8 by , 10 years ago
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 by , 10 years ago
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.
comment:10 by , 5 years ago
I suspect this five year old ticket can be closed, as the OS X builds are now, according to the various list statements, able to be completed.
comment:11 by , 5 years ago
| Milestone: | unknown → 31.1 |
|---|---|
| Resolution: | → Fixed |
| Status: | new → closed |

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