[SOLVED] Compilation aborted

7 replies [Last post]
user
User offline. Last seen 9 years 11 weeks ago. Offline
Joined: 2013-08-20
Posts: 6

Hi!
I'm using Linux and am trying to build Hedgewars-src-0.9.19.3 for x86_64. I keep getting this error when I run the make command:

Quote:
Scanning dependencies of target hwengine
[ 6%] Generating ../bin/hwengine
Free Pascal Compiler version 2.6.0 [2011/12/23] for x86_64
Copyright (c) 1993-2011 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64

...[cut]...
(3104) Compiling uLandTemplates.pas
(3104) Compiling uLandObjects.pas
(3104) Compiling adler32.pas
(3104) Compiling uLandPainted.pas
(3104) Compiling uLandGenMaze.pas
(3104) Compiling uLandOutline.pas
(3104) Compiling uCommandHandlers.pas
(9015) Linking /tmp/hedgewars-src-0.9.19.3/build/bin/hwengine
/usr/bin/ld: warning: /tmp/hedgewars-src-0.9.19.3/build/bin/link.res contains output sections; did you forget -T?
/tmp/hedgewars-src-0.9.19.3/build/bin/libavwrapper.a(avwrapper.c.o): In function `WriteAudioFrame':
avwrapper.c: (.text+0x272): undefined reference to `avcodec_fill_audio_frame'
avwrapper.c: (.text+0x28f): undefined reference to `avcodec_encode_audio2'
hwengine.pas(546,1) Error: (9013) Error while linking
hwengine.pas(546,1) Fatal: (10026) There were 1 errors compiling module, stopping
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

mikade
mikade's picture
User offline. Last seen 1 year 40 weeks ago. Offline
Joined: 2010-10-22
Posts: 355

Why such an old version?

mikade
Hedgewars Developer

user
User offline. Last seen 9 years 11 weeks ago. Offline
Joined: 2013-08-20
Posts: 6

I found fpc-2.6.0 on slackbuilds.org
I will try to build hedgewars-src-0.9.18-3

nemo
nemo's picture
User offline. Last seen 6 days 18 hours ago. Offline
Joined: 2009-01-28
Posts: 1861

0.9.19 is the latest release.
looks to me like the avwrapper failed to build, possibly due to missing dependencies.

What's your linux distro? Are you building this just to play it? If you're looking to collaborate, building from source control is a better choice.

If you're just looking to play, there may already be builds for yours.

Please come by IRC to talk about build probs.

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

user
User offline. Last seen 9 years 11 weeks ago. Offline
Joined: 2013-08-20
Posts: 6

Thank you!
Hedgewars-src-0.9.18-3 has been successfully built.
I am use Slackware and build Hedgewars just to play it.
SlackBuild for Hedgewars-src-0.9.17 available on slackbuilds.org

nemo
nemo's picture
User offline. Last seen 6 days 18 hours ago. Offline
Joined: 2009-01-28
Posts: 1861

Unfortunately playing 0.9.18 means limited playing options on the official server since most players will be on the latest version.
I think your underlying problem was probably missing dependencies for the video recording, but can't be certain, since you didn't provide a full console dump of cmake and the build.

The debian focused https://code.google.com/p/hedgewars/wiki/BuildingOnLinux gives an idea, at least, of the packages required.
Make sure you have avcodec and freeglut.

Actually, there's no particular reason I can think of that .18 worked and .19 failed if you were having avcodec probs given that was in .18 too - but a complete build log could explain more.

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

user
User offline. Last seen 9 years 11 weeks ago. Offline
Joined: 2013-08-20
Posts: 6

The mesa package in stock Slackware has libglut.so glut.h

Quote:
$ cat /var/log/packages/mesa-7.9.2-x86_64-1|grep glut
usr/lib64/pkgconfig/glut.pc
usr/lib64/libglut.so.3.7.1
usr/include/GL/glutf90.h
usr/include/GL/glut.h

ffmpeg includes libavcodec
Quote:
$ cat /var/log/packages/ffmpeg-0.9.1-x86_64_custom-1_SBo|grep avcodec
usr/lib64/pkgconfig/libavcodec.pc
usr/lib64/libavcodec.so.53.42.4
usr/include/libavcodec/
usr/include/libavcodec/opt.h
usr/include/libavcodec/vda.h
usr/include/libavcodec/dxva2.h
usr/include/libavcodec/vaapi.h
usr/include/libavcodec/vdpau.h
usr/include/libavcodec/xvmc.h
usr/include/libavcodec/avfft.h
usr/include/libavcodec/avcodec.h
usr/include/libavcodec/version.h
usr/include/libavfilter/avcodec.h

I have a log file
hedgewars-src-0.9.18-3-cmake-make-log http://pastebin.com/NKvQBBZh
hedgewars-src-0.9.19.3-cmake-make-log http://pastebin.com/srTGDmXD

user
User offline. Last seen 9 years 11 weeks ago. Offline
Joined: 2013-08-20
Posts: 6

With ffmpeg-0.11.1 all go smoothly.

Quote:
-- checking for module 'libavcodec'
-- found libavcodec, version 54.23.100
-- checking for module 'libavformat'
-- found libavformat, version 54.6.100
-- checking for module 'libavutil'
-- found libavutil, version 51.54.100
-- Found FFMPEG: /usr/lib64/libavcodec.so

Thanks.

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