Bug 63781 - ./configure fails when building project from SDL template
Summary: ./configure fails when building project from SDL template
Status: RESOLVED FIXED
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: appwizard (show other bugs)
Version: 1.0.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-06 03:04 UTC by meldroc
Modified: 2009-01-22 23:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description meldroc 2003-09-06 03:04:38 UTC
Version:           Kdevelop 3.0.0a5 (Gideon), from Debian packages at http://people.debian.org/~njordan/unstable/ (using KDE KDE 3.1.3)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc 3.3.2 automake version 1.7.6, autoconf version 2.1.3
OS:          Linux

I started by creating a new project using Project->New, and used the Simple SDL Program template under the C++ category.  Then, using the default main.cpp file, and changing nothing, I ran automake & friends, which I presume invokes aclocal, automake, autoconf, etc.  Doing that gives me the following output:

* cd /home/meldroc/projects/bugtest1 && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" make -f Makefile.cvs 
* aclocal 
* autoheader 
* WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' 
* WARNING: and `config.h.top', to define templates for `config.h.in' 
* WARNING: is deprecated and discouraged. 
*  
* WARNING: Using the third argument of `AC_DEFINE' and 
* WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without 
* WARNING: `acconfig.h': 
*  
* WARNING: AC_DEFINE([NEED_MAIN], 1, 
* WARNING: [Define if a function `main' is needed.]) 
*  
* WARNING: More sophisticated templates can also be produced, see the 
* WARNING: documentation. 
* configure.in:18: warning: AC_ARG_PROGRAM was called before AC_CANONICAL_TARGET 
* automake 
* autoconf 
* *** Success ***

Then I ran ./configure (or Build -> Run Configure) and got the following output & error:

* cd /home/meldroc/projects/bugtest1 && /home/meldroc/projects/bugtest1/configure 
* installing -c 
* checking whether build environment is sane... yes 
* checking for gawk... gawk 
* checking whether make sets $(MAKE)... yes 
* checking for g++... g++ 
* checking for C++ compiler default output... 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 g++ accepts -g... yes 
* checking for style of include used by make... GNU 
* checking dependency style of g++... gcc3 
* checking build system type... i686-pc-linux-gnu 
* checking host system type... i686-pc-linux-gnu 
* checking for gcc... gcc 
* checking whether we are using the GNU C compiler... yes 
* checking whether gcc accepts -g... yes 
* checking for gcc option to accept ANSI C... none needed 
* checking dependency style of gcc... gcc3 
* checking for a sed that does not truncate output... /bin/sed 
* checking for egrep... grep -E 
* checking for ld used by gcc... /usr/bin/ld 
* checking if the linker (/usr/bin/ld) is GNU ld... yes 
* checking for /usr/bin/ld option to reload object files... -r 
* checking for BSD-compatible nm... /usr/bin/nm -B 
* checking whether ln -s works... yes 
* checking how to recognise dependent libraries... pass_all 
* checking how to run the C preprocessor... gcc -E 
* checking for ANSI C header files... yes 
* checking for sys/types.h... yes 
* checking for sys/stat.h... yes 
* checking for stdlib.h... yes 
* checking for string.h... yes 
* checking for memory.h... yes 
* checking for strings.h... yes 
* checking for inttypes.h... yes 
* checking for stdint.h... yes 
* checking for unistd.h... yes 
* checking dlfcn.h usability... yes 
* checking dlfcn.h presence... yes 
* checking for dlfcn.h... yes 
* checking how to run the C++ preprocessor... g++ -E 
* checking for g77... no 
* checking for f77... no 
* checking for xlf... no 
* checking for frt... no 
* checking for pgf77... no 
* checking for fl32... no 
* checking for af77... no 
* checking for fort77... no 
* checking for f90... no 
* checking for xlf90... no 
* checking for pgf90... no 
* checking for epcf90... no 
* checking for f95... no 
* checking for fort... no 
* checking for xlf95... no 
* checking for lf95... no 
* checking for g95... no 
* checking whether we are using the GNU Fortran 77 compiler... no 
* checking whether accepts -g... no 
* checking the maximum length of command line arguments... 32768 
* checking command to parse /usr/bin/nm -B output from gcc object... ok 
* checking for objdir... .libs 
* checking for ar... ar 
* checking for ranlib... ranlib 
* checking for strip... strip 
* checking if gcc static flag works... yes 
* checking if gcc supports -fno-rtti -fno-exceptions... no 
* checking for gcc option to produce PIC... -fPIC 
* checking if gcc PIC flag -fPIC works... yes 
* compiling yes (gcc) 
* checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes 
* checking whether -lc should be explicitly linked in... no 
* checking dynamic linker characteristics... GNU/Linux ld.so 
* checking how to hardcode library paths into programs... immediate 
* checking whether stripping libraries is possible... yes 
* checking if libtool supports shared libraries... yes 
* checking whether to build shared libraries... yes 
* checking whether to build static libraries... yes 
* configure: creating libtool 
* appending configuration tag "CXX" to libtool 
* checking for ld used by g++... /usr/bin/ld 
* checking if the linker (/usr/bin/ld) is GNU ld... yes 
* checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes 
* checking for g++ option to produce PIC... -fPIC 
* checking if g++ PIC flag -fPIC works... yes 
* compiling yes (g++) 
* checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes 
* checking dynamic linker characteristics... GNU/Linux ld.so 
* checking how to hardcode library paths into programs... immediate 
* checking whether stripping libraries is possible... yes 
* appending configuration tag "F77" to libtool 
* -L/usr/lib -lSDL -lpthread 
* -I/usr/include/SDL -D_REENTRANT 
* checking target system type... i686-pc-linux-gnu 
* checking for sdl-config... /usr/bin/sdl-config 
* checking for SDL - version >= 1.2.0... no 
* *** Could not run SDL test program, checking why... 
* *** The test program failed to compile or link. See the file config.log for the 
* *** exact error that occured. This usually means SDL was incorrectly installed 
* *** or that you have moved SDL since it was installed. In the latter case, you 
* *** may want to edit the sdl-config script: /usr/bin/sdl-config 
* configure: error: *** SDL version 1.2.0 not found! 
* *** Exited with status: 1 ***

Obviously, the automake/autoconf scripts to check for the prescense of SDL have failed.

I know I have SDL correctly installed on my system, because I have a correctly working KDevelop 2.1.5 project where I manually hacked the automake/autoconf files to add the SDL check macros.
Comment 1 meldroc 2003-09-06 03:06:33 UTC
PS: My system actually has multiple versions of automake & autoconf.  I also 
tried with automake 1.7 & autoconf 2.5.  Still failed. 
Comment 2 Cameron Hart 2003-09-06 07:38:00 UTC
I am having the same problem on a Mandrake 9.1 system with automake 1.6 and
autoconf 2.5. 

I had a look at config.log and it looks like the SDL cflags are not getting
passed to g++ when it trys to build the test program even though the sdl-config
script is found. Thus the compiler fails because SDL.h is not found.
Comment 3 meldroc 2003-09-06 08:36:33 UTC
Sounds very similar to the problems I had when wrestling an SDL macro into the 
automake & autoconf scripts on my KDevelop 2.0 project.  If the test program 
is being compiled with g++, the paths from sdl-config need to be in CXXFLAGS 
as well as CFLAGS. 
Comment 4 Dominik Haumann 2003-09-09 16:40:40 UTC
[...]
> * checking for SDL - version >= 1.2.0... no
[...]
> Obviously, the automake/autoconf scripts to check for the prescense of SDL
> have failed.
This maybe a SDL error. It occuers on my machine, too, but has nothing to do
with kdevelop/gideon. It is really strange - perhaps the SDL guys can solve.
I think the problem is aclocal: If I change in my /usr/share/aclocal/sdl.m4
all "SDL.h" to "SDL/SDL.h" and the line
LIBS="$LIBS $SDL_LIBS" to
LIBS="$LIBS $SDL_LIBS -lSDLmain -lSDL"
it works fine!

--
Dominik Haumann,
dhaumann
Comment 5 meldroc 2003-09-10 00:14:03 UTC
Could be, Dominik.  The problem with using #include "SDL/SDL.h" and -lSDLmain 
-lSDL is it can break portability - hence the sdl-config script that comes 
with SDL.  A good solution would use sdl-config to automagically generate the 
proper -l arguments. 
Comment 6 Michael LaRue 2003-09-10 19:47:44 UTC
Try using the ` key (above tab on most keyboards) when you type `sdl-config
--cflags` and `sdl-config --libs` instead of the ' key.  You're using the wrong
key I think.  I had this problem also and it took me a while to figure out what
was wrong.
I found the answer here:
http://vengeance.et.tudelft.nl/~smoke/logs/sdl/sdl.11May2003
Comment 7 meldroc 2003-09-11 01:52:53 UTC
I just checked to make sure sdl-config invocations are in backticks, and they 
are.  I have verified that sdl-config is actually running. 
Comment 8 Dominik Haumann 2003-09-16 14:58:15 UTC
Please test again with newest CVS HEAD. Roberto (raggi) changed the file parts/appwizard/
sdlhello/configure.in and now it works for me! 
But I still get the warnings when doing "automake & friends". 
 
* cd /home/dh/Documents/projects/kdevelop/t3 && WANT_AUTOCONF_2_5="1" 
WANT_AUTOMAKE_1_6="1" gmake -f Makefile.cvs  
* aclocal  
* autoheader  
* WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'  
* WARNING: and `config.h.top', to define templates for `config.h.in'  
* WARNING: is deprecated and discouraged.  
*   
* WARNING: Using the third argument of `AC_DEFINE' and  
* WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without  
* WARNING: `acconfig.h':  
*   
* WARNING: AC_DEFINE([NEED_MAIN], 1,  
* WARNING: [Define if a function `main' is needed.])  
*   
* WARNING: More sophisticated templates can also be produced, see the  
* WARNING: documentation.  
* automake  
* autoconf  
* *** Success *** 
Comment 9 Amilcar do Carmo Lucas 2003-09-16 19:26:43 UTC
Dominik Those warnings ar normal. Ignore them