Building vcmi develop on Debian testing - daily builds for linux

Hello everybody, how are you doing?

As there is no download for Linux https://builds.vcmi.download/branch/develop/ ,
I thought I would contribute research to make that possible. :grinning:
I am trying to build vcmi develop on Debian bullseye in CI, as you can see here:

Is there any willingness on your part to host daily builds for linux, too? (You can get the CI for free on gitlab…)

Also if you guys were to just tag a 0.99.1 release we could have an up-to-date version of vcmi in debian. It looks like they rather ship versioned releases, so the latest you can get on debian is now 4 years old and not compatible with current addons anymore.

Thanks everybody for this great project, and have a nice day.

We have daily builds for Ubuntu (https://launchpad.net/~vcmi/+archive/ubuntu/ppa)
I guess Debian builds will be welcome!
(but I’m only player not VCMI dev.) Devs are rather silent last monts :frowning:

Yeah but the daily builds are for older versions of ubuntu, which makes it impossible to install their dependecies from the repositories on a recent debian/ubuntu system.
For the ubuntu builds, that is easy to fix, as travis-ci also supports Ubuntu 20.04.

Using Ubuntu 20.04 (Focal Fossa) #

To route your builds to Ubuntu 20.04 LTS, Focal, add the following to your .travis.yml :

dist: focal

For travis there is also https://travis.debian.net/, which would enable building debian packages.

Anyway, the my build (https://gitlab.com/elk_aide/vcmi/-/jobs/768009897/)on gitlabs ci passed, so feasablity is proven, I guess. :grinning:
vcmi_0.99_amd64.7z (4.9 MB)
.yml file for reference here: https://gitlab.com/elk_aide/vcmi/-/blob/develop/.gitlab-ci.yml

But in the end, I think one very good thing would be to tag a 0.99.1 release so that the packagers of the distros themselves will ship recent a vcmi.

So it looks like the linux build finishes, but does not yield a functional package. When trying to run whats installed you get this error.

$ vcmiclient
vcmiclient: error while loading shared libraries: libvcmi.so: cannot open shared object file: No such file or directory
$ vcmilauncher
vcmilauncher: error while loading shared libraries: libvcmi.so: cannot open shared object file: No such file or directory

I had noticed error messages during dpkg-buildpackage before.

dh_shlibdeps dh_shlibdeps: warning: Compatibility levels before 10 are deprecated (level 9 in use) dpkg-shlibdeps: warning: cannot find library libvcmi.so needed by debian/vcmi/usr/games/vcmiserver (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '') dpkg-shlibdeps: warning: cannot find library libvcmi.so needed by debian/vcmi/usr/games/vcmilauncher (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '') dpkg-shlibdeps: warning: cannot find library libvcmi.so needed by debian/vcmi/usr/lib/x86_64-linux-gnu/vcmi/AI/libVCAI.so (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '') dpkg-shlibdeps: warning: cannot find library libvcmi.so needed by debian/vcmi/usr/lib/x86_64-linux-gnu/vcmi/AI/libBattleAI.so (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '') dpkg-shlibdeps: warning: cannot find library libvcmi.so needed by debian/vcmi/usr/lib/x86_64-linux-gnu/vcmi/AI/libEmptyAI.so (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '') dpkg-shlibdeps: warning: cannot find library libvcmi.so needed by debian/vcmi/usr/lib/x86_64-linux-gnu/vcmi/AI/libStupidAI.so (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '') dpkg-shlibdeps: warning: cannot find library libvcmi.so needed by debian/vcmi/usr/games/vcmiclient (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')

This is weird because there is a libvcmi.so file in /./usr/lib/x86_64-linux-gnu/vcmi/ of the package.
What is going on there?

As was pointed out before we have PPA which is preferable way to distribute DEB builds. Also TBH hosting builds on our own server is obviously suboptimal way and it’s would be far better to just switch it to GitHub releases.

It’s long standing issue since while I personally developed VCMI on Linux I never had time to fix linking properly. I guess it’s better to check current build configuration and patches for VCMI in actual Debian package:

Debian maintainer @josch did a great work on making it work properly.

1 Like

So the packages in the ppa don’t work either at the moment?

Thanks for this. I don’t really know how to read a debian build configuration, but I’ll try to figure it out.

So is there a chance for a minor 0.99.1 release, just so there is a more recent tag for packagers to build against?
I assume you don’t feel like incrementing to 1.x, but just tagging a minor release might make it clear, that there has been 4 years of work since…

So, I built the game with josch’s debian/rules file and all works now!

# override disabled by default rpath - we need to find libvcmi.so with it:
override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \
		-DCMAKE_INSTALL_RPATH=/usr/lib/$(DEB_HOST_MULTIARCH)/vcmi \
		-DBIN_DIR=games \
		-DFORCE_BUNDLED_FL=OFF

That’s the fix!

edit:
ci here (.deb file download): https://gitlab.com/elk_aide/vcmi/-/jobs/770238209
debin/rules file here: https://gitlab.com/elk_aide/vcmi/-/blob/develop/debian/rules

edit: the links above point to outdated files, but a fix is now commited in our source tree.

I would like to ask the same question. @elk_aide contacted me to update the vcmi package in Debian. The current version in Debian is an arbitrary git commit from 4 years ago. I could package the current git HEAD again, but it would help to either create a tag or maybe you can tell me a commit that you say is in a reasonable stable state so that I can package it for Debian? Thanks!

1 Like

Hosting provided by DigitalOcean