How to install the dependence on ubuntu(wsl)?

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderator: Forum Moderators

Post Reply
slarkkk
Posts: 3
Joined: February 15th, 2023, 8:35 am

How to install the dependence on ubuntu(wsl)?

Post by slarkkk »

I have executed below command:

Code: Select all

sudo apt-get install libvorbis-dev
sudo apt-get install libbz2-dev
sudo apt-get install libz-dev
sudo apt-get install libcrypto++-dev
But I complied failed.

Code: Select all

scons: Reading SConscript files ...
Saved options: default_targets = 'wesnoth,wesnothd'
Building Wesnoth version 1.17.12+dev
---[checking prerequisites]---
Checking for C header file sys/sendfile.h... (cached) yes
Checking for C function sendfile()... (cached) yes
Checking whether C++ compiler works (g++ version >= 7 required)... (cached) yes
Checking for Boost iostreams library version >= 1.66... (cached) yes
Checking for gzip support in Boost Iostreams... (cached) yes
Checking for bzip2 support in Boost Iostreams... (cached) yes
Checking for Boost program_options library version >= 1.66... (cached) yes
Checking for Boost random library version >= 1.66... (cached) yes
Checking for Boost smart_ptr library... (cached) yes
Checking for C library pthread... (cached) yes
Checking for Boost system library... (cached) yes
Checking for Boost asio library... (cached) yes
Checking for Boost context library... (cached) yes
Checking for Boost coroutine library... (cached) yes
Checking for Boost thread library... (cached) yes
Checking for Boost locale library... (cached) yes
Checking for Boost filesystem library... (cached) yes
INFO: Base prerequisites are met
Checking for available Boost Locale backends... (cached) icu,posix,std
Checking whether compiler has built-in -D_FORTIFY_SOURCE... (cached) no
Checking for C library libcrypto... (cached) no
Checking for C library ssl... (cached) no
Checking for Simple DirectMedia Layer library version >= 2.0.10... (cached) yes
Checking for SDL2_mixer library... (cached) no
Checking for SDL2_image library... (cached) no
Checking for C library vorbisfile... (cached) yes
Checking for audio support in SDL... (cached) no
Checking for PNG support in SDL... (cached) no
Checking for JPG support in SDL... (cached) no
Checking for WEBP support in SDL... (cached) no
Checking for Cairo... (cached) yes
Checking for Pango with cairo backend... (cached) yes
Checking for fontconfig... (cached) yes
Checking for Boost regex library... (cached) yes
Lua submodule found.
WARNING: Client prerequisites are not met. wesnoth cannot be built.
WARNING: Unit tests are disabled because their prerequisites are not met
  If any config checks fail, look in build/config.log for details
  If a check fails spuriously due to caching, use --config=force to force its rerun
NLS tools are not present...
NLS catalogue installation is disabled.
---[applying configuration]---
/bin/sh: 1: utils/autorevision.sh: not found
Unable to find source files for: mariadbpp
scons: done reading SConscript files.
scons: Building targets ...
error_action(["wesnoth"], [])
scons: *** [wesnoth] Target disabled because its prerequisites are not met
scons: building terminated because of errors.
User avatar
Elvish_Hunter
Posts: 1576
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: How to install the dependence on ubuntu(wsl)?

Post by Elvish_Hunter »

If I remember correctly, I had to type this command while in a git clone directory:

Code: Select all

git submodule update --init --recursive
This happens because we include the mariadbpp database library as a git submodule, which in turn pulls from this repository: https://github.com/viaduck/mariadbpp.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
slarkkk
Posts: 3
Joined: February 15th, 2023, 8:35 am

Re: How to install the dependence on ubuntu(wsl)?

Post by slarkkk »

I don't know why it can't find some SDL library. Or how do I add the path of library.
User avatar
Elvish_Hunter
Posts: 1576
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: How to install the dependence on ubuntu(wsl)?

Post by Elvish_Hunter »

Have you installed those libraries? If not, type these with sudo or su:

Code: Select all

apt install libsdl2-dev
apt install libsdl2-image-dev
apt install libsdl2-mixer-dev
apt install libssl-dev
Then rerun scons with the --config=force flag.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
slarkkk
Posts: 3
Joined: February 15th, 2023, 8:35 am

Re: How to install the dependence on ubuntu(wsl)?

Post by slarkkk »

Thanks! It runs. By the way, how to run the server? Where could I find some examples of "server.cfg"?
User avatar
Pentarctagon
Project Manager
Posts: 5566
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: How to install the dependence on ubuntu(wsl)?

Post by Pentarctagon »

The manpage has documentation for what options can be set there.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
shevegen
Posts: 497
Joined: June 3rd, 2004, 4:35 pm

Re: How to install the dependence on ubuntu(wsl)?

Post by shevegen »

If all fails you can run a LFS/BLFS on WSL, for the most part - that is, compile
everything from source - and run that. I did that on my laptop back on WSL1
already. It was slow, tedious, but it can be done!

On debian you typically have to install all the missing -dev packages that
contain the .h files. I don't know if debian offers a simplified, user-friendly
way to allow for this, but you can always keep track of things semi-manually
by adding this into a text file and maintaining that text file.

I compile everything from source, and the things I usually need first and
foremost for wesnoth are:

boost, SDL2 packages ... hmm. Probably lua too these days.

Boost is probably the biggest chunk. I use a slightly older version; wesnoth
seems to prefer older boost versions for some reason (I have not tried
the newer branch + newer boost yet, but I had issues with boost +
wesnoth in the past, so I just decided to use a slightly older boost
version, then it should work fine).
Post Reply