Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

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

Moderator: Forum Moderators

Prophet
Posts: 35
Joined: April 2nd, 2006, 8:22 pm
Location: Germany

Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by Prophet »

Hello,

i just saw that Wesnoth 1.4 is out and directly downloaded the source. I use Ubuntu 7.10 so i have to compile at the moment. I downloaded unpacked to Desktop and did following things in terminal:

Code: Select all

$ cd Desktop/wesnoth-1.4/
$ mkdir build
$ cd build
$ ../configure --prefix=/home/prophet/opt/wesnoth-1.4 --enable-editor --enable-tools
But that only runs until this message appears:
[...]
checking for PNG support in SDL_image... no
configure: error: *** Either your test image has vanished, or SDL_image has no PNG support!
I don't understand this. I had the previous official packaged version of Wesnoth installed before, so all needed libraries should be installed. If i interpret theis message correctly the configure script thinks SDL_image misses png support (or is not installed), but that can't be. SDL_image is installed correctly and worked with the previosly installed packaged version of wesnoth.

The given prefix directory exists and the version of SDL that is checked by the configure script supplies the needs of wesnoth refering to the script output. Here is the entire output for reference: http://ubuntuusers.de/paste/74340/

Thank you and greeting,
Prophet
torangan
Retired Developer
Posts: 1365
Joined: March 27th, 2004, 12:25 am
Location: Germany

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by torangan »

The libs are probably all installed but without the headers required to compile against them they won't help you much unless you wait for binaries. In other words: install the -devel packages.
WesCamp-i18n - Translations for User Campaigns:
http://www.wesnoth.org/wiki/WesCamp

Translators for all languages required: contact me. No geek skills required!
AI
Inactive Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by AI »

try "apt-get build-dep wesnoth", that should install (most of) the required dev packages.

also http://www.wesnoth.org/wiki/CompilingWesnoth
Prophet
Posts: 35
Joined: April 2nd, 2006, 8:22 pm
Location: Germany

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by Prophet »

Thanks for the quick answer. I must have been pretty tired yesterday. I could have come on that myself.

EDIT: Welll, it seems I was a bit fast on my answer. The dev libs are installed! All sdl dev libs were allready installed. I tried

Code: Select all

sudo apt-get build-dep wesnoth
to but that didn't help, the problem is still there.
SkeletonCrew
Inactive Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by SkeletonCrew »

You start configure from the build directory with ../configure
can you try to start ./configure in the toplevel directory if that works
the problem is that the test image can't be found.
Prophet
Posts: 35
Joined: April 2nd, 2006, 8:22 pm
Location: Germany

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by Prophet »

Thanks, that worked fine. I can compile now.
SkeletonCrew
Inactive Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by SkeletonCrew »

If you want to build out of tree you might look at this patch https://gna.org/patch/?1002

I haven't tested it, will do that later if no other dev beats me to it ;-)
Prophet
Posts: 35
Joined: April 2nd, 2006, 8:22 pm
Location: Germany

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by Prophet »

Thanks, for the patch, but its not really that important to me. The think with the "build" dir is just a small habbit of mine. I'm happy if it compiles and i can use it :)

Thank you for your engagement.

Greetings, Prophet
SkeletonCrew
Inactive Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by SkeletonCrew »

I just tested and committed the patch, so the next Wesnoth release
(both 1.4.x and 1.5.x) should allow you to use your build directory again.
Prophet
Posts: 35
Joined: April 2nd, 2006, 8:22 pm
Location: Germany

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by Prophet »

That's nice. :D
suitsmeveryfine
Posts: 9
Joined: March 16th, 2008, 10:58 pm
Location: Marseille
Contact:

Compiling Wesnoth 1.4 on Ubuntu fails ("C compiler cannot...

Post by suitsmeveryfine »

I am posting in this same thread since I'm also trying to compile the same version of Wesnoth in the same version of Ubuntu. I should add that I have got an AMD processor with 64-bit architecture, if that makes a difference perhaps.

After I have typed in ./configure I get the following:

Code: Select all

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether NLS is requested... yes
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
I've uploaded the log-file here: config.log

I would be very glad to receive some help here please.
AI
Inactive Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by AI »

Not being able to create executables is usually because you lack the package libc6-dev (libc-dev-amd64 for amd64).
suitsmeveryfine
Posts: 9
Joined: March 16th, 2008, 10:58 pm
Location: Marseille
Contact:

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by suitsmeveryfine »

Thanks for the tip but I can't find libc-dev-amd64 in the repository.

I did find linux-libc-dev, version 2.6.22-14.52, however and installed that one (right or not?). Afterwards I tried to make the executable again but failed:

Code: Select all

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether NLS is requested... yes
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
Prophet
Posts: 35
Joined: April 2nd, 2006, 8:22 pm
Location: Germany

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by Prophet »

I have just checked Synaptic and these two packages do exists:
  • libc-amd64
  • libc-dev-amd64
Check again and try to install them. THe package you installed before should be uninstalled again. (I'ver searched for "libc" within Synaptic and then scrolled down too the entries.)
AI
Inactive Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Compiling Wesnoth 1.4 on Ubuntu fails (missing png support)

Post by AI »

sorry, that was a typo.
the packages are
i A libc6-dev - GNU C Library: Development Libraries and Header Files
p libc6-dev-amd64 - GNU C Library: 64bit Development Libraries for AMD64
directly copied from the output of aptitude

you should only need one of these.
Post Reply