Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57420 - svgalib-1.9.19 build fails in main.c
Summary: svgalib-1.9.19 build fails in main.c
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-17 15:21 UTC by John Altstadt
Modified: 2004-07-20 16:12 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Altstadt 2004-07-17 15:21:07 UTC
When I try to emerge svgalib, the build fails when compiling /var/tmp/portage/svgalib-1.9.19/work/svgalib-1.9.19/kernel/svgalib_helper/main.c

Reproducible: Always
Steps to Reproduce:
emerge -v svgalib

Actual Results:  
make[1]: Leaving directory
`/var/tmp/portage/svgalib-1.9.19/work/svgalib-1.9.19/threeDKit'
rm -f *.ko *.o *~ core .depend *.bak *.orig
gcc -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE   -I/include -I.
-I/usr/src/linux/include -I/usr/src/linux/include/asm/mach-default
-DSVGALIB_HELPER_MAJOR=209 -DMODVERSIONS -DCONFIG_MODVERSIONS=1   -c -o main.o
main.c
main.c: In function `remap_cache':
main.c:462: warning: passing arg 1 of `remap_page_range' makes integer from
pointer without a cast
main.c:462: error: incompatible type for argument 4 of `remap_page_range'
main.c:462: error: too many arguments to function `remap_page_range'
distcc[6430] ERROR: compile on localhost failed
make: *** [main.o] Error 1

!!! ERROR: media-libs/svgalib-1.9.19 failed.
!!! Function src_compile, Line 81, Exitcode 2
!!! Failed to build kernel module!


Expected Results:  
The new version of svgalib should have installed.

sabre root # emerge info
Portage 2.0.50-r9 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.4.20-gentoo-r9)
=================================================================
System uname: 2.4.20-gentoo-r9 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.16
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=athlon-xp -funroll-loops -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.2/share/config /usr/kde/3/share/config
/usr/lib/mozilla/defaults/pref /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/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distcc sandbox"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/ http://cudlug.cudenver.edu/gentoo/
http://gentoo.noved.org/ http://mirror.tucdemonic.org/gentoo/
http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X alsa apache2 apm arts avi berkdb bonobo cdr cjk crypt cups curl dga
directfb doc dvd emacs encode esd ethereal fastcgi fbcon foomaticdb gb gd gdbm
gif gnome gpm gtk gtk2 gtkhtml guile imap imlib innodb java jpeg kde libg++
libwww mad maildir mikmod mmx motif mozilla mpeg mysql ncurses nls odbc ofx
oggvorbis opengl oss pam pda pdflib perl png python qt quicktime quotes readline
samba sasl sdl slang slp spell sse ssl svga tcltk tcpd tetex tiff truetype
unicode usb wmf x86 xml xml2 xmms xv zeo zlib"

sabre root #
Comment 1 Corvus 2004-07-17 18:23:41 UTC
it isnt the distcc, had exactly same error here
Portage 2.0.50-r9 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.4.20-gentoo-r20)
=================================================================
System uname: 2.4.20-gentoo-r20 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 1.70GHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/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/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages sandbox"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://gentoo.oregonstate.edu/ 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://rsync.gentoo.org/gentoo-portage"
USE="X aalib apm avi cdr crypt dga doc dvd encode esd evo extensions flash foomaticdb gd gdbm gif gphoto2 gpm gtk gtk2 gtkhtml guile imlib ipv6 java jpeg kde libg++ libwww mad mikmod motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pcmcia pdflib perl png pnp python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd tetex truetype x86 xml xml2 xmms xv zlib"
Comment 2 Ted Baker 2004-07-18 05:27:32 UTC
I've got the same issue.

I'm compiling on a portable - my desktop is fine. Because of this, I'm wondering if there is any link with bug 42236 which I opened several months ago.

Philip
Comment 3 Corvus 2004-07-18 16:13:40 UTC
I found the error:

in svgalib-1.9.19/kernel/svgalib_helper/kernel26compat.h:

line 4 - 23:
...
------------------------------------
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)

# ifdef KERNEL_2_6
#  undef KERNEL_2_6
# endif

# if defined (PG_chainlock)
#  define my_io_remap_page_range(vma, start, ofs, len, prot) \
                io_remap_page_range(vma,start,ofs,len,prot)
# else
#  define my_io_remap_page_range(vma, start, ofs, len, prot) \
                io_remap_page_range(start,ofs,len,prot)
# endif
# ifndef IRQ_HANDLED 
typedef void irqreturn_t;
#  define IRQ_NONE
#  define IRQ_HANDLED
# endif

#else /* Kernel 2.6 */
------------------------------------
...

selects the wrong function type with the test
# if defined (PG_chainlock)

if this would be turned for example into
# if !defined (PG_chainlock)
as a dirty workaround, compilation succeeds.


greetings

Corvus Corax

btw I didnt look into the envolved code, but i dont think this issue has anything todo with bug #42236

more with the ebuild not having been properly tested with the gentoo-sources-2.4.20 kernel

would have been a must, since it builds kernel modules !

well, such thing happens ;)
Comment 4 SpanKY gentoo-dev 2004-07-18 21:57:27 UTC
tim: that patch was developed by yourself wasnt it ?  i cant remember :/

any ideas ?
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2004-07-19 02:50:52 UTC
Yes and no. Martin made the first version to which I made cleanups so it worked with 2.4 and it seems like it morphed from there to upstream - even though we're still making cleanups to the upstream version.

The piece of code with PG_chainlock is actually from upstream so it's not something we caused with our patches... You should be safe with *removing* the PG_chainlock thing completely with the exception of the second definition after the #else since 2.4.1X to 2.4-latest seem to have it without the *vma argument. Only 2.6 [ Well, 2.5+ I think ] has it with a vma; and the 2.6 defninition is in another place.
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2004-07-19 02:53:23 UTC
Hm; never mind removing it - you should change it to "# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,3)" instead of "# if defined (PG_chainlock)"...
Comment 7 SpanKY gentoo-dev 2004-07-20 16:12:34 UTC
updated the source like tim suggested and sent upstream