Cant compile - no png support
Moderator: Forum Moderators
Cant compile - no png support
This is the error I get while compiling:
The puzzling thing about this is, that i have both the normal sdl-image and the developement package installed.
So what is the problem?
EDIT: Probably important, I overlooked it before:
I get those warnings for all sdl libs...
Code: Select all
checking for PNG support in SDL_image... no
configure: error: *** SDL_image has no PNG support! You need SDL_image with PNG support
So what is the problem?

EDIT: Probably important, I overlooked it before:
Code: Select all
configure: WARNING: SDL.h: present but cannot be compiled
configure: WARNING: SDL.h: check for missing prerequisite headers?
configure: WARNING: SDL.h: see the Autoconf documentation
configure: WARNING: SDL.h: section "Present But Cannot Be Compiled"
configure: WARNING: SDL.h: proceeding with the preprocessor's result
configure: WARNING: SDL.h: in the future, the compiler will take precedence
Maybe this patch helps you: https://gna.org/patch/?624
"If gameplay requires it, they can be made to live on Venus." -- scott
-
- Posts: 47
- Joined: June 12th, 2006, 6:20 pm
I have the same problem as well, except that I have already applied the most recent version of the patch already (1474). In addition to that, I get a bunch of errors saying how the headers of the SDL files are there, but can't be compiled. I also get something saying that g++ isn't being used, when I've installed it already. For reference, I've installed all the SDL files and their dev addons, along with g++, and the patch for configure.ac.
I'm curious as to why it says it's using the GNU compiler and not the GNU C++ compiler, as well. I would think that would solve compiling the header problems (and thus the PNG support problem as well).
Code: Select all
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-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... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking whether NLS is requested... yes
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for ranlib... ranlib
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for XOpenDisplay in -lX11... yes
checking for sdl-config... /usr/bin/sdl-config
checking for fribidi-config... no
configure: WARNING: *** FRIBIDI not found.
checking for libpng-config... /usr/bin/libpng-config
checking for SDL - version >= 1.2.7... yes
checking for gnome-config... no
checking for kde-config... /usr/bin/kde-config
checking for libtool... no
checking for IMG_Load in -lSDL_image... yes
checking for Mix_OpenAudio in -lSDL_mixer... yes
checking for SDLNet_Init in -lSDL_net... yes
checking for freetype-config... /usr/bin/freetype-config
configure: skipping check for libzipios++ - use --with-zipios if you want it
checking for dirent.h that defines DIR... no
checking for sys/ndir.h that defines DIR... no
checking for sys/dir.h that defines DIR... no
checking for ndir.h that defines DIR... no
checking for library containing opendir... no
checking how to run the C++ preprocessor... /lib/cpp
checking for ANSI C header files... no
checking SDL.h usability... no
checking SDL.h presence... yes
configure: WARNING: SDL.h: present but cannot be compiled
configure: WARNING: SDL.h: check for missing prerequisite headers?
configure: WARNING: SDL.h: see the Autoconf documentation
configure: WARNING: SDL.h: section "Present But Cannot Be Compiled"
configure: WARNING: SDL.h: proceeding with the preprocessor's result
configure: WARNING: SDL.h: in the future, the compiler will take precedence
configure: WARNING: ## ---------------------------- ##
configure: WARNING: ## Report this to isaac@warp.es ##
configure: WARNING: ## ---------------------------- ##
checking for SDL.h... yes
checking SDL_image.h usability... no
checking SDL_image.h presence... yes
configure: WARNING: SDL_image.h: present but cannot be compiled
configure: WARNING: SDL_image.h: check for missing prerequisite headers?
configure: WARNING: SDL_image.h: see the Autoconf documentation
configure: WARNING: SDL_image.h: section "Present But Cannot Be Compiled"
configure: WARNING: SDL_image.h: proceeding with the preprocessor's result
configure: WARNING: SDL_image.h: in the future, the compiler will take precedence
configure: WARNING: ## ---------------------------- ##
configure: WARNING: ## Report this to isaac@warp.es ##
configure: WARNING: ## ---------------------------- ##
checking for SDL_image.h... yes
checking SDL_mixer.h usability... no
checking SDL_mixer.h presence... yes
configure: WARNING: SDL_mixer.h: present but cannot be compiled
configure: WARNING: SDL_mixer.h: check for missing prerequisite headers?
configure: WARNING: SDL_mixer.h: see the Autoconf documentation
configure: WARNING: SDL_mixer.h: section "Present But Cannot Be Compiled"
configure: WARNING: SDL_mixer.h: proceeding with the preprocessor's result
configure: WARNING: SDL_mixer.h: in the future, the compiler will take precedence
configure: WARNING: ## ---------------------------- ##
configure: WARNING: ## Report this to isaac@warp.es ##
configure: WARNING: ## ---------------------------- ##
checking for SDL_mixer.h... yes
checking SDL_net.h usability... no
checking SDL_net.h presence... yes
configure: WARNING: SDL_net.h: present but cannot be compiled
configure: WARNING: SDL_net.h: check for missing prerequisite headers?
configure: WARNING: SDL_net.h: see the Autoconf documentation
configure: WARNING: SDL_net.h: section "Present But Cannot Be Compiled"
configure: WARNING: SDL_net.h: proceeding with the preprocessor's result
configure: WARNING: SDL_net.h: in the future, the compiler will take precedence
configure: WARNING: ## ---------------------------- ##
configure: WARNING: ## Report this to isaac@warp.es ##
configure: WARNING: ## ---------------------------- ##
checking for SDL_net.h... yes
checking stdlib.h usability... no
checking stdlib.h presence... yes
configure: WARNING: stdlib.h: present but cannot be compiled
configure: WARNING: stdlib.h: check for missing prerequisite headers?
configure: WARNING: stdlib.h: see the Autoconf documentation
configure: WARNING: stdlib.h: section "Present But Cannot Be Compiled"
configure: WARNING: stdlib.h: proceeding with the preprocessor's result
configure: WARNING: stdlib.h: in the future, the compiler will take precedence
configure: WARNING: ## ---------------------------- ##
configure: WARNING: ## Report this to isaac@warp.es ##
configure: WARNING: ## ---------------------------- ##
checking for stdlib.h... yes
checking unistd.h usability... no
checking unistd.h presence... yes
configure: WARNING: unistd.h: present but cannot be compiled
configure: WARNING: unistd.h: check for missing prerequisite headers?
configure: WARNING: unistd.h: see the Autoconf documentation
configure: WARNING: unistd.h: section "Present But Cannot Be Compiled"
configure: WARNING: unistd.h: proceeding with the preprocessor's result
configure: WARNING: unistd.h: in the future, the compiler will take precedence
configure: WARNING: ## ---------------------------- ##
configure: WARNING: ## Report this to isaac@warp.es ##
configure: WARNING: ## ---------------------------- ##
checking for unistd.h... yes
checking poll.h usability... no
checking poll.h presence... yes
configure: WARNING: poll.h: present but cannot be compiled
configure: WARNING: poll.h: check for missing prerequisite headers?
configure: WARNING: poll.h: see the Autoconf documentation
configure: WARNING: poll.h: section "Present But Cannot Be Compiled"
configure: WARNING: poll.h: proceeding with the preprocessor's result
configure: WARNING: poll.h: in the future, the compiler will take precedence
configure: WARNING: ## ---------------------------- ##
configure: WARNING: ## Report this to isaac@warp.es ##
configure: WARNING: ## ---------------------------- ##
checking for poll.h... yes
checking sys/poll.h usability... no
checking sys/poll.h presence... yes
configure: WARNING: sys/poll.h: present but cannot be compiled
configure: WARNING: sys/poll.h: check for missing prerequisite headers?
configure: WARNING: sys/poll.h: see the Autoconf documentation
configure: WARNING: sys/poll.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/poll.h: proceeding with the preprocessor's result
configure: WARNING: sys/poll.h: in the future, the compiler will take precedence
configure: WARNING: ## ---------------------------- ##
configure: WARNING: ## Report this to isaac@warp.es ##
configure: WARNING: ## ---------------------------- ##
checking for sys/poll.h... yes
checking sys/select.h usability... no
checking sys/select.h presence... yes
configure: WARNING: sys/select.h: present but cannot be compiled
configure: WARNING: sys/select.h: check for missing prerequisite headers?
configure: WARNING: sys/select.h: see the Autoconf documentation
configure: WARNING: sys/select.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/select.h: proceeding with the preprocessor's result
configure: WARNING: sys/select.h: in the future, the compiler will take precedence
configure: WARNING: ## ---------------------------- ##
configure: WARNING: ## Report this to isaac@warp.es ##
configure: WARNING: ## ---------------------------- ##
checking for sys/select.h... yes
checking for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for an ANSI C-conforming const... no
checking for inline... no
checking for mode_t... no
checking for size_t... no
checking whether struct tm is in sys/time.h or time.h... sys/time.h
checking for error_at_line... no
checking whether lstat dereferences a symlink specified with a trailing slash... no
checking whether stat accepts an empty string... yes
checking for strftime... no
checking for strftime in -lintl... no
checking for floor... no
checking for socket... no
checking for strtoul... no
checking for PNG support in SDL_image... no
configure: error: *** SDL_image has no PNG support! You need SDL_image with PNG support
Last edited by greywolfexcel on February 18th, 2007, 4:46 pm, edited 2 times in total.
same problem here
Hello Forum,
I'd be very interested in an answer, too. Same problem here.
I even patched the configure.ac (hope I have done it right with patch -b configure.ac configure.ac.final.diff), but the same problem is still there. ./configure says, that the SDL_image library would not support png.
Any suggestions?
tarwin.
I'd be very interested in an answer, too. Same problem here.
I even patched the configure.ac (hope I have done it right with patch -b configure.ac configure.ac.final.diff), but the same problem is still there. ./configure says, that the SDL_image library would not support png.
Any suggestions?
tarwin.
-
- Posts: 47
- Joined: June 12th, 2006, 6:20 pm
Sorry, I did not really understand, what you meant. I'd be very grateful if you could tell me (step by step), what is to be done...greywolfexcel wrote:Thanks to grzywacz, my problem is solved. It appears that I had another version of g++ installed (g++ 4.1, to be exact), and it wasn't detected, so installed the normal g++, and it worked perfectly.

