Opened 11 years ago
Last modified 11 years ago
#2134 new defect
Build fails with clang, lvvm, etc. on Mac OSX > 10.6 (fix included)
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | build system |
Version: | HEAD | Severity: | critical |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
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.
- using -DPIC with YASM to allow ffmpeg to compile properly
- Using -Wl,-pie to fix linking since -pie -fpie is incorrect under Darwin's clang
- --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)
Change History (4)
by , 11 years ago
Attachment: | mplayer-clang-fix.diff added |
---|
by , 11 years ago
Attachment: | mplayer-clang-fix.2.diff added |
---|
Darwin-specific changes to fix compilation on current Mac OS X/Xcode/clang
comment:1 by , 11 years ago
attachments.isobsolete: | 0 → 1 |
---|
Updated the patch to remove an extraneous change. This patch only touches the relevant areas now.
comment:2 by , 11 years ago
Summary: | Build fails with clang, lvvm, etc. on Mac OSX > 10.6 → Build fails with clang, lvvm, etc. on Mac OSX > 10.6 (fix included) |
---|
Darwin-specific changes to fix compilation on current Mac OS X/Xcode/clang