Package Details: vpcs 0.8-5

Git Clone URL: https://aur.archlinux.org/vpcs.git (read-only, click to copy)
Package Base: vpcs
Description: Simple virtual PC simulator
Upstream URL: http://sourceforge.net/projects/vpcs/
Keywords: gns3 vpcs
Licenses: BSD
Submitter: FillFeile
Maintainer: FillFeile
Last Packager: FillFeile
Votes: 26
Popularity: 0.074722
First Submitted: 2015-08-17 18:37
Last Updated: 2020-06-20 15:50

Latest Comments

1 2 Next › Last »

FillFeile commented on 2020-06-20 15:53

I just added the patches provided by Un1Gfn as workaround until his work finds a ways into a upstream release. The package should build again now.

Thanks a lot Darren for helping on this and making the package even better!

Un1Gfn commented on 2020-06-19 07:08

In short: https://github.com/GNS3/vpcs/issues/23#issuecomment-646475617

Apply this

diff --git a/.SRCINFO b/.SRCINFO
index 5743db7..f9ec4a2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Tue Nov 21 19:35:08 UTC 2017
 pkgbase = vpcs
    pkgdesc = Simple virtual PC simulator
    pkgver = 0.8
-   pkgrel = 4
+   pkgrel = 5
    url = http://sourceforge.net/projects/vpcs/
    arch = i686
    arch = x86_64
@@ -11,7 +9,9 @@ pkgbase = vpcs
    makedepends = make
    makedepends = gcc
    makedepends = git
-   source = https://github.com/GNS3/vpcs/archive/v0.8beta1.tar.gz
+   source = getopts.patch
+   source = vpcs-0.8beta1.tar.gz::https://github.com/GNS3/vpcs/archive/v0.8beta1.tar.gz
+   md5sums = d92bcb182656dc965d353ac276161c10
    md5sums = c02fa7181e6a66403318b3680368ae53

 pkgname = vpcs
diff --git a/PKGBUILD b/PKGBUILD
index aebe0e8..b9153db 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,28 @@
 # Maintainer: Daniel Haß <aur@hass.onl>
+# Contributor: Darren Ng <$(base64 --decode <<<'ZGFycmVuMTk5NzA4MTBAZ21haWwuY29tCg==')>
+
 pkgname=vpcs
 pkgver=0.8
-pkgrel=4
+pkgrel=5
 pkgdesc="Simple virtual PC simulator"
 arch=('i686' 'x86_64')
 url="http://sourceforge.net/projects/vpcs/"
 license=('BSD')
 makedepends=('make' 'gcc' 'git')
-source=("https://github.com/GNS3/${pkgname}/archive/v${pkgver}beta1.tar.gz")
-md5sums=('c02fa7181e6a66403318b3680368ae53')
+source=("getopts.patch"
+        "vpcs-${pkgver}beta1.tar.gz::https://github.com/GNS3/${pkgname}/archive/v${pkgver}beta1.tar.gz")
+md5sums=('d92bcb182656dc965d353ac276161c10'
+         'c02fa7181e6a66403318b3680368ae53')

 prepare(){
-   patch -p1 -d "${srcdir}/${pkgname}-${pkgver}beta1/" < "${startdir}/getopts.patch"
+   patch -p1 -d "${srcdir}/${pkgname}-${pkgver}beta1/" < "${srcdir}/getopts.patch"
    cat "${srcdir}/${pkgname}-${pkgver}beta1/src/getopt.h" 
+
+   cd "${srcdir}/${pkgname}-${pkgver}beta1/src"
+   sed -i vpcs.h -e 's#pcs vpc\[MAX_NUM_PTHS\];#extern pcs vpc\[MAX_NUM_PTHS\];#g'
+   sed -i vpcs.c -e '/^static const char \*ident/a \\npcs vpc[MAX_NUM_PTHS];'
+   # https://fabianlee.org/2018/10/28/linux-using-sed-to-insert-lines-before-or-after-a-match/
+
 }

 build(){
@@ -24,4 +34,7 @@ build(){
 package() {
    mkdir -p "$pkgdir/usr/bin"
    install -Dm755 "${srcdir}/${pkgname}-${pkgver}beta1/src/${pkgname}" ${pkgdir}/usr/bin/${pkgname}  
+   install -Dvm644 "${srcdir}/${pkgname}-${pkgver}beta1/COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+   install -dm755 "$pkgdir/usr/share/man/man1/"
+   gzip "${srcdir}/${pkgname}-${pkgver}beta1/man/vpcs.1" -cv --best > "$pkgdir/usr/share/man/man1/vpcs.1.gz"
 }

FillFeile commented on 2020-06-18 16:54

Dear Un1Gfn, thanks for reporting this issue. It looks like we need a fix for this on the upstream. There is already an issue on the GNS3/vpcs GitHub repo open for this problem:

https://github.com/GNS3/vpcs/issues/23

I also added a comment there. Maybe you would like to bump this also?

Un1Gfn commented on 2020-06-18 02:27

Sorry but

gcc -O2 -m64  -DLinux -Di386 -DHV -Wall -I. -DTAP -c hv.c
gcc -O2 -m64  -DLinux -Di386 -DHV -Wall -I. -DTAP -c frag.c
gcc -O2 -m64  -DLinux -Di386 -DHV -Wall -I. -DTAP -c frag6.c
gcc -O2 -m64 vpcs.o daemon.o readline.o packets.o utils.o queue.o command.o dev.o dhcp.o command6.o packets6.o ip.o tcp.o inet6.o dns.o remote.o help.o dump.o relay.o hv.o frag.o frag6.o -o vpcs -lpthread -lutil -s -static
/usr/bin/ld: packets.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: command.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: dev.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: dhcp.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: command6.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: packets6.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: tcp.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: dns.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: dump.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: relay.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: frag6.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile.linux:35: vpcs] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

FillFeile commented on 2017-11-21 19:39

Hey Artyom,
thank you for your line of code. I added a patch to the PKGBUILD that replaces line 53 with your code. Now the compilation works again.

Artyom commented on 2017-11-20 14:55

FillFeile, you must edit getopt.h located in /vpcs/src/ at line 53:
Replace "int getopt(int argc,char** argv,char* optstr);"
By "int getopt(int argc,char *const *argv,const char *optstr);"
Now the compilation should work.
For GNS3 users, set the VPCS executable to location to the file "vpcs" created from the compilation.

FillFeile commented on 2017-11-05 20:51

Hi Time0o, thanks for pointing this out. I was able to reproduce your error. As I'm not a great C developer, could you provide me with a simple patch file for fixing this? I would add it afterwards to the package.

Time0o commented on 2017-11-01 00:14

This fails to compile for me out of the box as of now because of conflicting function declarations in getopt.h and /usr/include/bits/getopt_core.h. This can be easily fixed by just adding some 'const's to to the declaration in getopt.h.

FillFeile commented on 2016-03-24 18:10

Changed to source tarball from github GNS3 repo. Not downloading binary file anymore. Building package from source now.

FillFeile commented on 2016-03-23 13:39

Hi Cravix, thank you for reporting and sharing your solution. I can reproduce the issue and will fix the PKBGUILD till the end of this week. Cheers, FillFeile.