Bug 171707 - multimedia/mplayer: i386 clang build error
Summary: multimedia/mplayer: i386 clang build error
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-17 13:40 UTC by anonymous
Modified: 2013-02-13 10:40 UTC (History)
0 users

See Also:


Attachments
file.diff (760 bytes, patch)
2012-09-17 13:40 UTC, anonymous
no flags Details | Diff
patch.txt (1.04 KB, text/plain; charset=us-ascii)
2013-02-12 03:00 UTC, Alex Kozlov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description anonymous 2012-09-17 13:40:09 UTC
Clang fails when building mp3lib on i386.

clang -MD -MP -D_ISOC99_SOURCE -D_BSD_SOURCE -O2 -pipe -O3
-fomit-frame-pointer -ffast-math -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
-Ilibdvdread4 -I. -Iffmpeg -I/usr/local/include -I/usr/local/include
-I/usr/local/include  -I/usr/local/include/freetype2
-I/usr/local/include -fomit-frame-pointer -c -o mp3lib/decode_i586.o
mp3lib/decode_i586.c
mp3lib/decode_i586.c:65:23: error: unknown token in expression
"        pushl %%eax\n\t"
                      ^
<inline asm>:22:18: note: instantiated into assembly here
                movl 4+(%esp),%edx
                        ^
mp3lib/decode_i586.c:68:23: error: unknown token in expression
"        pushl %%eax\n\t"
                      ^
<inline asm>:25:18: note: instantiated into assembly here
                movl 8+(%esp),%eax
                        ^
2 errors generated.
gmake: *** [mp3lib/decode_i586.o] Error 1
gmake: *** Waiting for unfinished jobs....
3 warnings generated.
*** Error code 1

Fix: "As part of the code cleanup efforts, the internal libfaad2 copy has been removed since the FFmpeg decoder is working well. Also the internal mp3lib copy is no longer used by default since the many alternatives (FFmpeg, libmpg123, libmad) avoid its recurring issues like incorrect decoding with newer compilers. However it can still be forced at runtime for easier tracking of regressions. Please do not rely on this since it will be removed in the future. If you do not actually need it consider disabling it at compile time with --disable-mp3lib."
http://www.mplayerhq.hu/design7/news.html

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-09-17 13:40:24 UTC
Maintainer of multimedia/mplayer,

Please note that PR ports/171707 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/171707

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-09-17 13:40:25 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Thomas Zander 2012-09-18 19:30:03 UTC
This is good. Let's commit this with a slight modification:
@committer: Can you please put the additional configure args
"--disable-mp3lib" into Makefile.shared instead of Makefile. This
fixes the problem for mencoder as well. Thanks.

Best,
Riggs
Comment 4 Alex Kozlov 2013-02-12 03:00:39 UTC
Hi

Sorry for the delay. Can you please check and approve next patch?

p.s. Do you plan to convert port to new options framework in the near future?
     I would be glad to help.


-- 
Alex
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-02-13 10:39:26 UTC
Author: ak
Date: Wed Feb 13 10:39:13 2013
New Revision: 312152
URL: http://svnweb.freebsd.org/changeset/ports/312152

Log:
  - Fix build with clang [1]
  - Convert Makefile headers to new style
  
  PR:	ports/171707 [1]
  Submitted by:	anonymous <anonymous@gmail.com>
  Approved by:	Thomas Zander <thomas.e.zander@googlemail.com> (maintainer)

Modified:
  head/multimedia/mplayer/Makefile
  head/multimedia/mplayer/Makefile.options
  head/multimedia/mplayer/Makefile.shared

Modified: head/multimedia/mplayer/Makefile
==============================================================================
--- head/multimedia/mplayer/Makefile	Wed Feb 13 10:24:15 2013	(r312151)
+++ head/multimedia/mplayer/Makefile	Wed Feb 13 10:39:13 2013	(r312152)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	mplayer
-# Date created:		10 August 2001
-# Whom:			Thomas E. Zander
-#			with lots of help from Vladimir Kushnir
+# Created by: Thomas E. Zander with help from Vladimir Kushnir
 # $FreeBSD$
-#
 
 PORTNAME=	mplayer
 PORTVERSION=	${MPLAYER_PORT_VERSION}
@@ -96,7 +92,7 @@ CONFIGURE_ARGS+=	--disable-directfb \
 
 # Fix a problem with unknown assembly opcodes in embedded ffmpeg
 .if ${ARCH} == "ppc"
-CONFIGURE_ARGS+=        --disable-asm
+CONFIGURE_ARGS+=	--disable-asm
 .endif
 
 .include "${.CURDIR}/Makefile.options"

Modified: head/multimedia/mplayer/Makefile.options
==============================================================================
--- head/multimedia/mplayer/Makefile.options	Wed Feb 13 10:24:15 2013	(r312151)
+++ head/multimedia/mplayer/Makefile.options	Wed Feb 13 10:39:13 2013	(r312152)
@@ -52,7 +52,7 @@ CFLAGS+=	-O3 -fomit-frame-pointer -ffast
 .endif #WITH_DEBUG
 
 #Supported architectures for clang
-.if ${ARCH} == "amd64"
+.if ${ARCH} == "i386" || ${ARCH} == "amd64"
 MPLAYER_CLANG_SUPPORTED_ARCH=	yes
 .endif
 

Modified: head/multimedia/mplayer/Makefile.shared
==============================================================================
--- head/multimedia/mplayer/Makefile.shared	Wed Feb 13 10:24:15 2013	(r312151)
+++ head/multimedia/mplayer/Makefile.shared	Wed Feb 13 10:39:13 2013	(r312152)
@@ -39,6 +39,7 @@ CONFIGURE_ARGS=	--cc="${CC}" \
 		--disable-liba52 \
 		--disable-alsa \
 		--disable-libbs2b \
+		--disable-mp3lib \
 		--enable-ass-internal
 
 WANT_GNOME=	yes
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Alex Kozlov freebsd_committer freebsd_triage 2013-02-13 10:40:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.
Comment 7 Alex Kozlov freebsd_committer freebsd_triage 2013-02-13 10:40:43 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!