Latest Posts

Topic: Compiler Errors on Raspbian

DanRasp
Avatar
Topic Opener
Joined: 2020-12-01, 19:16
Posts: 9
Ranking
Pry about Widelands
Posted at: 2020-12-01, 20:00

Hi All!

After trying the debian packaged Build of Widelands (which is 19) I was very disappointed whith a pointer speed of 0.3 FPS (which was not solveable via configuration). Some folks recommended to build an earlier version which should not be OpenGL-dependend especially Build 18. I tried 10 times or the like until i got all the libs necessary only to end compile.sh with a "was terminated" message after some minor faults and 98% compiled...

But what really annoys me - is that it's almost the same with build 17 as follows:

I do not suppose that all available builds have syntax errors the like, but I'm not that deep into to correct this myself, any ideas?

bash output:

/home/pi/Downloads/widelands-build17-src/src/main.cc: In function ‘int main(int, char**)’:
/home/pi/Downloads/widelands-build17-src/src/main.cc:72:19: error: ‘fork’ was not declared in this scope
   if ((pid = fork()) < 0) {
                   ^
/home/pi/Downloads/widelands-build17-src/src/main.cc:77:11: error: ‘setsid’ was not declared in this scope
    setsid();
           ^
/home/pi/Downloads/widelands-build17-src/src/main.cc:79:10: error: ‘STDIN_FILENO’ was not declared in this scope
    close(STDIN_FILENO);
          ^~~~~~~~~~~~
/home/pi/Downloads/widelands-build17-src/src/main.cc:79:22: error: ‘close’ was not declared in this scope
    close(STDIN_FILENO);
                      ^
/home/pi/Downloads/widelands-build17-src/src/main.cc:80:10: error: ‘STDOUT_FILENO’ was not declared in this scope
    close(STDOUT_FILENO);
          ^~~~~~~~~~~~~
/home/pi/Downloads/widelands-build17-src/src/main.cc:81:10: error: ‘STDERR_FILENO’ was not declared in this scope
    close(STDERR_FILENO);
          ^~~~~~~~~~~~~
/home/pi/Downloads/widelands-build17-src/src/main.cc:84:20: error: ‘dup’ was not declared in this scope
    dup(STDIN_FILENO);
                    ^
src/CMakeFiles/widelands.dir/build.make:62: die Regel für Ziel „src/CMakeFiles/widelands.dir/main.cc.o“ scheiterte
make[2]: *** [src/CMakeFiles/widelands.dir/main.cc.o] Fehler 1
CMakeFiles/Makefile2:3645: die Regel für Ziel „src/CMakeFiles/widelands.dir/all“ scheiterte
make[1]: *** [src/CMakeFiles/widelands.dir/all] Fehler 2
Makefile:149: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2
Edited: 2020-12-02, 10:51

Top Quote
niektory
Avatar
Joined: 2019-06-03, 20:06
Posts: 206
Ranking
Widelands-Forum-Junkie
Location: Poland
Posted at: 2020-12-01, 20:24

Put ``` before and after a block of code to format it properly.

/home/pi/Downloads/widelands-build17-src/src/main.cc: In function ‘int main(int, char**)’:
/home/pi/Downloads/widelands-build17-src/src/main.cc:72:19: error: ‘fork’ was not declared in this scope
   if ((pid = fork()) < 0) {
                   ^
/home/pi/Downloads/widelands-build17-src/src/main.cc:77:11: error: ‘setsid’ was not declared in this scope
    setsid();
           ^
/home/pi/Downloads/widelands-build17-src/src/main.cc:79:10: error: ‘STDIN_FILENO’ was not declared in this scope
    close(STDIN_FILENO);
          ^~~~~~~~~~~~
/home/pi/Downloads/widelands-build17-src/src/main.cc:79:22: error: ‘close’ was not declared in this scope
    close(STDIN_FILENO);
                      ^
 /home/pi/Downloads/widelands-build17-src/src/main.cc:80:10: error: ‘STDOUT_FILENO’ was not declared in this scope
    close(STDOUT_FILENO);
          ^~~~~~~~~~~~~
/home/pi/Downloads/widelands-build17-src/src/main.cc:81:10: error: ‘STDERR_FILENO’ was not declared in this scope
    close(STDERR_FILENO);
          ^~~~~~~~~~~~~
/home/pi/Downloads/widelands-build17-src/src/main.cc:84:20: error: ‘dup’ was not declared in this scope
    dup(STDIN_FILENO);
                    ^
src/CMakeFiles/widelands.dir/build.make:62: die Regel für Ziel „src/CMakeFiles/widelands.dir/main.cc.o“ scheiterte
make[2]: *** [src/CMakeFiles/widelands.dir/main.cc.o] Fehler 1
CMakeFiles/Makefile2:3645: die Regel für Ziel „src/CMakeFiles/widelands.dir/all“ scheiterte
make[1]: *** [src/CMakeFiles/widelands.dir/all] Fehler 2
Makefile:149: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-12-01, 21:19

Well build17 was released in april 2012. I gues it would be pretty hard to get this to compile on modern compilers/build environments, as headers and dependencies especially from our third party packages most probably have changed much since then. I think I remember even @Nordfriese had difficuties getting an old buiold to compile properly today.
I am not sure whether b19 would still compile.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-12-02, 10:29

Moin DanRasp and welcome to the forum face-smile.png

It is true that libraries and compilers change so rapidly that code often fails to compile with a compiler toolchain that is a few years newer than the code itself, so b17 would be hard to get working already.

After trying the debian packaged Build of Widelands (which is 19)

(which is very outdated as well, the current version is 21)

I was very disappointed whith a pointer speed of 0.3 FPS (which was not solveable via configuration).

In build21, there's a new option whether or not to use SDL mouse cursor. I would recommend that you get build21 and try out whether toggling this option solves the problem face-smile.png


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2020-12-02, 12:23

Try this branch: https://github.com/widelands/widelands/tree/build17

I compiled it like that with Ubuntu 18.04.


Busy indexing nil values

Top Quote
DanRasp
Avatar
Topic Opener
Joined: 2020-12-01, 19:16
Posts: 9
Ranking
Pry about Widelands
Posted at: 2020-12-03, 17:26

Thanx in advance...

A new compilation is running now...

starting as usual

r

-> Release mode selected

-- The C compiler identification is GNU 6.3.0 -- The CXX compiler identification is GNU 6.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 -- Disabled Unit Tests -- Boost version: 1.62.0 -- Found the following Boost libraries: -- signals -- Using compiler flags: -O3 -DNDEBUG -- Found OpenGL: /usr/lib/arm-linux-gnueabihf/libGL.so
-- Found PythonInterp: /usr/bin/python (found version "2.7.13") -- Version of Widelands Build is REVDETECT-BROKEN-PLEASE-REPORT-THIS(Release) -- Found ZLIB: /usr/lib/arm-linux-gnueabihf/libz.so (found version "1.2.8") -- Found PNG: /usr/lib/arm-linux-gnueabihf/libpng.so (found version "1.6.28") -- SDLMAIN_LIBRARY is /usr/lib/arm-linux-gnueabihf/libSDLmain.a -- 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
-- Found SDL_image: /usr/lib/arm-linux-gnueabihf/libSDL_image.so (found version "1.2.12") -- Found SDL_mixer: /usr/lib/arm-linux-gnueabihf/libSDL_mixer.so (found version "1.2.12") -- Found SDL_net: /usr/lib/arm-linux-gnueabihf/libSDL_net.so (found version "1.2.8") -- Found SDL_ttf: /usr/lib/arm-linux-gnueabihf/libSDL_ttf.so (found version "2.0.11") -- Found Lua51: /usr/lib/arm-linux-gnueabihf/liblua5.1.so;/usr/lib/arm-linux-gnueabihf/libm.so (found version "5.1.5") -- Found Doxygen: /usr/bin/doxygen (found version "1.8.13")

i am curious...


Top Quote
DanRasp
Avatar
Topic Opener
Joined: 2020-12-01, 19:16
Posts: 9
Ranking
Pry about Widelands
Posted at: 2020-12-04, 07:17

this worked perfectly, thanks a lot!


Top Quote
DanRasp
Avatar
Topic Opener
Joined: 2020-12-01, 19:16
Posts: 9
Ranking
Pry about Widelands
Posted at: 2020-12-05, 21:41

today i tried build 21, result:

^[[Cvirtual memory exhausted: Nicht genügend Hauptspeicher verfügbar virtual memory exhausted: Nicht genügend Hauptspeicher verfügbar src/wui/CMakeFiles/wui.dir/build.make:62: die Regel für Ziel „src/wui/CMakeFiles/wui.dir/actionconfirm.cc.o“ scheiterte make[2]: [src/wui/CMakeFiles/wui.dir/actionconfirm.cc.o] Fehler 1 make[2]: Es wird auf noch nicht beendete Prozesse gewartet... src/wui/CMakeFiles/wui.dir/build.make:110: die Regel für Ziel „src/wui/CMakeFiles/wui.dir/building_statistics_menu.cc.o“ scheiterte make[2]: [src/wui/CMakeFiles/wui.dir/building_statistics_menu.cc.o] Fehler 1 CMakeFiles/Makefile2:42114: die Regel für Ziel „src/wui/CMakeFiles/wui.dir/all“ scheiterte make[1]: [src/wui/CMakeFiles/wui.dir/all] Fehler 2 Makefile:138: die Regel für Ziel „all“ scheiterte make: *** [all] Fehler 2 pi@raspberrypi:~/Downloads/widelands-build21 $

whatching cpu load i guess it compiled several things in parallel, i hope one can prevent this saving memory...


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-12-05, 22:08

you might try to invoke compile.sh with the -j option specifiying the processorcores to be used.


Top Quote
DanRasp
Avatar
Topic Opener
Joined: 2020-12-01, 19:16
Posts: 9
Ranking
Pry about Widelands
Posted at: 2020-12-06, 09:58

Thanks! meanwhile found out myself too...

so i lowered the memory split and set -j 1 now running, past the point it stopped yesterday - interesting fact: codecheck looks differently now, with checksums shown


Top Quote