You are not logged in.

#1 2010-05-28 16:08:39

insane_alien
Member
Registered: 2007-11-19
Posts: 39

Vegastrike will not compile.

I have been trying to install vegastrike for a  while now but i cannot figure out why it keeps failing.

it starts off like any AUR build until this error crops up

In file included from /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/ext/hash_map:60:0,
                 from ./src/gnuhash.h:21,
                 from ./src/hashtable.h:25,
                 from ./src/xml_support.h:9,
                 from ./src/configxml.h:31,
                 from ./src/networking/lowlevel/vsnet_clientstate.h:28,
                 from ./src/networking/lowlevel/netbuffer.h:9,
                 from src/networking/lowlevel/netbuffer.cpp:2:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/backward/backward_warning.h:28:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
In file included from ./src/easydom.h:35:0,
                 from ./src/configxml.h:32,
                 from ./src/networking/lowlevel/vsnet_clientstate.h:28,
                 from ./src/networking/lowlevel/netbuffer.h:9,
                 from src/networking/lowlevel/netbuffer.cpp:2:
./src/vsfilesystem.h: In constructor 'VSFileSystem::VSFile::VSFile(const std::string&, VSFileSystem::VSFileType)':
./src/vsfilesystem.h:297:105: error: cannot call constructor 'VSFileSystem::VSFile::VSFile' directly
./src/vsfilesystem.h:297:105: error:   for a function-style cast, remove the redundant '::VSFile'
make[1]: *** [src/networking/lowlevel/netbuffer.o] Error 1
make[1]: Leaving directory `/tmp/yaourt-tmp-stephen/aur-vegastrike/vegastrike/src/vegastrike-source-0.5.0'
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...
Error: Makepkg was unable to build vegastrike package.

i took this to mean that there was an extra ::VSFile in the source and i ent to see if i could find it, but there is no duplicate in the header file.

not really sure what else to do. help much appreciated, cheers.

Offline

#2 2010-05-29 13:25:18

yannsen
Member
From: Germany
Registered: 2010-05-03
Posts: 18

Re: Vegastrike will not compile.

Here, works for me...

http://rapidshare.com/files/392914870/v … src.tar.gz

PKGBUILD

# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>

pkgname=vegastrike
pkgver=0.5.0
pkgrel=5
pkgdesc="An Open Source 3D Action-Space-Sim allowing players to trade and bounty hunt in a vast universe."
arch=('i686' 'x86_64')
url="http://vegastrike.sourceforge.net/"
license=('GPL')
depends=('expat' 'ffmpeg' 'freeglut' 'gtk2' 'libjpeg' 'libpng' 'libxcb' 'libxmu' 'openal' 'python' 'sdl' 'xvidcore')
makedepends=('patch')
optdepends=('vegastrike-data: original dataset'
            'vegastrike-data-svn: original dataset, svn version'
            'paralleluniverse: revival of Privateer')
conflicts=('vegastrike-svn')
options=('!makeflags')
install=$pkgname.install
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-src-$pkgver.tar.bz2 \
        $pkgname-gcc44.diff vsfilesystem.h.patch libpng-1.4.patch)

md5sums=('8cfd7d1691173652e14fc89e4da97d1a'
         'efaea71b852eb2d4001f429c41bd5db2'
         '9e39b543409ffbbf9c25c9d949bd99c4'
         '64157b2e8d81c8e7d59297e3937564f7')

build() {
  cd ${srcdir}/$pkgname-source-$pkgver

  patch -Np2 -i ${srcdir}/vsfilesystem.h.patch || return 1
  patch -Np1 -i ${srcdir}/libpng-1.4.patch || return 1
  patch -Np1 -i ${srcdir}/$pkgname-gcc44.diff || return 1
  
  

  ./configure --prefix=/usr --with-data-dir=/usr/share/vegastrike
  make || return 1
  make DESTDIR=${pkgdir} install

#move objconv dir to right path and avoiding conflict with mysql's 'replace' file
  install -d ${pkgdir}/usr/share/$pkgname || return 1
  mv -f ${pkgdir}/usr/objconv ${pkgdir}/usr/share/$pkgname/objconv || return 1
  mv ${pkgdir}/usr/bin/replace ${pkgdir}/usr/bin/vsreplace || return 1
}

vsfilesystem.h.patch

--- src/vegastrike-source-0.5.0/src/vsfilesystem.h    2008-04-26 04:12:57.000000000 +0200
+++ vsfilesystem.h    2010-05-29 14:19:25.211586712 +0200
@@ -294,7 +294,7 @@
             VSFile();
             VSFile( const char * buffer, long size, VSFileType type=ZoneBuffer, VSFileMode=ReadOnly);
             VSFile( const char * filename, VSFileType type=UnknownFile, VSFileMode=ReadOnly);
-            VSFile( const string &filename, VSFileType type=UnknownFile) { VSFile::VSFile( filename.c_str(), type); }
+            VSFile( const string &filename, VSFileType type=UnknownFile) { VSFile( filename.c_str(), type); }
               ~VSFile();
 
             FILE *    GetFP() { return this->fp; } // This is still needed for special cases (when loading PNG files)

libpng-1.4.patch

diff -upr vegastrike-source-0.5.0-old//objconv/basemaker/base_maker_texture.cpp vegastrike-source-0.5.0//objconv/basemaker/base_maker_texture.cpp
--- vegastrike-source-0.5.0-old//objconv/basemaker/base_maker_texture.cpp    2010-05-29 14:54:05.075128227 +0200
+++ vegastrike-source-0.5.0//objconv/basemaker/base_maker_texture.cpp    2008-04-26 12:00:37.000000000 +0200
@@ -73,7 +73,7 @@ static inline bool readPng (FILE *fp, Te
         png_set_palette_to_rgb(png_ptr);
 
     if (ctype == PNG_COLOR_TYPE_GRAY && data->bpp < 8)
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
 
     png_set_expand (png_ptr);
     png_read_update_info (png_ptr,info_ptr);
diff -upr vegastrike-source-0.5.0-old//objconv/imageproc/alphaextender.cpp vegastrike-source-0.5.0//objconv/imageproc/alphaextender.cpp
--- vegastrike-source-0.5.0-old//objconv/imageproc/alphaextender.cpp    2010-05-29 14:56:59.021778037 +0200
+++ vegastrike-source-0.5.0//objconv/imageproc/alphaextender.cpp    2008-04-26 12:00:35.000000000 +0200
@@ -77,7 +77,7 @@ unsigned char *    ReadPNG(FILE * fp, unsig
         png_set_palette_to_rgb(png_ptr);
            
     if (img_color_type == PNG_COLOR_TYPE_GRAY && img_depth < 8)
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
 
     png_set_expand (png_ptr);
     png_read_update_info (png_ptr,info_ptr);
diff -upr vegastrike-source-0.5.0-old//objconv/imageproc/change_channels.cpp vegastrike-source-0.5.0//objconv/imageproc/change_channels.cpp
--- vegastrike-source-0.5.0-old//objconv/imageproc/change_channels.cpp    2010-05-29 14:56:30.898447657 +0200
+++ vegastrike-source-0.5.0//objconv/imageproc/change_channels.cpp    2008-04-26 12:00:35.000000000 +0200
@@ -85,7 +85,7 @@ unsigned char *    ReadPNG(FILE * fp, unsig
         png_set_palette_to_rgb(png_ptr);
            
     if (img_color_type == PNG_COLOR_TYPE_GRAY && img_depth < 8)
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
 
     png_set_expand (png_ptr);
     png_read_update_info (png_ptr,info_ptr);
diff -upr vegastrike-source-0.5.0-old//objconv/imageproc/mover.cpp vegastrike-source-0.5.0//objconv/imageproc/mover.cpp
--- vegastrike-source-0.5.0-old//objconv/imageproc/mover.cpp    2010-05-29 14:55:46.538035013 +0200
+++ vegastrike-source-0.5.0//objconv/imageproc/mover.cpp    2008-04-26 12:00:35.000000000 +0200
@@ -78,7 +78,7 @@ unsigned char *    ReadPNG(FILE * fp, unsig
         png_set_palette_to_rgb(png_ptr);
            
     if (img_color_type == PNG_COLOR_TYPE_GRAY && img_depth < 8)
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
 
     png_set_expand (png_ptr);
     png_read_update_info (png_ptr,info_ptr);
diff -upr vegastrike-source-0.5.0-old//objconv/imageproc/normalmap.cpp vegastrike-source-0.5.0//objconv/imageproc/normalmap.cpp
--- vegastrike-source-0.5.0-old//objconv/imageproc/normalmap.cpp    2010-05-29 14:56:09.935115859 +0200
+++ vegastrike-source-0.5.0//objconv/imageproc/normalmap.cpp    2008-04-26 12:00:35.000000000 +0200
@@ -77,7 +77,7 @@ unsigned char *    ReadPNG(FILE * fp, unsig
         png_set_palette_to_rgb(png_ptr);
            
     if (img_color_type == PNG_COLOR_TYPE_GRAY && img_depth < 8)
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
 
     png_set_expand (png_ptr);
     png_read_update_info (png_ptr,info_ptr);
diff -upr vegastrike-source-0.5.0-old//objconv/imageproc/shrinker.cpp vegastrike-source-0.5.0//objconv/imageproc/shrinker.cpp
--- vegastrike-source-0.5.0-old//objconv/imageproc/shrinker.cpp    2010-05-29 14:55:09.348038856 +0200
+++ vegastrike-source-0.5.0//objconv/imageproc/shrinker.cpp    2008-04-26 12:00:35.000000000 +0200
@@ -77,7 +77,7 @@ unsigned char *    ReadPNG(FILE * fp, unsig
         png_set_palette_to_rgb(png_ptr);
            
     if (img_color_type == PNG_COLOR_TYPE_GRAY && img_depth < 8)
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
 
     png_set_expand (png_ptr);
     png_read_update_info (png_ptr,info_ptr);
diff -upr vegastrike-source-0.5.0-old//objconv/imageproc/starremover.cpp vegastrike-source-0.5.0//objconv/imageproc/starremover.cpp
--- vegastrike-source-0.5.0-old//objconv/imageproc/starremover.cpp    2010-05-29 14:54:37.511375381 +0200
+++ vegastrike-source-0.5.0//objconv/imageproc/starremover.cpp    2008-04-26 12:00:35.000000000 +0200
@@ -77,7 +77,7 @@ unsigned char *    ReadPNG(FILE * fp, unsig
         png_set_palette_to_rgb(png_ptr);
            
     if (img_color_type == PNG_COLOR_TYPE_GRAY && img_depth < 8)
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
 
     png_set_expand (png_ptr);
     png_read_update_info (png_ptr,info_ptr);
diff -upr vegastrike-source-0.5.0-old//src/gfx/vsimage.cpp vegastrike-source-0.5.0//src/gfx/vsimage.cpp
--- vegastrike-source-0.5.0-old//src/gfx/vsimage.cpp    2010-05-29 14:57:36.965107728 +0200
+++ vegastrike-source-0.5.0//src/gfx/vsimage.cpp    2008-04-26 12:00:33.000000000 +0200
@@ -349,7 +349,7 @@ unsigned char *    VSImage::ReadPNG()
         png_set_palette_to_rgb(png_ptr);
            
     if (this->img_color_type == PNG_COLOR_TYPE_GRAY && this->img_depth < 8)
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
 
     png_set_expand (png_ptr);
     png_read_update_info (png_ptr,info_ptr);

Offline

#3 2010-05-29 14:00:50

insane_alien
Member
Registered: 2007-11-19
Posts: 39

Re: Vegastrike will not compile.

hmm, that pkgbuild is not the one that i see in the AUR. in the AUR the pkgbuild doesn't include the patch files.

EDIT: the pkgbuild you posted works great. thanks a lot.

Last edited by insane_alien (2010-05-29 14:28:09)

Offline

#4 2010-05-29 14:09:07

yannsen
Member
From: Germany
Registered: 2010-05-03
Posts: 18

Re: Vegastrike will not compile.

Yes you are right, I added these two patchtes to the PKGBUILD otherwise it is impossible to compile this package. :-)

Offline

#5 2010-07-06 10:28:00

zebulon
Member
Registered: 2008-10-20
Posts: 359

Re: Vegastrike will not compile.

It seems this is caused by the fact gcc-4.5.0 is stricter on C++ syntax.

Offline

Board footer

Powered by FluxBB