Compiling Problem 0.9.18

2 replies [Last post]
rwilkerson1000
User offline. Last seen 11 years 33 weeks ago. Offline
Joined: 2012-12-18
Posts: 4

Hello. I am trying to compile Hedgewars from source on Trisquel (similar to ubuntu.)

I have done so successfully in the past fallowing the methods instructed.

cmake .
make
make install

However, this time around, I am not able to do this.

My cmake . output is this

:~/Downloads/hedgewars-src-0.9.18$ cmake .
-- Building Release flavour
-- Server will not be built per user request
-- LibLua 5.1 found at /usr/lib/x86_64-linux-gnu/liblua5.1.so
-- Found LUA: liblua5.1.so
-- IMG_Init() is present
-- Found Freepascal: /usr/bin/fpc (version 2.4)
-- checking for module 'libavcodec'
-- package 'libavcodec' not found
-- checking for module 'libavformat'
-- package 'libavformat' not found
-- checking for module 'libavutil'
-- package 'libavutil' not found
-- Could NOT find FFMPEG/LibAV, video recording will be disabled
-- Found Qt4: /usr/bin/qmake (found version "4.7.4")
-- Found Qt4: /usr/bin/qmake (found suitable version "4.7.4", required is "4.5.0")
-- checking for module 'libavcodec'
-- package 'libavcodec' not found
-- checking for module 'libavformat'
-- package 'libavformat' not found
-- checking for module 'libavutil'
-- package 'libavutil' not found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/**********/Downloads/hedgewars-src-0.9.18

When I try to run make, it crashes with errors that the previous versions I've compiled have not had. The output is as fallows.

:~/Downloads/hedgewars-src-0.9.18$ make
[ 0%] Generating ../bin/hwengine
Free Pascal Compiler version 2.4.4-2ubuntu1 [2011/09/27] for x86_64
Copyright (c) 1993-2010 by Florian Klaempfl
(1002) Target OS: Linux for x86-64
(3104) Compiling /home/**********/Downloads/hedgewars-src-0.9.18/hedgewars/hwengine.pas
(3104) Compiling SDLh.pas
(3104) Compiling uMisc.pas
(3104) Compiling uConsts.pas
(3104) Compiling uFloat.pas
(3104) Compiling uSinTable.pas
(3104) Compiling uTypes.pas
(3104) Compiling uVariables.pas
(3104) Compiling uMobile.pas
(3104) Compiling uVariables.pas
(3104) Compiling uConsole.pas
(3104) Compiling uUtils.pas
uUtils.pas(178,5) Note: (5027) Local variable "c" is assigned but never used
(3104) Compiling PNGh.pas
Fatal: (10022) Can't find unit zlib used by png
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
make[2]: *** [bin/hwengine] Error 1
make[1]: *** [hedgewars/CMakeFiles/hwengine.dir/all] Error 2
make: *** [all] Error 2

Not sure where to go from here. Please help. Thank you.

nemo
nemo's picture
User offline. Last seen 19 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

$ for i in /usr/lib/fpc/*/units/*/zlib/zlib.o;do dpkg-query -S $i;done
fp-units-misc-2.4.4: /usr/lib/fpc/2.4.4/units/x86_64-linux/zlib/zlib.o
fp-units-misc-2.6.0: /usr/lib/fpc/2.6.0/units/x86_64-linux/zlib/zlib.o

So, just a guess, one of those? Maybe just try the unprefixed fp-units-misc package?
I suppose can update http://code.google.com/p/hedgewars/wiki/BuildingOnLinux to add that if it works.
I'm a bit surprised since I thought that was pulled in when fpc was installed.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

Moonlight
User offline. Last seen 9 years 18 weeks ago. Offline
Joined: 2015-07-13
Posts: 4

I'd like to pay attention to this old problem, because it is not solved yet: somehow, it really confuses when at last the configuration process is completed successfully, you run "make", wait until the server is compiled, and then the compilation of "hwengine" fails with a message that one of the libraries, which by the way was successfully found at the stage of configuration is missed at the stage of compilation! Thanks that now "hwengine" is built before the QT front end, and it does not take a long time to restart building!

Nemo is right, the solution is to install the package "fp-units-misc", but:
1) it must be mentioned, at first, in the file "INSTALL";
2) it must be mentioned on the page "Dependencies" [1];
and, very important:
3) somehow it must be implemented in the CMake-modules, that if the Pascal's ZLib is missing and if PNG screenshots are available, then the configuration process must be stopped with an error.

I can't understand completely how ZLib check is organized, because all I see is the line

Quote:
/usr/share/cmake-2.8/Modules/FindZLIB.cmake

in the temporary file "CMakeFiles/Makefile.cmake", and I don't understand who creates this file and adds there the following line. But, if the standard Pascal's unit "FindZLIB" does not work correctly, why not to do as you did, for example, with Lua: I offer to write a new script "FindZLIB", which not only checks the system library but also checks the Pascal's units, to put this script into the "cmake_modules" directory, and to call it explicitly?

[1] http://code.google.com/p/hedgewars/wiki/Dependencies

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]