Thank you!
tarwin.
P.S.: Isn't there any Ubuntu-Repository which hosts the newest Wesnoth version?
--
Ooooops!
Ooooops!
-
- Posts: 47
- Joined: June 12th, 2006, 6:20 pm
Heh, no problem. I'm using Kubuntu (the KDE version of Ubuntu), so some things might be different, like your package manager and stuff, but what I did was this:
1. Start up Adept Package Manager
2. Search for g++
3. Install the default g++ package (the plain "vanilla" version, NOT g++ 4.1 or anything like that).
4. Run ./configure again.
If it still doesn't work, then check to see if you see this line anywhere in the output:
If it says no, then you haven't installed the right package, or it isn't linked right or something similar. You should go onto the wesnoth irc channel; there should be a few linux wizards on there that can help you better than I can.
If it says yes, then it's another problem entirely.
You should probably try checking the irc channel in that case.
As for a repository, there is one, but I think the newest version is 1.1.8, so unless you want to play that old version, keep at it!
1. Start up Adept Package Manager
2. Search for g++
3. Install the default g++ package (the plain "vanilla" version, NOT g++ 4.1 or anything like that).
4. Run ./configure again.
If it still doesn't work, then check to see if you see this line anywhere in the output:
Code: Select all
checking whether we are using the GNU C++ compiler... no
If it says yes, then it's another problem entirely.

