Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 30438 - [ebuild update] media-tv/xawdecode-1.8.1
Summary: [ebuild update] media-tv/xawdecode-1.8.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-05 15:38 UTC by TGL
Modified: 2003-11-06 01:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xawdecode-ebuild-1.8.0-1.8.1.patch (xawdecode-ebuild-1.8.0-1.8.1.patch,1.51 KB, patch)
2003-10-05 15:39 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TGL 2003-10-05 15:38:29 UTC
Hi,

Xawdecode-1.8.1 is out. As I've only made some small changes to the ebuild (better font installation), a patch against xawdecode-1.8.0.ebuild follows. 

BTW, xawdecode's developers asked me to if it was possible to mark something newer than 1.6.8 as stable (this one is now really outdated). Could you do this at least for 1.8.0 on x86 please? 

Thanks a lot.
Comment 1 TGL 2003-10-05 15:39:35 UTC
Created attachment 18810 [details, diff]
xawdecode-ebuild-1.8.0-1.8.1.patch
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-10-28 16:29:05 UTC
make[2]: Entering directory `/var/tmp/portage/xawdecode-1.8.1/work/xawdecode-1.8.1/src'
/bin/sh ../libtool --mode=link gcc -Wall -D_REENTRANT -march=athlon-xp -O2
-pipe -fomit-frame-pointer  -I/usr/X11R6/include -march=athlon-xp -pipe -fomit-frame-pointer
-I/usr/X11R6/include -Wall -I/usr/include -DPREFIX='"/usr"' -D_LARGEFILE64_SOURCE
   -o hi240torgb_gen  hi240torgb_gen.o  
gcc -Wall -D_REENTRANT -march=athlon-xp -O2 -pipe -fomit-frame-pointer -I/usr/X11R6/include
-march=athlon-xp -pipe -fomit-frame-pointer -I/usr/X11R6/include -Wall -I/usr/include
-DPREFIX=\"/usr\" -D_LARGEFILE64_SOURCE -o hi240torgb_gen hi240torgb_gen.o

hi240torgb_gen.o(.text+0xb90): In function `main':
: undefined reference to `sqrt'
hi240torgb_gen.o(.text+0xbb1): In function `main':
: undefined reference to `sqrt'
hi240torgb_gen.o(.text+0xbd2): In function `main':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status
make[2]: *** [hi240torgb_gen] Error 1
make[2]: Leaving directory `/var/tmp/portage/xawdecode-1.8.1/work/xawdecode-1.8.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/xawdecode-1.8.1/work/xawdecode-1.8.1'
make: *** [all] Error 2
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2003-10-28 16:29:43 UTC
I reckon it needs -lm specifically -- can you hack something up for me? 
meanwhile, pushing 1.8.0 to stable.
Comment 4 TGL 2003-10-29 02:29:27 UTC
True, now that I have a gcc-3 box, I can reproduce that.
(I only had 2.95 when I've submited this, and then it 
was working. Sorry about that.)  

----------- A first fix -----------

The quick and easy fix is the following:
- 	emake PERF_FLAGS="${CFLAGS}" || die "Compilation failed."
+ 	emake || die "Compilation failed."

The cflags suggested by the Makefile fix the issue. Here is 
how they are defined (in src/Makefile.in):
PERF_FLAGS = -O4 @_march@ @_mcpu@ -fstrength-reduce -frerun-loop-opt -fexpensive-optimizations
-fschedule-insns2 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
-pipe @ALIGN_FLAGS@ -ffast-math

On my pentium M, it produces (in src/Makefile):
PERF_FLAGS = -O4 -march=pentium3 -mcpu=pentium3 -fstrength-reduce -frerun-loop-opt
-fexpensive-optimizations -fschedule-insns2 -funroll-loops -fomit-frame-pointer
-fno-strict-aliasing -pipe -falign-loops=2 -falign-functions=2 -ffast-math

And then everything compile fine.

I've seen that in several other video apps, user defined 
cflags are already droped in favor of default application
cflags, so this may be an acceptable fix.


----------- Another fix -----------

Another solution is to keep user-cflags and add "-ffastmath",
using flag-o-matic. Patch:
+ inherit flag-o-matic
+ append-flags "-ffast-math -fno-strict-aliasing"

As you can see, I've also added -fno-strict-aliasing, in order 
to avoid the following warning (i'm not sure how harmful it was):
 xawdecode_v4l-conf.c: In function `displayinfo_dga':
 xawdecode_v4l-conf.c:234: warning: dereferencing type-punned pointer will
break strict-aliasing rules


---------------------------------

Now you have two fixes for the price of one. The second one 
may be more gentooish, that said, default flags have been 
widely tested and approved, and they are strong but safe.
So feel free to choose the one you prefer...

And thanks for having pushed 1.8.0 into stable.
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2003-11-06 01:12:45 UTC
1.8.1 in portage now