Back to the Vavoom Forum Archives


[Fixed] [1.21]Gentoo Linux:compile error (Segmentation Viola

Tue, 11 Jul 2006 22:02:22


I'm trying to compile vavoom-1.21 on Gentoo Linux, with an updated ebuild (version 1.20 is here) With standard configuration, compilation breaks with following errors:
make[1]: Leaving directory `/var/tmp/portage/vavoom-1.21/work/vavoom-1.21/utils/glbsp'
x86_64-pc-linux-gnu-g++ -s -o vavoom.x86_64 obj/am_map.o obj/args.o obj/chat.o obj/cheats.o obj/cl_demo.o obj/cl_input.o obj/cl_main.o obj/cl_parse.o obj/cl_poly.o obj/cl_trace.o obj/cmd.o obj/console.o obj/crc.o obj/cvar.o obj/d_aclip.o obj/d_alias.o obj/d_data.o obj/d_draw.o obj/d_edge.o obj/d_main.o obj/d_part.o obj/d_polyse.o obj/d_scache.o obj/d_span.o obj/d_sprite.o obj/d_surf.o obj/d_tex.o obj/d_aclipa.o obj/d_aliasa.o obj/d_edgea.o obj/d_polysa.o obj/d_varsa.o obj/d_zspan.o obj/d8_part.o obj/d8_poly.o obj/d8_s16.o obj/d8_span.o obj/d8_spr.o obj/d8_surf.o obj/d16_part.o obj/d16_poly.o obj/d16_s16.o obj/d16_span.o obj/d16_spr.o obj/d16_surf.o obj/d32_part.o obj/d32_poly.o obj/d32_s16.o obj/d32_span.o obj/d32_spr.o obj/d32_surf.o obj/debug.o obj/finale.o obj/files.o obj/host.o obj/iline.o obj/imission.o obj/in_input.o obj/infostr.o obj/l_glbsp.o obj/l_glvis.o obj/level.o obj/mapinfo.o obj/maths.o obj/menu.o obj/message.o obj/misc.o obj/name.o obj/net_dgrm.o obj/net_loop.o obj/net_main.o obj/net_null.o obj/p_setup.o obj/p_thinker.o obj/pr_cmds.o obj/pr_exec.o obj/r_bsp.o obj/r_light.o obj/r_main.o obj/r_model.o obj/r_sky.o obj/r_surf.o obj/r_tex.o obj/r_things.o obj/s_data.o obj/s_eaxutl.o obj/s_qmus2mid.o obj/s_sound.o obj/s_tmidty.o obj/s_wav.o obj/sbar.o obj/sc_man.o obj/screen.o obj/sn_sonix.o obj/str.o obj/stream.o obj/sv_acs.o obj/sv_ent.o obj/sv_main.o obj/sv_poly.o obj/sv_save.o obj/sv_sight.o obj/sv_swtch.o obj/sv_tick.o obj/sv_user.o obj/sv_world.o obj/text.o obj/ui_gc.o obj/ui_modal.o obj/ui_root.o obj/ui_win.o obj/vclass.o obj/vobject.o obj/wad.o obj/zone.o obj/d_sdl.o obj/in_sdl.o obj/net_udp.o obj/s_sdl.o obj/s_sdlm.o obj/sys_i386.o obj/sys_sdl.o obj/cd_linux.o obj/gl_draw.o obj/gl_main.o obj/gl_poly.o obj/gl_tex.o obj/gl_sdl.o obj/s_vorbis.o obj/s_mp3.o source/timidity/libtimidity.a utils/glvis/libglvis.a utils/glbsp/libglbsp.a -lmad -lvorbis -logg -lpng -lGL -lSDL_mixer -lSDL -lpthread -lz
echo "#!/bin/sh" > utils/vavoom
echo "# Needed to make symlinks/shortcuts work." >> utils/vavoom
echo "# the binaries must run with correct working directory" >> utils/vavoom
echo "cd \"/usr/share/games/vavoom\"" >> utils/vavoom
echo "\"/usr/games/bin/vavoom.x86_64\" \$* -iwaddir yes" >> utils/vavoom
echo "exit \$?" >> utils/vavoom
make VCC=../../utils/bin/vcc OUTDIR=../../basev/common/progs -C progs/common
make[1]: Entering directory `/var/tmp/portage/vavoom-1.21/work/vavoom-1.21/progs/common'
../../utils/bin/vcc -P../../basev/common/progs ./ ../../basev/common/progs/common.dat
(external):0: Segmentation Violation
make[1]: *** [../../basev/common/progs/common.dat] Error 1
make[1]: Leaving directory `/var/tmp/portage/vavoom-1.21/work/vavoom-1.21/progs/common'
make: *** [progs] Error 2

!!! ERROR: games-fps/vavoom-1.21 failed.
Call stack:, line 1539:   Called dyn_compile, line 939:   Called src_compile
  vavoom-1.21.ebuild, line 69:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! This ebuild is from an overlay: '/usr/local/portage'
To avoid this issue, i' must disable "sandbox" FEATURE Is there any workaround to clear this error? P.S. Obviously, i ran into this error with SVN code, before 1.21 release <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
Wed, 12 Jul 2006 18:29:21

Janis Legzdinsh

Do you mean that released version works fine?
Wed, 12 Jul 2006 18:54:09


Ooops... i miss some word <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P -->
P.S. Obviously, i ran into this error ALSO with SVN code, before 1.21 release
The Segmentation Violation error occurs with 1.21 version (tested yesterday) and with SVN code (tested 1-2 week ago), that is the same in 1.21 version, i guess.
Mon, 17 Jul 2006 10:45:04

Janis Legzdinsh

I just tried to build 1.21 and it built it without problems (I took vavoom-9999.ebuild, renamed it to vavoom-1.21.ebuild and commented out line that was applying the patch).
Tue, 18 Jul 2006 22:06:04


The problem seems to be in the last part of compilation process, regarding vcc execution. This is my ebuild (i haven't yet updated the bug in Gentoo Bugzilla)
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit games eutils flag-o-matic multilib

DESCRIPTION="Vavoom is a source port based on sources of Doom, Heretic, Hexen and a little bit from Quake."

KEYWORDS="~x86 ~amd64"
IUSE="debug opengl openal external-glbsp vorbis mad mikmod flac dedicated"

                opengl? ( virtual/opengl )
                openal? ( media-libs/openal )
                external-glbsp? ( games-util/glbsp )
                vorbis? ( media-libs/libvorbis )
                mad? ( media-libs/libmad )
                mikmod? ( media-libs/libmikmod )
                flac? ( media-libs/flac )"

pkg_setup() {

        if use opengl ; then
                if ! built_with_use media-libs/libsdl opengl ; then
                        eerror "'opengl' USE flag enabled, but libsdl without opengl support
                        eerror "Recompile media-libs/libsdl with opengl USE flag enabled"
                        die "libsdl without opengl detected"



src_unpack() {
                unpack ${A} || die "unpack failed"
                #cd "${S}"
                #epatch "${FILESDIR}/vavoom-glvis-linux.diff"

src_compile() {
        if use debug ; then
                append-flags -g

        egamesconf \
                --with-sdl \
                -with-iwaddir ${GAMES_DATADIR}/${PN} \
                $(use_with opengl) \
                $(use_with openal) \
                $(use_with external-glbsp) \
                $(use_with vorbis) \
                $(use_with mad libmad) \
                $(use_with mikmod) \
                $(use_with flac) \
                $(use_enable dedicated server) || die "configure failed"

        # Parallel compiling seems to be broekn
        emake -j1 || die "emake failed"

src_install() {

        make DESTDIR=${D} install

        dodoc docs/*.txt


pkg_postinst() {
        einfo "Copy WAD files in ${GAMES_DATADIR}/${PN} with correct permissions:"
        einfo "Example: (run as root) chmod 640 doom.wad && chgrp games doom.wad"
        einfo "Example command line:"
        einfo "  vavoom -doom -opengl -window"
        einfo "See documentation for further details"
naming it vavoom-1.21.1.ebuild (for using latest release) My emerge FEATURES is
# emerge --info | grep FEATURES
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
# emerge --info | grep CFLAGS
CFLAGS="-march=k8 -Os -pipe"
If i disable "sandbox" FEATURE the compilation runs fine
Thu, 20 Jul 2006 11:02:44

Janis Legzdinsh

Seams to be amd64 specific issue. Here's a patch that fixes this:
diff -ruNp vavoom-1.21/utils/vcc/vcpp/cpp.h vavoom-1.21-new/utils/vcc/vcpp/cpp.h
--- vavoom-1.21/utils/vcc/vcpp/cpp.h	2006-07-06 20:19:49.000000000 +0300
+++ vavoom-1.21-new/utils/vcc/vcpp/cpp.h	2006-07-20 13:41:58.000000000 +0300
@@ -155,7 +155,7 @@ extern	size_t output_size;
 extern "C" {
 extern int creat(char *, int);
-extern int open(char *, int);
+extern int open(char *, int, ...);
 extern int close(int);
 extern int dup2(int, int);
 extern int write(int, const void *, size_t);
Thu, 20 Jul 2006 12:02:27


Janis... you rule <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> I'll insert the patch in the ebuild as soon as possible! Thanks a lot! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Sun, 23 Jul 2006 15:46:37


Ok, the patch fixes perfectly the error. Close the bug if you want, Janis! <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->

Back to the Vavoom Forum Archives