bugLordsAWar! - Bugs: bug #32896, configure script stops when...

 
 

bug #32896: configure script stops when checking for SDL mixer on OpenBSD 4.7

Submitted by:  None
Submitted on:  Wed 23 Mar 2011 06:55:00 PM UTC  
 
Category: building/compilationSeverity: 3 - Normal
Item Group: 0.2.0Status: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 28 Mar 2011 01:23:21 PM UTC, comment #6:

Sorry. Sure You can, everything compiles and runs fine.

Dmitrij D. Czarkoff <czarkoff>
Mon 28 Mar 2011 01:17:12 PM UTC, comment #5:

Can I close this bug?

Ben Asselstine <benasselstine>
Project Administrator
Thu 24 Mar 2011 11:27:23 AM UTC, comment #4:

new bug: https://savannah.nongnu.org/bugs/index.php?32898

Ben Asselstine <benasselstine>
Project Administrator
Thu 24 Mar 2011 11:14:51 AM UTC, comment #3:

1. the problem is with your sdl-config. The configure script depends on it (through AM_PATH_SDL) for proper values.

2. The discrepancy of sdl-config not giving -L values is why the test isn't passing.

3. My system has a SDL_Mixer.pc file that also gives proper values. Why not yours? No matter. Perhaps you'd like to try modifying the configure.ac script to use pkg-config with the SDL package? Or perhaps you'd like to fix SDL on your system to provide a -L?

4. I don't know why the CFLAGS/LDLAGS hack isn't working. I can see places in the configure.ac and aclocal.m4 files where it is explicitly trying to retain those values. If you debug the problem I'll consider using the solution in upstream.

5. I am opening a new bug for your compilation error.

Ben Asselstine <benasselstine>
Project Administrator
Thu 24 Mar 2011 06:00:12 AM UTC, comment #2:

Thanks, configure runs okay with these options: --disable-sdltest --with-boost-includedir=/usr/local/include

But backing up a little, only the base SDL package supplies a pkg-config file: /usr/local/lib/pkgconfig/sdl.pc (the sdl-mixer , sdl-sound, etc. packages don't contain any such files).

However, pkg-config and sdl-config just return the same stuff:

$ pkg-config --libs sdl
-L/usr/local/lib -pthread -L/usr/X11R6/lib -R/usr/X11R6/lib -lSDL
$ sdl-config --libs
-L/usr/local/lib -lSDL -pthread -L/usr/X11R6/lib -R/usr/X11R6/lib

Well, almost anyway. The pkg-config CFLAGS don't include /usr/local/include:

$ pkg-config --cflags sdl
-I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/include -DXTHREADS
$ sdl-config --cflags
-I/usr/local/include -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/include -DXTHREADS

Maybe /usr/local/include should also be in sdl.pc, or cpp might not find the headers given in the form of "<SDL/foo.h>" rather than just "<foo.h>". Or maybe cpp is intelligent enough to figure it out? (I don't know...)

But, I think the real problem here is with the configure script itself, because it's not directly using either the output from pkg-config or sdl-config. I changed the first line in configure to "#!/bin/sh -x" to see how it tries to compile the test program:

+ CFLAGS=-g -O2 -I/usr/local/include -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/X11R6/include -DXTHREADS
+ LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lSDL_mixer

The LDFLAGS ends up with -lSDL_mixer instead of -lSDL, which is okay (but strange that it didn't just use the output from pkg-config or sdl-config), and is also missing the -pthread option which is probably the real issue (manually trying to compile the test program, like I did in the original post, will fail without this option).

Now I've bored everyone to death, let me go on to the next bug. :-) After configure finishes, gmake runs for several hours (the build machine is an old laptop...) and stops here:

player.cpp: In member function `void Player::initTurn()':
player.cpp:301: warning: int format, size_t arg (arg 2)
player.cpp: In member function `bool
Player::setPathOfStackToPreviousDestination(Stack*)':
player.cpp:4401: error: no match for 'operator!=' in 'it != std::list<_Tp,
_Alloc>::rend() [with _Tp = Action, _Alloc = std::allocator<Action>]()'
rectangle.h:55: error: candidates are: bool operator!=(const Rectangle&, const
Rectangle&)

I hope that error message makes sense to you...

BTW, the build generates some really big files, but maybe that's normal:
$ du -sh /home/build/lordsawar-0.2.0/
681M /home/build/lordsawar-0.2.0/

Anonymous
Wed 23 Mar 2011 07:09:09 PM UTC, comment #1:

This bug seems related:
http://savannah.nongnu.org/bugs/index.php?32796
I guess you can supply the --disable-sdltest option.

It seems as if the configure script presumes that SDL is in /usr/lib (or some other place that libraries are automatically searched for on your system), and when it compiles the test program it's just not finding the library on your system.

And I find it strange that the sdl-config program doesn't supply the info that is required to find the library on your system.

Does `pkg-config SDL_mixer --libs' provide better hints on your system?

Perhaps you'd like to locate a better/updated AM_PATH_SDL that works on GNU+Linux and also on OpenBSD?

Ben Asselstine <benasselstine>
Project Administrator
Wed 23 Mar 2011 06:55:00 PM UTC, original submission:

$ CPPFLAGS="-I/usr/X11R6/include -I/usr/local/include" LDFLAGS="-L/usr/X11R6/lib -L/usr/local/lib" ./configure

[lots of lines omitted...]
checking for sdl-config... /usr/local/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
configure: error: *** SDL_mixer is not installed or has not been compiled
*** with ogg vorbis support

However, all the required libraries are installed. I also verified that the test program works independently, by copying/pasting the relevant lines from the configure script into foo.c (and changing the ${srcdir} shell var to "./"):

$ cat foo.c
#include <SDL/SDL_mixer.h>
#include <stdio.h>

int main()
{
if (!Mix_LoadMUS("./" "/dat/music/victory.ogg"))
return -1;
return 0;
}
$ gcc -I/usr/local/include -I/usr/X11R6/include foo.c -L/usr/local/lib -L/usr/X11R6/lib -lSDL_mixer -lpthread
$ ./a.out
$ echo $?
0

So it looks like the problem is related to the configure script itself. It's as if it's not honoring my supplied CPPFLAGS/LDFLAGS environment vars. I also tried setting CXXFLAGS, but that had no effect. Anything else I can try?

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by czarkoff (Posted a comment)
  • -unavailable- added by benasselstine (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 28 Mar 2011 02:54:21 PM UTCbenasselstineOpen/ClosedOpen=>Closed
    Thu 24 Mar 2011 11:15:33 AM UTCbenasselstineSummaryI\'m trying to compile the src under OpenBSD 4.7, but the configure script stops when checking for SDL mixer:=> configure script stops when checking for SDL mixer on OpenBSD 4.7

    Back to the top


    Powered by Savane 3.1-cleanup1