Bug 37812 - ERROR: media-libs/svgalib-1.9.17-r3 failed.
|
Bug#:
37812
|
Product: Gentoo Linux
|
Version: 1.4
|
Platform: x86
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: plasmaroo@gentoo.org
|
Reported By: griso.roberto@virgilio.it
|
|
Component: Library
|
|
|
URL:
|
|
Summary: ERROR: media-libs/svgalib-1.9.17-r3 failed.
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2004-01-10 10:11 0000
|
In file included from
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:11:
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/include/vga.h:541:1:
warning: "ROP_XOR" redefined
In file included from
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:4:
/usr/include/linux/fb.h:272:1: warning: this is the location of the previous
definition
In file included from
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:4:
/usr/include/linux/fb.h:345: error: syntax error before "atomic_t"
In file included from
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:12:
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/libvga.h:106: error:
redefinition of `struct info'
make[1]: *** [drivers/fbdev.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/staticlib'
make: *** [staticlib/libvga.a] Error 2
!!! ERROR: media-libs/svgalib-1.9.17-r3 failed.
!!! Function src_compile, Line 39, Exitcode 2
!!! Failed to build libraries and utils!
you neglected to provide helpful output about your system ...
we'll need:
emerge info
the version of kernel headers you use
the kernel version you have at /usr/src/linux
I'm having the same problem here.
linux-headers-2.6.0
development-sources-2.6.1
emerge info
Portage 2.0.49-r21 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.6.1)
=================================================================
System uname: 2.6.1 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://mirror.aarnet.edu.au/pub/gentoo ftp://ftp.vic.keypoint.com.au/pub/gentoo/distfiles/ http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://maggie/gentoo-portage"
USE="3dnow S3TC X acpi alsa avi crypt cups dga encode fbcon flac gdbm geoip gif gtk gtk2 imap imlib java jpeg kde libg++ libwww lirc matroska mmx motif mpeg ncurses nptl offensive oggvorbis opengl pam pdflib perl png python qt quicktime readline samba sdl slang spell sse ssl svga tcpd truetype v4l vim-with-x x86 xml2 xmms xv xvid zlib"
Created an attachment (id=23896) [details]
Fixes the compile problem "redefinition.." whith installed linux-headers-2.6
This patch should fix the compile problems on boxes with linux-headers-2.6.x,
the patch should be also working if linux-headers-2.4.x are installed.
Same problem:
-----------------------------------------------------------------------------
gcc -shared -Wl,-soname,libvga.so.1 \
-Xlinker --retain-symbols-file -Xlinker ../src/exports \
-o libvga.so.1.9.17 vga.o vgaio.o vgadraw.o vgaclear.o vgaline.o vgapix.o vgapal.o vgacol.o vgamodesel.o vgamisc.o vgadump.o vgaconvplanar.o vgaaccel.o timing.o vgaregs.o interface.o accel.o vgapci.o vga_helper.o vga_console.o vgarelvgaio.o vgammvgaio.o vgacursor.o vganullio.o mouse/mouse.o joystick/joystick.o keyboard/keyboard.o ramdac/ramdac.o ramdac/normal.o ramdac/attdacs.o ramdac/sierra.o ramdac/icw.o ramdac/s3dacs.o ramdac/IBMRGB52x.o ramdac/ics_gendac.o clockchip/icd2061a.o vgadrv.o regextr.o modetab.o drivers/cirrus.o drivers/tvga8900.o drivers/trident.o drivers/s3.o drivers/ark.o drivers/ali.o drivers/chips.o drivers/apm.o drivers/vesa.o lrmi.o drivers/nv3.o drivers/savage.o drivers/g400.o drivers/pm2.o drivers/millennium.o drivers/r128.o drivers/mx.o drivers/paradise.o drivers/rage.o drivers/banshee.o drivers/sis.o drivers/i740.o drivers/i810.o drivers/laguna.o drivers/et6000.o drivers/neo.o drivers/fbdev.o drivers/rendition.o -lm
make: Leaving directory `/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src'
make: Entering directory `/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/threeDKit'
rm -f lib3dkit.a
ar rcs lib3dkit.a
make: Leaving directory `/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/threeDKit'
make: Entering directory `/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper'
rm -f *.ko *.o *~ core .depend *.bak *.orig
gcc -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE -nostdinc -iwithprefix include -I/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper/include -I. -I/usr/src/linux/include -I/usr/src/linux/include/asm/mach-default -DSVGALIB_HELPER_MAJOR=209 -M *.c > .depend
gcc -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE -nostdinc -iwithprefix include -I/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper/include -I. -I/usr/src/linux/include -I/usr/src/linux/include/asm/mach-default -DSVGALIB_HELPER_MAJOR=209 -c -o main.o main.c
In file included from main.c:24:
kernel26compat.h:17: redefinition of `irqreturn_t'
/usr/src/linux/include/linux/interrupt.h:16: `irqreturn_t' previously declared here
make: *** [main.o] Error 1
make: Leaving directory `/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper'
!!! ERROR: media-libs/svgalib-1.9.17-r3 failed.
!!! Function src_compile, Line 52, Exitcode 2
!!! Failed to build kernel module!
-----------------------------------------------------------------------------
emerge info:
Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.4.23_pre8-gss-r2)
=================================================================
System uname: 2.4.23_pre8-gss-r2 i686 Intel(R) Xeon(TM) CPU 3.06GHz
Gentoo Base System version 1.4.3.10
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ ftp://trumpetti.atm.tut.fi/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://trumpetti.atm.tut.fi/gentoo-portage"
USE="apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gnome gpm gtk gtk2 imlib jpeg kde libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib"
-----------------------------------------------------------------------------
ls -l /usr/src/ :
lrwxrwxrwx 1 root root 21 Jan 8 11:21 linux -> linux-2.4.23_pre8-gss
drwxr-xr-x 10 root root 352 Jan 8 09:24 linux-2.4.23
drwxr-xr-x 16 root root 912 Jan 8 11:25 linux-2.4.23_pre8-gss
Created an attachment (id=23908) [details]
Updated patch
I just updated my patch, it had a little bug in it which could break
acceleration on some cards, that use ROP_XOR, so here is the patch that should
fix compile with linux-headers 2.6.x and it is still compatible with headers
2.4.x
Hi Aleksandr, I just checked, if there is a redefiniton of :
"kernel26compat.h:17: redefinition of `irqreturn_t'"
this is done in gentoo patch, svgalib-1.9.17-linux2.6.patch, this error doesn't occur on my box with 2.6 headers,
sh-2.05b# grep -r 'irqreturn_t' *
svgalib-1.9.17-linux2.6.patch:+typedef void irqreturn_t;
svgalib-1.9.17-linux2.6.patch:+static irqreturn_t vsync_interrupt(int irq, void *dev_id, struct pt_regs *regs)
sh-2.05b#
So I guess there is a little bug in svgalib-1.9.17-linux2.6.patch
Can someone fix it his code and update the patch, with out testing -->I think this should work(undefining irqreturn_t and then define it:
#ifdef irqreturn_t
#undef irqreturn_t
+typedef void irqreturn_t;
Also problem with 2.6 kernel headers, mm-sources-2.6.1-r1, gcc-3.2.3-r3,
glibc-2.3.2-r3:
linux-headers-2.6.0
/usr/src/linux -> /usr/src/linux-2.6.1-mm1
Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.6.1-mm1)
=================================================================
System uname: 2.6.1-mm1 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz
Gentoo Base System version 1.4.3.10
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer
-mfpmath=sse,387 -msse -mmmx -fprefetch-loop-arrays -funroll-loops
-falign-functions=4 -falign-jumps=4"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer
-mfpmath=sse,387 -msse -mmmx -fprefetch-loop-arrays -funroll-loops
-falign-functions=4 -falign-jumps=4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages sandbox"
GENTOO_MIRRORS="ftp://ftp.easynet.nl/mirror/gentoo/
ftp://trumpetti.atm.tut.fi/gentoo/
http://ftp6.uni-erlangen.de/pub/mirrors/gentoo
http://ds.thn.htu.se/linux/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/src/ebuilds"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage/"
USE="3ds X aalib acpi acpi4linux alsa altcolors amd apache2 apm arts
artswrappersuid avi berkdb bonobo cdr clamav crypt cscope cups curl dga dnd doc
dvb dvd dvdr encode esd evo exiscan-acl faad flash foomaticdb foreign-package
foreign-sysvinit gamma gb gd gd-external gdbm ggi gif gnome gnomedb gphoto2 gps
gtk gtk2 gtkhtml guile hbci i8x0 imagemagick imap imlib ipv6 jack java jikes
jpeg justify kde krb4 lcms libdsk libg++ libgda libwww mad maildir matroska
mbox md5sum mikmod mmx motif mozilla mozinterfaceinfo moznocompose moznoirc
mozp3p mozsvg mpeg music mysql nas ncurses nls nocardbus nocd nowin nptl oav
offensive ofx oggvorbis openal opengl oss pam parse-clocks pda pdflib perl pic
png ppds python qt quicktime readline rplay ruby ruby18 samba sasl sdl slang
slp snmp sox spell src sse ssl svga tcltk tcpd tetex tiff transcode truetype
type1 usb videos vim-with-x wmf x86 xface xine xinerama xml xml2 xmms xosd xv
xvid zlib"
OUTPUT:
gcc -march=pentium3 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer
-mfpmath=sse,387 -msse -mmmx -fprefetch-loop-arrays -funroll-loops
-falign-functions=4 -falign-jumps=4 -Wall -Wstrict-prototypes -fPIC
-I/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/include -I.
-march=pentium3 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer -mfpmath=sse,387
-msse -mmmx -fprefetch-loop-arrays -funroll-loops -falign-functions=4
-falign-jumps=4 -Wall -Wstrict-prototypes
-I/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/include -I.
-I/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src -march=pentium3
-mcpu=pentium4 -O3 -pipe -fomit-frame-pointer -mfpmath=sse,387 -msse -mmmx
-fprefetch-loop-arrays -funroll-loops -falign-functions=4 -falign-jumps=4
-DSVGALIB_CONFIG_FILE=\"/etc/svgalib/libvga.config\" -DALLOW_MOUSE_OVERRIDE
-DNO_DELAY -c -o drivers/neo.o
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/neo.c
gcc -march=pentium3 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer
-mfpmath=sse,387 -msse -mmmx -fprefetch-loop-arrays -funroll-loops
-falign-functions=4 -falign-jumps=4 -Wall -Wstrict-prototypes -fPIC
-I/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/include -I.
-march=pentium3 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer -mfpmath=sse,387
-msse -mmmx -fprefetch-loop-arrays -funroll-loops -falign-functions=4
-falign-jumps=4 -Wall -Wstrict-prototypes
-I/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/include -I.
-I/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src -march=pentium3
-mcpu=pentium4 -O3 -pipe -fomit-frame-pointer -mfpmath=sse,387 -msse -mmmx
-fprefetch-loop-arrays -funroll-loops -falign-functions=4 -falign-jumps=4
-DSVGALIB_CONFIG_FILE=\"/etc/svgalib/libvga.config\" -DALLOW_MOUSE_OVERRIDE
-DNO_DELAY -c -o drivers/fbdev.o
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c
In file included from /usr/include/linux/spinlock.h:8,
from /usr/include/linux/fb.h:6,
from
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:4:
/usr/include/linux/config.h:4:28: linux/autoconf.h: No such file or directory
In file included from /usr/include/linux/spinlock.h:16,
from /usr/include/linux/fb.h:6,
from
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:4:
/usr/include/asm/processor.h:66: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here
(not in a function)
/usr/include/asm/processor.h:66: requested alignment is not a constant
In file included from
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:4:
/usr/include/linux/fb.h:345: parse error before "atomic_t"
In file included from
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:11:
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/include/vga.h:541:1:
warning: "ROP_XOR" redefined
In file included from
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:4:
/usr/include/linux/fb.h:272:1: warning: this is the location of the previous
definition
In file included from
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:12:
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/libvga.h:106:
redefinition of `struct info'
make[1]: *** [drivers/fbdev.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/staticlib'
make: *** [staticlib/libvga.a] Error 2
!!! ERROR: media-libs/svgalib-1.9.17-r3 failed.
!!! Function src_compile, Line 45, Exitcode 2
!!! Failed to build libraries and utils!
*** Bug 38690 has been marked as a duplicate of this bug. ***
could all you users of linux-headers-2.6.x please try `emerge sync` and then
re-emerge linux-headers to see if this is still a problem ?
as for Aleksandr and Peter, you guys have different bugs that are resolved if
you update your kernels properly
Petter: I think you need to enable the CPU type in mm-sources or else it won't
compile by itself either, that's an -mm bug. Either way, enabling
`CONFIG_X86_L1_CACHE_SHIFT' should work.
Bob, you might to have a look at this in gs-sources and add a patch comment out
the offending lines - they're not yet in vanilla and headers should be kept
more-or-less constant between kernels.
plasmaroo: looking in my config i find:
CONFIG_X86_L1_CACHE_SHIFT=7
Both in the kernel I'm running since this afternoon (mm4) and in the one I used filing the report in comment #9. Can't find where it hides when running 'make menuconfig' though...
I've upgraded to mm-sources-2.6.1-r4, removed nptl from my use flags (since it had some problems for other ebuilds), reemerged the linux-headers-2.6.0, reemerged glibc (twice) and reemerged the packages that was affected by the nptl-flag still no success :(
If it's to any help, I've successfully emerged svgalib with the redifinition patch for 2.6 kernel headers (attached on this bug) on my Pentium3 box. But I've failed to emerge it on my P4 and P2 boxes.
Can the problem be that I'm not using framebuffer in my kernel, considering the error?
(/usr/include/linux/fb.h:272:1: warning: this is the location of the previous definition
In file included from /var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/drivers/fbdev.c:12:
/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/src/libvga.h:106: redefinition of `struct info'
make[1]: *** [drivers/fbdev.o] Error 1)
Emerged the gentoo-dev-sources-2.6.1 and applied the attacehd linux-headers-2.6
patch, and Voila! :-D
The updated patch attached above fixed the problem for me too. I'm using
2.6.1-mm4 with linux-headers-2.6.0 (bootstrapped using scripts/bootstrap-2.6.sh).
Tried it with USE=build and -build. Now all we need is a few people with
2.4 kernels who could compile this before, to try the patch.
Yes, while the attached patch actually works, it seems at first glance (and I
didn't spare it much more than that) to be a crude hack...
At least remove the childish swearing.
What do you mean comment out the patch, this patch isn't even in the ebuild yet
and it is definitely not breaking the build on 2.4 kernels, since I added a
check in the updated patch.
I also got confirmation from the svgalib maintainer now, that this patch is
correct.
Fixed in CVS.
You shouldn't get any issues with 2.4, but if you get the irqreturn_t error then you'll need to comment out the "2.6 compatibility" lines in /usr/src/linux/include/linux/interrupt.h as they shouldn't be there unless you are using >= 2.4.23, which the patch now handles.