Generic build scripts

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Mahler
Posts: 24
Joined: Sun Apr 03, 2022 7:46 pm

Re: Generic build scripts

Post by Mahler »

New install script for Ubuntu 20.04 is normally working. Thanks. Additionally, I have installed several -dev libraries to run the compilation.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

I tested the ubuntu-20.04 script on ubuntu-22.04 (jammy) for building freeciv-3.0.1, and everything seems to work. So Jammy users can use that for now.

Unfortunately it turned out that the nightly tarballs ( http://forum.freeciv.org/f/viewtopic.php?f=14&t=92225 ) cannot currently be built with these scripts (name of the file does not match what the scripts expect ). That's something to improve in coming versions.

For ubuntu-22.04 (at least) I'll try to make a version capable of building freeciv-3.1 before alpha3 tarball becomes available.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

Ubuntu-22.04 (Jammy) version now available: http://files.freeciv.org/tools/freeciv- ... tu22.04.sh
cazfi wrote:Unfortunately it turned out that the nightly tarballs ( http://forum.freeciv.org/f/viewtopic.php?f=14&t=92225 ) cannot currently be built with these scripts (name of the file does not match what the scripts expect ). That's something to improve in coming versions.
This ubuntu-22.04 script can use those. It's a bit hacky, though, so one needs to include the commit hash, same as in the filename, as part of the version number parameter.
E.g., to build gtk3.22 client from the freeciv-3.0 tarball of last night:

Code: Select all

./freeciv-ubuntu22.04.sh "3.0.1+-bbaba456e7" gtk3.22 "" "http://files.freeciv.org/nightly/S3_0/tarballs/freeciv-3.0.1+-bbaba456e7.tar.xz"
cazfi wrote:For ubuntu-22.04 (at least) I'll try to make a version capable of building freeciv-3.1 before alpha3 tarball becomes available.
Yes, it's able to build freeciv-3.1. When it does, it uses Qt6, so the script is not suitable for older ubuntu versions with no Qt6.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

Updated the ubuntu-20.04 script to version 1.02. https://files.freeciv.org/tools/freeciv ... tu20.04.sh

- Made it capable of building from nightly source tarballs. E.g. to build freeciv-3.0 gtk3.22-client from last night's tarball

Code: Select all

$ ./freeciv-ubuntu20.04.sh 3.0.3+-6a9abc5b82 gtk3.22 "" https://files.freeciv.org/nightly/S3_0/tarballs/freeciv-3.0.3+-6a9abc5b82.tar.xz
- Added freeciv-3.1 support. Until there's any real releases available, one should be able to build from nightly tarballs, or alphas. E.g. alpha4 Qt-client:

Code: Select all

$ ./freeciv-ubuntu20.04.sh 3.1.0-alpha4 qt "" https://files.freeciv.org/packages/windows/testing/cazfi/tarballs/alphas/S3_1-alpha4/freeciv-3.1.0-alpha4.tar.xz
When "qt" gui is requested, Qt5-client is built even from freeciv-3.1 sources, as Ubuntu-20.04 does not have Qt6.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

Updated ubuntu-22.04 (Jammy) version to 1.01: https://files.freeciv.org/tools/freeciv ... tu22.04.sh

- Added gtk4-client support (freeciv-3.1 and later) Gtk4-client is still far from ready.
- Fixed some errors with the parameter checking (e.g. it was accepting 'gtk2' as a possible gui on freeciv-3.1)
- Fixed installing dependencies (it tried to install Qt5 development package by a wrong name)
Mahler
Posts: 24
Joined: Sun Apr 03, 2022 7:46 pm

Re: Generic build scripts

Post by Mahler »

I have compiled 3.0.7 with gtk3.22 client. In the beginning there has been the message about absence of Qt5-dev library. I have ignored it, and the compilation is successful. There is no need in the Qt library in the GTK client.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

These scripts are now moving to git repo: https://github.com/freeciv/freeciv-envi ... ildscripts
drgerg
Veteran
Posts: 58
Joined: Sun Nov 15, 2015 4:05 pm

Re: Generic build scripts

Post by drgerg »

having trouble with ubuntu script I downloaded from the new location while running it on raspian (a Pi model 4 w8Gb ram and a real 500gb SSD )
I've gotten past a libcurl issue during the configuation check, I had to install via add/remove software "libcurl4-openssl-dev-7.74.0-1.3+deb11u7(64bi8)"
Likewise, I installed two packages to get past the configuration check, (dunno if both were needed): "icu-dev-tools-67.1-7 (64-bit) and "libicu-dev-67.1.7 (64-bit)"
However, I have no idea what I'm missing for either qt5 or gtk3.22 options, there's so many files available.
Right now I'm stuck with this error message:
checking Qt5 headers... not found
configure: error: selected client 'qt' cannot be built: Missing Qt5 development files
Configure failed
found and attached config.log for review. I"m seeing error messages in it, but don't understand what it is trying to tell me.
Thanks in advance.
Attachments
config.log
(126.3 KiB) Downloaded 244 times
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Generic build scripts

Post by cazfi »

drgerg wrote: Sun Jun 18, 2023 5:04 pmHowever, I have no idea what I'm missing for either qt5 or gtk3.22 options, there's so many files available.
You may want to attach log from gtk3.22-client build attempt too. It's likely to be easier to solve than the Qt5-client one.
drgerg wrote:
checking Qt5 headers... not found
configure: error: selected client 'qt' cannot be built: Missing Qt5 development files
Configure failed
found and attached config.log for review. I"m seeing error messages in it, but don't understand what it is trying to tell me.
It does multiple attempts to find "QApplication" header from various (standard) locations, but does not find it.

On Debian system, that header comes in "qtbase5-dev"

If you have that header somehow installed to your system, but in a location that we don't currently support out-of-the-box (in that case: please tell where it lives, so we may add the support), you will need to add configure option "--with-qt5-includes=<path to Qt5 headers root>"
drgerg
Veteran
Posts: 58
Joined: Sun Nov 15, 2015 4:05 pm

Re: Generic build scripts

Post by drgerg »

On Debian system, that header comes in "qtbase5-dev"
.
I added "qtbase5-dev-tools-5.15.2+dfsg-9" via Add/Remove software, and now it is compiling.
Thanks a bundle
Will upload GTK config.log file shortly.
Post Reply