Bug 115076 - multimedia/ffmpeg has problem of optimization flags
Summary: multimedia/ffmpeg has problem of optimization flags
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: freebsd-multimedia (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-31 11:20 UTC by Tatsuki Makino
Modified: 2007-08-25 22:50 UTC (History)
0 users

See Also:


Attachments
patch-ffmpeg.txt (1.24 KB, patch)
2007-08-13 11:56 UTC, Tatsuki Makino
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tatsuki Makino 2007-07-31 11:20:01 UTC
Build is failed when using -O1 flag.
WITH_OPTIMIZED_CFLAGS is not working.

Fix: 

Use -O2, -O3 or -Os flag.

cat >> /etc/make.conf
.if (${.CURDIR} == "/usr/ports/multimedia/ffmpeg")
CFLAGS= -O2 -fno-strict-aliasing -pipe
.endif
^D
How-To-Repeat: # backup your make.conf
mv /etc/make.conf /etc/make.conf.bak
# set -O1 to CFLAGS
# (I wrote for something. I forgot :-) )
echo CFLAGS= -pipe -O1 >> /etc/make.conf
cd /usr/ports/multimedia/ffmpeg
make
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-07-31 11:20:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-multimedia

Over to maintainer
Comment 2 Tatsuki Makino 2007-08-10 09:50:10 UTC
Gaah, I did mistaken orz. I double-checked it.

The problem doesn't occur in a specified -O1 flag.
But, build that specified -O0 flag or build without -O flag causes the
problem.
ex.1: CFLAGS= -O0 -pipe
ex.2: CFLAGS= -pipe

And, Build is stopped as follows.

cc -O0 -pipe -march=pentium3 -O0 -pipe -march=pentium3
-I/usr/local/include -pthread -fomit-frame-pointer
-Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization
-Wpointer-arith -Wredundant-decls
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"/libavutil
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"/libavcodec
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"/libavformat
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"/libswscale
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE
-DHAVE_AV_CONFIG_H
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"/libswscale
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"/libavcodec
 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_ISOC9X_SOURCE
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"
-I"/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12"/libavutil
-O0 -pipe -march=pentium3 -O0 -pipe -march=pentium3 -I/usr/local/include
-pthread -fomit-frame-pointer -Wdeclaration-after-statement -Wall
-Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
-c -o i386/dsputil_mmx.o i386/dsputil_mmx.c
i386/dsputil_mmx.c: In function `transpose4x4':
i386/dsputil_mmx.c:644: error: can't find a register in class
`GENERAL_REGS' while reloading `asm'
i386/dsputil_mmx.c: In function `gmc_mmx':
i386/dsputil_mmx.c:2659: warning: suggest parentheses around arithmetic
in operand of |
i386/dsputil_mmx.c:2659: warning: suggest parentheses around arithmetic
in operand of |
i386/dsputil_mmx.c:2660: warning: suggest parentheses around arithmetic
in operand of |
i386/dsputil_mmx.c:2660: warning: suggest parentheses around arithmetic
in operand of |
i386/dsputil_mmx.c:2660: warning: suggest parentheses around arithmetic
in operand of |
gmake[1]: *** [i386/dsputil_mmx.o] Error 1
gmake[1]: Leaving directory
`/usr/ports/.work/usr/ports/multimedia/ffmpeg/work/ffmpeg-2007-07-12/libavcodec'
gmake: *** [lib] Error 2
*** Error code 2

Stop in /usr/ports/multimedia/ffmpeg.
Comment 3 Tatsuki Makino 2007-08-13 11:56:13 UTC
This is a patch to work WITH_OPTIMIZED_CFLAGS and some fixes.
I don't know what corrected points cause...
Comment 4 dfilter service freebsd_committer freebsd_triage 2007-08-25 22:47:49 UTC
mezz        2007-08-25 21:47:44 UTC

  FreeBSD ports repository

  Modified files:
    multimedia/ffmpeg    Makefile 
  Log:
  -Fix the CFLAGS/LDFLAGS.
  -Fix the build if it has no -O* or/and has -O0 by force replace to -O2.
  
  PR:             ports/115076
  Submitted by:   Tatsuki Makino <tatsuki_makino@hotmail.com>
  
  Revision  Changes    Path
  1.71      +6 -4      ports/multimedia/ffmpeg/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Jeremy Messenger freebsd_committer freebsd_triage 2007-08-25 22:47:53 UTC
State Changed
From-To: open->closed

Committed with a bit tweak, thanks!