Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158415 - games-fps/quake2-icculus-0.16.1-r1 Error: Hunk_End: Could not remap virtual block (2)
Summary: games-fps/quake2-icculus-0.16.1-r1 Error: Hunk_End: Could not remap virtual...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo Games
URL: http://icculus.org/quake2/
Whiteboard:
Keywords:
: 194248 298423 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-17 16:51 UTC by B Douglas Hilton
Modified: 2012-04-01 17:08 UTC (History)
12 users (show)

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


Attachments
mremap is defined only if: #define _GNU_SOURCE (quake2-r0.16.1_amd64_mremap.patch,438 bytes, patch)
2006-12-19 04:26 UTC, Pinky
Details | Diff
quake2-icculus-0.16.1-gnusource.patch (quake2-icculus-0.16.1-gnusource.patch,482 bytes, patch)
2007-06-26 18:19 UTC, Flophouse Joe
Details | Diff
quake2-icculus-0.16.1-r2.ebuild (quake2-icculus-0.16.1-r2.ebuild,5.45 KB, text/plain)
2007-06-26 18:19 UTC, Flophouse Joe
Details
proposed modification against quake2-icculus-0.16.1-r1.ebuild, re-rolled on 2008-11-25 (quake2-icculus-0.16.1-r3.ebuild.proposed_on_2008-11-25,5.53 KB, text/plain)
2008-11-25 12:25 UTC, Flophouse Joe
Details
quake2-icculus-0.16.1-r4.ebuild (quake2-icculus-0.16.1-r3.ebuild,5.50 KB, text/plain)
2012-03-21 06:47 UTC, Grzegorz {NineX} Krzystek
Details
quake2-icculus-0.16.1-alsa.patch (quake2-icculus-0.16.1-alsa.patch,4.54 KB, text/plain)
2012-03-21 06:49 UTC, Grzegorz {NineX} Krzystek
Details
quake2-icculus-0.16.1-r4.ebuild (quake2-icculus-0.16.1-r3.ebuild,5.49 KB, text/plain)
2012-03-21 07:28 UTC, Grzegorz {NineX} Krzystek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description B Douglas Hilton 2006-12-17 16:51:17 UTC
The game tries to start up, then crashes with that message. It seems like some kind of memory allocation problem likely due to 64-bit issues.


Portage 2.1.1-r2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r4-cerberus-V5 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: 2.6.18-gentoo-r4-cerberus-V5 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Gentoo Base System version 1.12.6
Last Sync: Thu, 14 Dec 2006 20:50:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp/portage"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="amd64 X allegro alsa ansi aoss audiofile berkdb binary-drivers bitmap-fonts blas bonobo boost branding bzip2 cairo cdparanoia cdr cli corba cpudetection cracklib crypt cups directfb divx dlloader dri dvd dvdr editor elibc_glibc expat fat fbcon fbsplash ffmpeg fftw firefox flac fortran ftp gcc64 gcl gdbm gif ginac glut gmp gnome gnome-print gnuplot gpm gtk gtk2 gtkhtml gzip iconv input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog ithreads jack java joystick jpeg jpeg2k kernel_linux lapack libg++ mikmod mime mng mods mozsvg mp3 mpeg mpi mplayer multiuser ncurses nls nptl nptlonly nsplugin numarray numeric nvidia offensive ogg on-the-fly-crypt opengl oss pam pcre pdf perl physfs plotutils png ppds pppd python qmax readline reflection rogue rtc sdl sdl-sound sdlaudio session sndfile spl ssl tcl tcpd tetex theora threads thunderbird tiff timidity tk truetype truetype-fonts type1-fonts udev unicode urandom userland_GNU userlocales video_cards_fbdev video_cards_nv video_cards_nvidia vim-with-x vorbis wxwindows xatrix xml xorg xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Pinky 2006-12-19 04:25:09 UTC
Explanation:

src/linux/q_shlinux.c: In function 
Comment 2 Pinky 2006-12-19 04:25:09 UTC
Explanation:

src/linux/q_shlinux.c: In function Hunk_End:
src/linux/q_shlinux.c:101: warning: implicit declaration of function mremap
src/linux/q_shlinux.c:101: warning: assignment makes pointer from integer without a cast

return 32bit int, but expect 64bit pointer.

