Opened 4 years ago

Last modified 4 years ago

#2134 new defect

Build fails with clang, lvvm, etc. on Mac OSX > 10.6 (fix included)

Reported by: git@… Owned by: diego@…
Priority: normal Component: build system
Version: HEAD Severity: critical
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

It is not possible to build Mplayer on Mac OS X > 10.6 due to a few errors in the build system. The following changes (all can be implemented in configure for the darwin/x86_64 target) allow mplayer to build properly.

  1. using -DPIC with YASM to allow ffmpeg to compile properly
  2. Using -Wl,-pie to fix linking since -pie -fpie is incorrect under Darwin's clang
  3. --mdynamic-no-pic breaks compilation due to security features in newer versions of Mac OS X

Clang does support PIC but the configure check breaks due to the inclusion of -fpie -pie so I added a separate check for clang and darwin to include the right flags. After that, PIC is successfully detected and works fine.

Attached a patch which fixes the issue and should not affect any other platforms.

Attachments (2)

mplayer-clang-fix.diff (1.1 KB) - added by git@… 4 years ago.
Darwin-specific changes to fix compilation on current Mac OS X/Xcode/clang
mplayer-clang-fix.2.diff (740 bytes) - added by git@… 4 years ago.
Darwin-specific changes to fix compilation on current Mac OS X/Xcode/clang

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by git@…

Darwin-specific changes to fix compilation on current Mac OS X/Xcode/clang

Changed 4 years ago by git@…

Darwin-specific changes to fix compilation on current Mac OS X/Xcode/clang

comment:1 Changed 4 years ago by git@…

  • attachments.isobsolete changed from 0 to 1

Updated the patch to remove an extraneous change. This patch only touches the relevant areas now.

comment:2 Changed 4 years ago by git@…

  • Summary changed from Build fails with clang, lvvm, etc. on Mac OSX > 10.6 to Build fails with clang, lvvm, etc. on Mac OSX > 10.6 (fix included)
Note: See TracTickets for help on using tickets.