As for a repository, there is one, but I think the newest version is 1.1.8, so unless you want to play that old version, keep at it!

Dear greywolfexcel!
Wonderful, this is it! You helped me a lot and I think it worked out now (the game is acutally running). I use the normal Ubuntu distribution and yes, after installing the right compiler everything turned out fine.
Thanks a lot!
Best wishes!
tarwin. <-- still wondering, which compiler Ubuntu installed on default
Wonderful, this is it! You helped me a lot and I think it worked out now (the game is acutally running). I use the normal Ubuntu distribution and yes, after installing the right compiler everything turned out fine.
Thanks a lot!

Best wishes!
tarwin. <-- still wondering, which compiler Ubuntu installed on default
--
Ooooops!
Ooooops!
-
- Posts: 47
- Joined: June 12th, 2006, 6:20 pm
And if none else works....
If none of the above works to get rid of that SDL_Image/png error?
Run ./autogen.sh
Run ./autogen.sh
Hello,
I've the same problem:
I've g++ installed (both the normal one and the 4.1 one) and I've run ./autogen.sh. The Wesnoth version is the latest SVN (trunk) and I'm running Ubuntu Gutsy. All dependencies (and also all the sdl libs) seem to be installed but I still get this error. Any ideas? 
I've the same problem:
Code: Select all
checking for PNG support in SDL_image... no
configure: error: *** Either your test image has vanished, or SDL_image has no PNG support!

-
- Inactive Developer
- Posts: 787
- Joined: March 31st, 2006, 6:55 am
Thanks for the hint but unfortunately it didn't work. There were really packages missing (cdbs debhelper html2text intltool-debian libfribidi-dev po-debconf) but I still get the same error. I think there is something wrong with sdl-image. Which version do I need for compiling? I've libsdl-image1.2 and libsdl-image1.2-dev installed, both are version 1.2.5-3 (from the Gutsy repos).
-
- Inactive Developer
- Posts: 787
- Joined: March 31st, 2006, 6:55 am