Have a promble with installation wesnoth-1.14.4. Ubuntu

General feedback and discussion of the game.

Moderators: Forum Moderators, Developers

Post Reply
kan_A
Posts: 1
Joined: July 31st, 2018, 4:20 am

Have a promble with installation wesnoth-1.14.4. Ubuntu

Post by kan_A » August 19th, 2018, 12:17 pm

cmake version 3.10.2
SCons by Steven Knight et al.:
script: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668, 2017/11/14 13:16:53, by bdbaddog on hpmicrodog
engine: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668, 2017/11/14 13:16:53, by bdbaddog on hpmicrodog

Code: Select all

~/Downloads/wesnoth-1.14.4$ scons
Building Wesnoth version 1.14.4
Mkdir("build")
---[checking prerequisites]---
Checking for C header file poll.h... yes
Checking for C header file sys/poll.h... yes
Checking for C header file sys/select.h... yes
Checking for C header file sys/sendfile.h... yes
Checking for C function sendfile()... yes
Checking for C library m... yes
Checking for C function round()... yes
Checking whether C++ compiler works (g++ version >= 4.8 required)... yes
Checking for C library libcrypto... yes
Checking for Boost iostreams library version >= 1.50.0... no
Checking for gzip support in Boost Iostreams... no
Checking for bzip2 support in Boost Iostreams... no
Checking for Boost random library version >= 1.50.0... no
Checking for Boost smart_ptr library... no
Checking for Boost locale library... no
Checking for C library pthread... yes
Checking for Boost system library... no
Checking for Boost asio library... no
Checking for Boost thread library version >= 1.50.0... no
Checking for Boost filesystem library... no
WARNING: Base prerequisites are not met
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: sdl2-config: not found
Checking for Simple DirectMedia Layer library version >= 2.0.4... no
Checking for SDL2_ttf library... no
Checking for SDL2_mixer library... no
Checking for SDL2_image library... no
Checking for C library vorbisfile... no
Checking for Ogg Vorbis support in SDL... no
Checking for PNG support in SDL... no
Checking for JPG support in SDL... no
/bin/sh: 1: pkg-config: not found
Checking for Cairo... (cached) no
/bin/sh: 1: pkg-config: not found
Checking for Pango with cairo backend... (cached) no
/bin/sh: 1: pkg-config: not found
Checking for fontconfig... (cached) no
Checking for Boost program_options library version >= 1.50.0... no
Checking for Boost regex library... no
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
---[applying configuration]---
error: No repo or cache detected.
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.

Code: Select all

~/Downloads/wesnoth-1.14.4$ mkdir build && cd build
~/Downloads/wesnoth-1.14.4/build$ cmake .. -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR) (Required is
  at least version "2.0.4")
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindSDL2.cmake:219 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:63 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/kan/Downloads/wesnoth-1.14.4/build/CMakeFiles/CMakeOutput.log".
See also "/home/kan/Downloads/wesnoth-1.14.4/build/CMakeFiles/CMakeError.log".

Code: Select all

~/Downloads/wesnoth-1.14.4/build$ cat CMakeFiles/CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/kan/Downloads/wesnoth-1.14.4/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_48ea1/fast"
/usr/bin/make -f CMakeFiles/cmTC_48ea1.dir/build.make CMakeFiles/cmTC_48ea1.dir/build
make[1]: Entering directory '/home/kan/Downloads/wesnoth-1.14.4/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_48ea1.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_48ea1.dir/CheckSymbolExists.c.o   -c /home/kan/Downloads/wesnoth-1.14.4/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_48ea1
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_48ea1.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_48ea1.dir/CheckSymbolExists.c.o  -o cmTC_48ea1 
CMakeFiles/cmTC_48ea1.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_48ea1.dir/build.make:97: recipe for target 'cmTC_48ea1' failed
make[1]: *** [cmTC_48ea1] Error 1
make[1]: Leaving directory '/home/kan/Downloads/wesnoth-1.14.4/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_48ea1/fast' failed
make: *** [cmTC_48ea1/fast] Error 2

File /home/kan/Downloads/wesnoth-1.14.4/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/kan/Downloads/wesnoth-1.14.4/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_1a36a/fast"
/usr/bin/make -f CMakeFiles/cmTC_1a36a.dir/build.make CMakeFiles/cmTC_1a36a.dir/build
make[1]: Entering directory '/home/kan/Downloads/wesnoth-1.14.4/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_1a36a.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_1a36a.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
Linking C executable cmTC_1a36a
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1a36a.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_1a36a.dir/CheckFunctionExists.c.o  -o cmTC_1a36a -lpthreads 
/usr/bin/x86_64-linux-gnu-ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_1a36a.dir/build.make:97: recipe for target 'cmTC_1a36a' failed
make[1]: *** [cmTC_1a36a] Error 1
make[1]: Leaving directory '/home/kan/Downloads/wesnoth-1.14.4/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_1a36a/fast' failed
make: *** [cmTC_1a36a/fast] Error 2
Downloaded two times from https://sourceforge.net/projects/wesnoth/

Code: Select all

-rw-rw-r--  1 i i 450573177 Aug 19 16:20 'wesnoth-1.14.4 (1).tar.bz2'
-rw-rw-r--  1 i i 450573177 Aug 18 20:55  wesnoth-1.14.4.tar.bz2
Can You help me?

Tad_Carlucci
Developer
Posts: 327
Joined: April 24th, 2016, 4:18 pm

Re: Have a promble with installation wesnoth-1.14.4. Ubuntu

Post by Tad_Carlucci » August 19th, 2018, 12:47 pm

Reading, we see the error is:

/usr/bin/x86_64-linux-gnu-ld: cannot find -lpthreads

So you're missing a library.

Pasting that into Google, and adding Ubuntu, quickly yields:

https://askubuntu.com/questions/453860/ ... ge-pthread

Which tells you to install it using:

sudo apt-get install libpthread-stubs0-dev

I note that a comment on that thread also indicates you'd not have had this problem is you'd upgraded your Ubuntu; which is precisely why I gave up and installed Arch.
I forked real life and now I'm getting merge conflicts.

Shiki
Developer
Posts: 232
Joined: July 13th, 2015, 9:53 pm
Location: Germany

Re: Have a promble with installation wesnoth-1.14.4. Ubuntu

Post by Shiki » August 20th, 2018, 2:28 am

You also have a lot of other dependencies not installed yet. See here:
https://wiki.wesnoth.org/CompilingWesno ... pendencies
Maintainer of Era of Myths.
Introduction to WML filtering and WML variables.

Legioner
Posts: 1
Joined: September 9th, 2018, 9:31 pm

Re: Have a promble with installation wesnoth-1.14.4. Ubuntu

Post by Legioner » September 9th, 2018, 9:39 pm

Hi!
I have the same error.
Library is installed.
Reading, we see the error is:

/usr/bin/x86_64-linux-gnu-ld: cannot find -lpthreads

So you're missing a library.
As i can see here - https://github.com/google/highwayhash/issues/60
or here - https://stackoverflow.com/questions/166 ... e-in-linux
- to make ubuntu is needed to change flag -lpthread to -pthread

Upd. Using cmake shows the boost libraries is being founed, using scons shows no some boost libraries.
Maybe it needs to set envieronment variable "boostlibdir"?

Post Reply