Page 1 of 1

Compiling latest svn in Arch linux

Posted: Fri Feb 10, 2012 9:13 pm
by pouar

Can't get the latest svn to compile on Arch Linux, any help

my PKGBUILD file is this

Code: Select all

pkgname=vba-m-gtk
pkgver=1090
pkgrel=1
pkgdesc="Gameboy Advance Emulator combining features of all VBA forks - GTK GUI"
arch=(i686 x86_64)
url="http://vba-m.ngemu.com"
license=('GPL')
groups=()
depends=('gtkmm' 'sdl' 'glibmm' 'libpng' 'zlib' 'cairo' 'mesa' 'gtkglext' 'gtkglextmm' 'libxv' 'hicolor-icon-theme' 'ffmpeg')
makedepends=('cmake' 'pkgconfig' 'nasm' 'subversion')
install='vba-m-gtk.install'

_svntrunk=https://vbam.svn.sourceforge.net/svnroot/vbam/trunk
_svnmod=vbam
_svndep=https://vbam.svn.sourceforge.net/svnroot/vbam/dependencies

build() {
cd ${srcdir}

if [ -d $_svnmod/.svn ]; then
	(cd $_svnmod && svn up -r $pkgver)
else
	svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
svn co $_svndep --config-dir ./
fi

msg "Source acquired or request timed out."
msg "Starting make..."

cp -r $_svnmod $_svnmod-build
cd $_svnmod-build

cmake . -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fpermissive" -DCMAKE_INSTALL_PREFIX=/usr -DDATA_INSTALL_DIR :P ATH=share/vbam/gtk -DENABLE_WX=OFF
make
}

package() {
cd $_svnmod-build
make DESTDIR=${pkgdir} install
rm -rf ${srcdir}/$_svnmod-build
}

the vba-m-gtk.install file is

Code: Select all

post_install() {
       update-desktop-database -q
       gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}

post_upgrade() {
       post_install
}

post_remove() {
       post_install
}

I get the following error output

Code: Select all

In file included from /home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBAinline.h:10:0,
                from /home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/bios.cpp:7:
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:64:37: error: ‘IPAddress’ in namespace ‘sf’ does not name a type
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:64:52: warning: ISO C++ forbids declaration of ‘addr’ with no type [-fpermissive]
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:87:2: error: ‘Selector’ in namespace ‘sf’ does not name a type
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:98:2: error: ‘SocketTCP’ in namespace ‘sf’ does not name a type
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:99:2: error: ‘IPAddress’ in namespace ‘sf’ does not name a type
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:108:37: error: ‘IPAddress’ in namespace ‘sf’ does not name a type
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:108:52: warning: ISO C++ forbids declaration of ‘addr’ with no type [-fpermissive]
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:115:2: error: ‘Selector’ in namespace ‘sf’ does not name a type
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:124:2: error: ‘IPAddress’ in namespace ‘sf’ does not name a type
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:126:2: error: ‘SocketTCP’ in namespace ‘sf’ does not name a type
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:129:16: error: ‘sf::IPAddress’ has not been declared
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:136:2: error: ‘SocketTCP’ in namespace ‘sf’ does not name a type
/home/pouar/Downloads/vba-m-gtk/src/vbam-build/src/gba/GBALink.h:151:8: error: ‘IPAddress’ in namespace ‘sf’ does not name a type
make[2]: *** [CMakeFiles/vbamcore.dir/src/gba/bios.cpp.o] Error 1
make[1]: *** [CMakeFiles/vbamcore.dir/all] Error 2
make: *** [all] Error 2

Compiling latest svn in Arch linux

Posted: Sat Feb 11, 2012 12:32 am
by Squall Leonhart

you are missing the sfml headers.


Compiling latest svn in Arch linux

Posted: Sat Feb 11, 2012 12:38 pm
by pouar

tried adding it using pkg-config, didn't work. also I though SFML was covered by CMakeLists.txt, or it least it should be. I never worked with cmake before, the PKGBUILD was from the AUR

Code: Select all

cmake . -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fpermissive `pkg-config --libs SFML`" -DCMAKE_CXX_FLAGS="`pkg-config --cflags SFML`  -fpermissive" -DCMAKE_INSTALL_PREFIX=/usr -DDATA_INSTALL_DIR :P ATH=share/vbam/gtk -DENABLE_WX=OFF

 


Compiling latest svn in Arch linux

Posted: Sat Feb 11, 2012 1:07 pm
by Squall Leonhart

[05:03] we should properly resolve it by using the network capabilities of GLib instead of SFML for the GTK port, but for now, that guy should add SFML as a dependency to his PKGBUILD, yes


Compiling latest svn in Arch linux

Posted: Sat Feb 11, 2012 1:14 pm
by pouar

adding it as a dependency didn't help, plus SFML was already installed on my Computer. I have no idea how to add those headers to the program manually. tried adding sfml.pc to /usr/lib/pkgconfig but couldn't get it to work

Code: Select all

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include


Name: SFML
Description: SFML (${target} target)
Version: 1.99
Requires: openal xrandr sndfile glew glewmx freetype2
Libs: -L${libdir} -llibsfml-audio.so 
Cflags: -I${includedir}/SFML

Compiling latest svn in Arch linux

Posted: Sun Feb 12, 2012 8:11 pm
by pouar

found the problem. the Arch Linux repositories use SFML 1.99-git not SFML 1.6, the two have many incompatibilities. I just used SFML 1.6 instead and it worked... wait it only just compiled. it didn't actually run. guess I have to turn off linking for now just to get it to run.


Compiling latest svn in Arch linux

Posted: Mon Feb 13, 2012 1:59 am
by Squall Leonhart

it does work with linking enabled, BGKA made sure of it.

linking was required to be enabled for sonic advance 1/2 to work.


Compiling latest svn in Arch linux

Posted: Wed Feb 15, 2012 7:05 am
by ZachBacon

I've managed multiple times to get vba-m compiled on archlinux, as soon as I get a new monitor I'll see about setting up an aur package myself or at least an example pkgbuild script for you. At the moment I'm a little limited to what I can do with a cell phone.