Opened 2 years ago

Closed 2 years ago

#56398 closed defect (fixed)

libvpx @1.7.0: Toolchain is unable to link executables

Reported by: cgilles (HumanDynamo) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: libvpx

Description

--->  Fetching distfiles for libvpx
--->  Verifying checksums for libvpx
--->  Extracting libvpx
--->  Applying patches to libvpx
--->  Configuring libvpx
Error: Failed to configure libvpx, consult /opt/digikam/var/macports/build/_opt_digikam_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_libvpx/libvpx/work/libvpx-1.7.0/config.log
Error: Failed to configure libvpx: configure failure: command execution failed
Error: See /opt/digikam/var/macports/logs/_opt_digikam_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_libvpx/libvpx/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port ffmpeg failed

Attachments (2)

main.log (24.2 KB) - added by cgilles (HumanDynamo) 2 years ago.
libvpx compilation trace
config.log (53.8 KB) - added by cgilles (HumanDynamo) 2 years ago.
libvpx configure trace

Download all attachments as: .zip

Change History (9)

Changed 2 years ago by cgilles (HumanDynamo)

Attachment: main.log added

libvpx compilation trace

Changed 2 years ago by cgilles (HumanDynamo)

Attachment: config.log added

libvpx configure trace

comment:1 Changed 2 years ago by mf2k (Frank Schima)

Owner: set to dbevans
Port: libvpx added
Status: newassigned

In the future, please fill in the Port field and Cc the port maintainer(s) (port info --maintainers libvpx), if any.

comment:2 Changed 2 years ago by ryandesign (Ryan Schmidt)

Summary: MacOS 10.13.4 : installing ffmpeg failure with libvpxlibvpx @1.7.0: Toolchain is unable to link executables

Ok, the main.log is fairly straightforward about what the problem is:

Toolchain is unable to link executables

And config.log shows us why:

ld: unexpected token: !tapi-tbd-v2 file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib/libpthread.tbd' for architecture x86_64

It shows the MacPorts clang 3.9 compiler being used, together with the 10.13 SDK. That's probably not going to work; the 10.13 SDK requires a current version of clang. Older versions of clang can't understand the text-based dependency (.tbd) format used in newer SDKs. Why is it using such an old version of clang? What version of clang is /usr/bin/clang? What version of Xcode is installed?

I also see reference to MACOSX_DEPLOYMENT_TARGET being set to 10.8. I assume you've done that deliberately by editing macports.conf. That by itself shouldn't be a problem.

comment:3 Changed 2 years ago by kencu (Ken)

the MacPorts versions of ld64 don't speak TAPI. TAPI is new, and it's an Apple-only thing right now. It might come out into the open and we might get it in the open-source world. There is talk of this on the clang-dev mailing list.

For now, to make this work, you have to use Xcode's ld64, which is newer, and speaks TAPI. Then it works fine (just tried it). Do this:

sudo port -v install ld64 +ld64_xcode

and it will build with clang-3.9 and probably anything else you try. You can just leave the linker set like that -- it should handle anything you throw at it.

For MacPorts, there is some logic in making that the default installation on newer systems, as this same error has come up a number of times already, in other ports, when ld64 is called in by something on macOS 10.13.

Last edited 2 years ago by kencu (Ken) (previous) (diff)

comment:4 Changed 2 years ago by pmetzger (Perry E. Metzger)

kencu: what's the next step we need to take towards closing this out?

comment:5 Changed 2 years ago by kencu (Ken)

For a one-off fix, this ticket is done now, once the OP reports he has it installed. For a generic fix for everything, we'd need to ponder whether we force ld64 to always install with the ld64 +ld64_xcode variant on the new systems (10.13, maybe 10.12, maybe 10.11).

comment:6 Changed 2 years ago by cgilles (HumanDynamo)

I can confirm that if i add this line to my whole digiKam build script to package for MAcOS :

https://cgit.kde.org/digikam.git/tree/project/bundles/macports/01-build-macports.sh#n230

... all work perfectly...

Thanks for your support

Gilles Caulier

comment:7 Changed 2 years ago by ken-cunningham-webuse

Resolution: fixed
Status: assignedclosed

In 5698d9483b44984a826d0f41154a4381b7957223/macports-ports (master):

ld64: default to +ld64_xcode on Xcode9+

ld64 does not understand tapi in the open-source
versions at present.

closes: #56843
closes: #53784
closes: #56398
closes: #56277
see: #56647
see: #54510
see: #54506
see: #53151

Note: See TracTickets for help on using tickets.