solution is in attached patch
Comment 3 Pinky 2006-12-19 04:26:13 UTC
Created attachment 104353 [details, diff]
mremap is defined only if: #define _GNU_SOURCE
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2007-01-09 23:32:49 UTC
It's definitely 64-bit related, as it works just fine here on 32-bit.  I'll have to check this out later when I'm on a 64-bit box.
Comment 5 Nicholas Doyle 2007-01-09 23:39:59 UTC
Pinky's patch works for me.
Comment 6 Chris Gianelloni (RETIRED) gentoo-dev 2007-01-29 22:58:17 UTC
...and I can't duplicate this problem on any of my AMD64 machines.
Comment 7 Paul Bredbury 2007-01-30 00:05:03 UTC
Which version of glibc are people using? It's apparently glibc which is affected by _GNU_SOURCE
Comment 8 Nicholas Doyle 2007-01-30 01:37:00 UTC
I am using glibc-2.5.
Comment 9 Marcin Kowalski 2007-03-18 18:47:42 UTC
check the qudos (games-fps/qudos) log in the svn repository. it mentions the link to this bug. maybe it was fixed upstream?
Comment 10 Paul Bredbury 2007-03-18 20:31:45 UTC
The change in qudos-9999 (bug #150865) is:

#if !defined _GNU_SOURCE
  #define _GNU_SOURCE
#endif

From http://svn.quakedev.com/viewvc.cgi/qudos/trunk/src/unix/qsh_unix.c?r1=113&r2=344
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2007-03-21 11:34:28 UTC
So I tried this locally, and my mouse seems to be reversed on the left/right axis.  Strange.
Comment 12 Michael S Costello 2007-05-12 19:54:42 UTC
Same problem here, on both qudos and icculus, platform is amd64, kernel 2.6.21 and glibc version 2.5-r2
Comment 13 Paul Bredbury 2007-05-12 20:31:14 UTC
(In reply to comment #12)
> Same problem here, on both qudos

Use the qudos ebuilds from bug #150865. qudos-9999 is best.
Comment 14 Flophouse Joe 2007-06-26 18:19:08 UTC
Created attachment 123131 [details, diff]
quake2-icculus-0.16.1-gnusource.patch
Comment 15 Flophouse Joe 2007-06-26 18:19:35 UTC
Created attachment 123133 [details]
quake2-icculus-0.16.1-r2.ebuild
Comment 16 Flophouse Joe 2007-06-26 18:19:51 UTC
The patch described in comment #3 and in comment #10 works correctly for me on AMD64.  (I've also tested and confirmed that it doesn't appear to introduce any new breakage on x86.)

I've attached to this bug a new patch like the one found in comment #10 .

I've also attached to this bug a new ebuild quake-icculus-0.16.1-r2 , which is the same as 0.16.1-r1, but which includes the patch from comment #10 .

Since this works for me on both amd64 and on x86, and since the new ebuild doesn't change any of the existed architecture keywords, how do you guys feel about adding this to portage so that the amd64 users can run quake2-icculus?
Comment 17 Flophouse Joe 2007-06-26 18:21:22 UTC
(In reply to comment #16)
> I've also attached to this bug a new ebuild quake-icculus-0.16.1-r2 , which is

Clarification: the new ebuild is quake2-icculus-0.16.1-r2 (not to be confused with the non-existent "quake-icculus-0.16.1-r2").
Comment 18 Aren Villanueva 2007-07-30 08:53:14 UTC
What's the progress on the updated ebuild for this?
In the interim, how would I apply this patch to the current ebuilds locally?
Comment 19 B Douglas Hilton 2007-09-30 07:46:06 UTC
*** Bug 194248 has been marked as a duplicate of this bug. ***
Comment 20 Sergey Kondakov 2008-03-20 16:54:13 UTC
confirm it on 
Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.2.3, glibc-2.7-r1, 2.6.24-gentoo-r3-v-fox-desktop x86_64)
requesting adding patch in portage + removing broken alsa support until fixing it
Comment 21 Maciej Józiewicz 2008-11-24 17:36:20 UTC
Could someone please put the r2 version in portage? (or some overlay)

I get the same error when trying to start a new game. (I have 0.16.1-r1 installed)

Portage 2.1.4.5 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.28-rc6 x86_64)
=================================================================
System uname: 2.6.28-rc6 x86_64 Intel(R) Pentium(R) Dual CPU T2370 @ 1.73GHz
Timestamp of tree: Mon, 24 Nov 2008 16:45:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.4.7-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.vectranet.pl/gentoo/ ftp://ftp.vectranet.pl/gentoo/ http://gentoo.prz.rzeszow.pl http://gentoo.zie.pg.gda.pl http://gentoo.po.opole.pl ftp://gentoo.po.opole.pl ftp://mirror.icis.pcz.pl/gentoo/ http://gentoo.mirror.pw.edu.pl/ "
LANG="pl_PL.utf8"
LC_ALL="pl_PL.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="pl en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/wschlich-testing /usr/portage/local/layman/x11 /usr/portage/local/layman/synce"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 apm avahi bash-completion berkdb bluetooth branding bzip2 cairo caps cddb cdr cli cracklib crypt css cups cxx dbus dga djvu doc dri dts dvd dvdr dvdread eds emboss encode esd evo exif fbcon ffmpeg flac fltk fortran ftp gd gdbm gif gimp glut gnome gnome-keyring gnutls gphoto2 gpm gstreamer gtk gtkhtml guile hal hddtemp iconv idn ieee1394 imagemagick imlib ipv6 java javascript jbig joystick jpeg jpeg2k kerberos lame latex lcms ldap libcaca libgda libnotify lm_sensors lzo mad matroska midi mikmod mime mmx mng mono mp3 mpeg mplayer mudflap multilib musepack ncurses networkmanager nls nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp pam pcmcia pcre pda pdf perl png portaudio ppds python qt3 qt3support qt4 quicktime rdesktop readline reflection samba scanner sdl session slang speex spell sse sse2 ssl startup-notification svg sysfs tcpd theora threads tiff tk truetype unicode usb vcd videos vim-syntax vorbis wavpack wifi wma wmf x264 xattr xine xinerama xml xorg xosd xpm xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 22 Mr. Bones. (RETIRED) gentoo-dev 2008-11-25 01:46:33 UTC
-r2 is behind the -r1 in portage in a number of areas.  The way it is currently isn't going to be added but if it were re-rolled against the current -r1 it might.
Comment 23 Flophouse Joe 2008-11-25 12:25:43 UTC
Created attachment 173337 [details]
proposed modification against quake2-icculus-0.16.1-r1.ebuild, re-rolled on 2008-11-25

This new, proposed e-build has been re-rolled against quake2-icculus-0.16.1-r1.ebuild on 2008-11-25.  This version of the ebuild still requires the patch file quake2-icculus-0.16.1-gnusource.patch.  The only difference between this proposed ebuild and the current -r1 is the following:

--- quake2-icculus-0.16.1-r1.ebuild.as_of_2008-02-29    2008-11-25 07:08:14.000000000 -0500
+++ quake2-icculus-0.16.1-r3.ebuild.proposed_on_2008-11-25      2008-11-25 07:15:33.000000000 -0500
@@ -68,6 +68,7 @@
        epatch "${FILESDIR}"/${P}-amd64.patch # make sure this is still needed in future versions
        epatch "${FILESDIR}"/${P}-gentoo-paths.patch
        epatch "${FILESDIR}"/${P}-no-asm-io.patch #193107
+       epatch "${FILESDIR}"/${P}-gnusource.patch # bug #158415
 
        # Now we deal with the silly rogue / xatrix addons ... this is ugly :/
        ln -s $(type -P echo) "${T}"/more
Comment 24 Flophouse Joe 2008-11-25 12:27:36 UTC
I submitted the original "-r2" ebuild, but I no longer have access to a Gentoo AMD64 system.  I'm afraid that it's necessary for someone else to test this, as I cannot.  (That having been said, the change I submitted today is all it took to get quake 2 working last time, if I remember correctly.)
Comment 25 Maciej Józiewicz 2008-11-27 00:30:04 UTC
Just played about 30 minutes and the issue seems resolved. (THANKS!)

I still don't have sound and the mouse is very (as in "unplayable") jerky when using OpenGL GLX (SDL OpenGL works fine although a bit slower). But these are different issues.

So it would be great if the patched ebuild could make it's way into the tree.
Comment 26 Hans Nieser 2009-01-11 21:27:49 UTC
Just tried the patch with updated ebuild on my amd64 system, this particular issue is now solved for me, thanks.
Comment 27 lumato 2010-01-03 16:26:10 UTC
*** Bug 298423 has been marked as a duplicate of this bug. ***
Comment 28 Adam Stylinski 2011-12-19 06:50:40 UTC
Wow, why hasn't this been committed yet?
Comment 29 Grzegorz {NineX} Krzystek 2012-03-21 06:47:56 UTC
Created attachment 306069 [details]
quake2-icculus-0.16.1-r4.ebuild

additional changes - remove arts support, add alsa support with patch from mandriva. now alsa works.
Comment 30 Grzegorz {NineX} Krzystek 2012-03-21 06:49:20 UTC
Created attachment 306071 [details]
quake2-icculus-0.16.1-alsa.patch

Patch for alsa.
rest of patches needed to corecly build you will found in current portage tree
Comment 31 Mr. Bones. (RETIRED) gentoo-dev 2012-03-21 07:13:08 UTC
BUILD_ARTS=$(yesno arts)

looks like it still uses the arts use flag?
Comment 32 Grzegorz {NineX} Krzystek 2012-03-21 07:28:04 UTC
Created attachment 306077 [details]
quake2-icculus-0.16.1-r4.ebuild

arts removal
Comment 33 Tupone Alfredo gentoo-dev 2012-04-01 17:08:54 UTC
Patch applied. Thanks.