Problem compiling SDL 1.2.7

[…]
make[3]: Entering directory /tmp/SDL-1.2.7/src/audio' if /bin/sh ../../libtool --mode=compile gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL\" -DVERSION=\"1.2.7\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -I. -I. -s -O3 -march=i686 -fexpensive-optimizations -march=pentium -mcpu=pentiumpro -Wall -DENABLE_DUMMYVIDEO -DDISKAUD_SUPPORT -DUSE_DLOPEN -DUSE_ASMBLIT -I./hermes -I../../src/hermes -DOSS_SUPPORT -DALSA_SUPPORT -DARTSC_SUPPORT -DARTSC_DYNAMIC=libartsc.so.0 -I/usr/local/kde/include/artsc -DESD_SUPPORT -DESD_DYNAMIC=libesd.so.0 -I/usr/local/include -DNAS_SUPPORT -I/usr/X11R6/include/ -DENABLE_X11 -DXTHREADS -I./include -I./src/video -DXFREE86_VM -DXFREE86_VMGAMMA -DXFREE86_DGAMOUSE -DDEFAULT_DGAMOUSE -DXFREE86_XV -DHAVE_XINERAMA -DNANOX_SHARE_MEMORY -DENABLE_NANOX_DIRECT_FB -DENABLE_NANOX -Isrc/video -DENABLE_DGA -DENABLE_FBCON -DENABLE_DIRECTFB -DENABLE_GGI -DENABLE_SVGALIB -DENABLE_AALIB -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I/usr/local/qtopia/include -I/usr/local/qt/include/ -DNO_DEBUG -fno-rtti -fno-exceptions -DHAVE_OPENGL -DUSE_INPUT_EVENTS -D_REENTRANT -DSDL_USE_PTHREADS -DHAVE_SIGACTION -I../../include -I../../include/SDL -I../../src -I../../src/main/linux -I../../src/audio -I../../src/video -I../../src/video/XFree86/extensions -I../../src/events -I../../src/joystick -I../../src/cdrom -I../../src/thread -I../../src/timer -I../../src/endian -I../../src/file -I../../src/thread -MT SDL_wave.lo -MD -MP -MF ".deps/SDL_wave.Tpo" -c -o SDL_wave.lo SDL_wave.c; \ then mv -f ".deps/SDL_wave.Tpo" ".deps/SDL_wave.Plo"; else rm -f ".deps/SDL_wave.Tpo"; exit 1; fi gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL\" -DVERSION=\"1.2.7\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -I. -I. -s -O3 -march=i686 -fexpensive-optimizations -march=pentium -mcpu=pentiumpro -Wall -DENABLE_DUMMYVIDEO -DDISKAUD_SUPPORT -DUSE_DLOPEN -DUSE_ASMBLIT -I./hermes -I../../src/hermes -DOSS_SUPPORT -DALSA_SUPPORT -DARTSC_SUPPORT -DARTSC_DYNAMIC=libartsc.so.0 -I/usr/local/kde/include/artsc -DESD_SUPPORT -DESD_DYNAMIC=libesd.so.0 -I/usr/local/include -DNAS_SUPPORT -I/usr/X11R6/include/ -DENABLE_X11 -DXTHREADS -I./include -I./src/video -DXFREE86_VM -DXFREE86_VMGAMMA -DXFREE86_DGAMOUSE -DDEFAULT_DGAMOUSE -DXFREE86_XV -DHAVE_XINERAMA -DNANOX_SHARE_MEMORY -DENABLE_NANOX_DIRECT_FB -DENABLE_NANOX -Isrc/video -DENABLE_DGA -DENABLE_FBCON -DENABLE_DIRECTFB -DENABLE_GGI -DENABLE_SVGALIB -DENABLE_AALIB -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I/usr/local/qtopia/include -I/usr/local/qt/include/ -DNO_DEBUG -fno-rtti -fno-exceptions -DHAVE_OPENGL -DUSE_INPUT_EVENTS -D_REENTRANT -DSDL_USE_PTHREADS -DHAVE_SIGACTION -I../../include -I../../include/SDL -I../../src -I../../src/main/linux -I../../src/audio -I../../src/video -I../../src/video/XFree86/extensions -I../../src/events -I../../src/joystick -I../../src/cdrom -I../../src/thread -I../../src/timer -I../../src/endian -I../../src/file -I../../src/thread -MT SDL_wave.lo -MD -MP -MF .deps/SDL_wave.Tpo -c SDL_wave.c -fPIC -DPIC -o .libs/SDL_wave.o-mcpu=’ is deprecated. Use -mtune=' or '-march=' instead. cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C In file included from /usr/include/asm/byteorder.h:57, from ../../include/SDL_endian.h:60, from SDL_wave.c:38: /usr/include/linux/byteorder/little_endian.h:43: error: parse error before "__cpu_to_le64p" /usr/include/linux/byteorder/little_endian.h: In function__cpu_to_le64p’:
/usr/include/linux/byteorder/little_endian.h:45: error: __le64' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h:45: error: (Each undeclared identifier is reported only once /usr/include/linux/byteorder/little_endian.h:45: error: for each function it appears in.) /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:47: error: parse error before '*' token /usr/include/linux/byteorder/little_endian.h: In function__le64_to_cpup’:
/usr/include/linux/byteorder/little_endian.h:49: error: p' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:51: error: parse error before "__cpu_to_le32p" /usr/include/linux/byteorder/little_endian.h: In function__cpu_to_le32p’:
/usr/include/linux/byteorder/little_endian.h:53: error: __le32' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:55: error: parse error before '*' token /usr/include/linux/byteorder/little_endian.h: In function__le32_to_cpup’:
/usr/include/linux/byteorder/little_endian.h:57: error: p' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:59: error: parse error before "__cpu_to_le16p" /usr/include/linux/byteorder/little_endian.h: In function__cpu_to_le16p’:
/usr/include/linux/byteorder/little_endian.h:61: error: __le16' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:63: error: parse error before '*' token /usr/include/linux/byteorder/little_endian.h: In function__le16_to_cpup’:
/usr/include/linux/byteorder/little_endian.h:65: error: p' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:67: error: parse error before "__cpu_to_be64p" /usr/include/linux/byteorder/little_endian.h: In function__cpu_to_be64p’:
/usr/include/linux/byteorder/little_endian.h:69: error: __be64' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h:69: error: parse error before "__swab64p" /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:71: error: parse error before '*' token /usr/include/linux/byteorder/little_endian.h: In function__be64_to_cpup’:
/usr/include/linux/byteorder/little_endian.h:73: error: p' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:75: error: parse error before "__cpu_to_be32p" /usr/include/linux/byteorder/little_endian.h: In function__cpu_to_be32p’:
/usr/include/linux/byteorder/little_endian.h:77: error: __be32' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h:77: error: parse error before "__swab32p" /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:79: error: parse error before '*' token /usr/include/linux/byteorder/little_endian.h: In function__be32_to_cpup’:
/usr/include/linux/byteorder/little_endian.h:81: error: p' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:83: error: parse error before "__cpu_to_be16p" /usr/include/linux/byteorder/little_endian.h: In function__cpu_to_be16p’:
/usr/include/linux/byteorder/little_endian.h:85: error: __be16' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h:85: error: parse error before "__swab16p" /usr/include/linux/byteorder/little_endian.h: At top level: /usr/include/linux/byteorder/little_endian.h:87: error: parse error before '*' token /usr/include/linux/byteorder/little_endian.h: In function__be16_to_cpup’:
/usr/include/linux/byteorder/little_endian.h:89: error: p' undeclared (first use in this function) make[3]: *** [SDL_wave.lo] Error 1 make[3]: Leaving directory/tmp/SDL-1.2.7/src/audio’
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /tmp/SDL-1.2.7/src/audio' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/tmp/SDL-1.2.7/src’
make: *** [all-recursive] Error 1

try a cvs snapshot from http://www.libsdl.org/cvs/SDL-1.2.tar.gz

perhaps it might work…
and if not, then we can fix it for the next release if it’s a problem with SDL.
You should check your installation of your compiler as well, just in case…

-LIM-

We need to know more about your system.
What is your system ? I can only guess it is linux since you have DGA
enabled, but :

  • what distro ?
  • what kernel version ? where do your kernel headers come from ?
  • what gcc version (looks like 3.3.X, but again, I’m guessing form the
    messages) ?

Stephane

Stephane Marchesin wrote:

We need to know more about your system.
What is your system ? I can only guess it is linux since you have DGA
enabled, but :

  • what distro ?

LFS

  • what kernel version ? where do your kernel headers come from ?

2.6.9

  • what gcc version (looks like 3.3.X, but again, I’m guessing form the
    messages) ?

3.4.3

Stephane

Regards,–
Pierre.

Jonathan Atkins wrote:

try a cvs snapshot from http://www.libsdl.org/cvs/SDL-1.2.tar.gz

perhaps it might work…
and if not, then we can fix it for the next release if it’s a problem
with SDL.
You should check your installation of your compiler as well, just in
case…

It gives me :

configure: error: cannot find install-sh or install.sh in . ./… ./…/…

I also tried http://www.libsdl.org/cvs/SDL-1.3.tar.gz but it’s really
better :

[…]
Making all in nas
make[3]: Entering directory /tmp/SDL-1.3/src/audio/nas' if /bin/sh ../../../libtool --mode=compile gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL\" -DVERSION=\"1.3.0\" -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -I. -I. -s -O3 -march=i686 -fexpensive-optimizations -march=pentium -mcpu=pentiumpro -Wall -ansi -pedantic -D_XOPEN_SOURCE -DENABLE_DUMMYVIDEO -DDISKAUD_SUPPORT -DUSE_DLOPEN -DUSE_ASMBLIT -I./hermes -I../../../src/hermes -DOSS_SUPPORT -DARTSC_SUPPORT -DARTSC_DYNAMIC=libartsc.so.0 -I/usr/local/kde/include/artsc -DESD_SUPPORT -DESD_DYNAMIC=libesd.so.0 -I/usr/local/include -DNAS_SUPPORT -DENABLE_X11 -DXTHREADS -I./include -I./src/video -DXFREE86_VM -DXFREE86_VMGAMMA -DXFREE86_DGAMOUSE -DDEFAULT_DGAMOUSE -DXFREE86_XV -DHAVE_XINERAMA -DNANOX_SHARE_MEMORY -DENABLE_NANOX_DIRECT_FB -DENABLE_NANOX -Isrc/video -DENABLE_DGA -DENABLE_DIRECTFB -DENABLE_GGI -DENABLE_AALIB -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I/usr/local/qtopia/include -I/usr/local/qt/include/ -DNO_DEBUG -fno-rtti -fno-exceptions -DHAVE_OPENGL -DUSE_INPUT_EVENTS -D_REENTRANT -DSDL_USE_PTHREADS -DPTHREAD_NO_RECURSIVE_MUTEX -I../../../include -I../../../include/SDL -I../../../src -I../../../src/linux -I../../../src/main -I../../../src/audio -I../../../src/video -I../../../src/video/XFree86/extensions -I../../../src/events -I../../../src/joystick -I../../../src/cdrom -I../../../src/thread -I../../../src/timer -I../../../src/endian -I../../../src/file -MT SDL_nasaudio.lo -MD -MP -MF ".deps/SDL_nasaudio.Tpo" \ -c -o SDL_nasaudio.lotest -f ‘SDL_nasaudio.c’ || echo
’./’SDL_nasaudio.c; \ then mv -f ".deps/SDL_nasaudio.Tpo" ".deps/SDL_nasaudio.Plo"; \ else rm -f ".deps/SDL_nasaudio.Tpo"; exit 1; \ fi rm -f .libs/SDL_nasaudio.lo gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL\" -DVERSION=\"1.3.0\" -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -I. -I. -s -O3 -march=i686 -fexpensive-optimizations -march=pentium -mcpu=pentiumpro -Wall -ansi -pedantic -D_XOPEN_SOURCE -DENABLE_DUMMYVIDEO -DDISKAUD_SUPPORT -DUSE_DLOPEN -DUSE_ASMBLIT -I./hermes -I../../../src/hermes -DOSS_SUPPORT -DARTSC_SUPPORT -DARTSC_DYNAMIC=libartsc.so.0 -I/usr/local/kde/include/artsc -DESD_SUPPORT -DESD_DYNAMIC=libesd.so.0 -I/usr/local/include -DNAS_SUPPORT -DENABLE_X11 -DXTHREADS -I./include -I./src/video -DXFREE86_VM -DXFREE86_VMGAMMA -DXFREE86_DGAMOUSE -DDEFAULT_DGAMOUSE -DXFREE86_XV -DHAVE_XINERAMA -DNANOX_SHARE_MEMORY -DENABLE_NANOX_DIRECT_FB -DENABLE_NANOX -Isrc/video -DENABLE_DGA -DENABLE_DIRECTFB -DENABLE_GGI -DENABLE_AALIB -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I/usr/local/qtopia/include -I/usr/local/qt/include/ -DNO_DEBUG -fno-rtti -fno-exceptions -DHAVE_OPENGL -DUSE_INPUT_EVENTS -D_REENTRANT -DSDL_USE_PTHREADS -DPTHREAD_NO_RECURSIVE_MUTEX -I../../../include -I../../../include/SDL -I../../../src -I../../../src/linux -I../../../src/main -I../../../src/audio -I../../../src/video -I../../../src/video/XFree86/extensions -I../../../src/events -I../../../src/joystick -I../../../src/cdrom -I../../../src/thread -I../../../src/timer -I../../../src/endian -I../../../src/file -MT SDL_nasaudio.lo -MD -MP -MF .deps/SDL_nasaudio.Tpo -c SDL_nasaudio.c -fPIC -DPIC -o .libs/SDL_nasaudio.lo-mcpu=’ is deprecated. Use -mtune=' or '-march=' instead. cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C In file included from SDL_nasaudio.c:47: SDL_nasaudio.h:38:28: audio/audiolib.h: No such file or directory In file included from SDL_nasaudio.c:47: SDL_nasaudio.h:47: error: parse error before "AuServer" SDL_nasaudio.h:47: warning: no semicolon at end of struct or union SDL_nasaudio.h:48: warning: type defaults toint’ in declaration of flow' SDL_nasaudio.h:48: error: ISO C forbids data definition with no type or storage class SDL_nasaudio.h:49: error: parse error before "dev" SDL_nasaudio.h:49: warning: type defaults toint’ in declaration of dev' SDL_nasaudio.h:49: error: ISO C forbids data definition with no type or storage class SDL_nasaudio.h:63: error: parse error before '}' token SDL_nasaudio.h:63: warning: ISO C does not allow extra;’ outside of a
function
SDL_nasaudio.c: In function Audio_Available': SDL_nasaudio.c:65: error:AuServer’ undeclared (first use in this function)
SDL_nasaudio.c:65: error: (Each undeclared identifier is reported only once
SDL_nasaudio.c:65: error: for each function it appears in.)
SDL_nasaudio.c:65: error: aud' undeclared (first use in this function) SDL_nasaudio.c:65: warning: implicit declaration of functionAuOpenServer’
SDL_nasaudio.c:68: warning: implicit declaration of function AuCloseServer' SDL_nasaudio.c: In functionAudio_CreateDevice’:
SDL_nasaudio.c:87: error: dereferencing pointer to incomplete type
SDL_nasaudio.c:96: error: dereferencing pointer to incomplete type
SDL_nasaudio.c:96: error: dereferencing pointer to incomplete type
SDL_nasaudio.c:96: error: dereferencing pointer to incomplete type
SDL_nasaudio.c:96: error: dereferencing pointer to incomplete type
SDL_nasaudio.c:96: error: dereferencing pointer to incomplete type
SDL_nasaudio.c:96: error: dereferencing pointer to incomplete type
[…]

locate audiolib.h

/usr/local/include/mjpegtools/audiolib.h
/usr/X11R6/include/audio/audiolib.h

Regards,–
Pierre.

Pierre wrote:

Jonathan Atkins wrote:

try a cvs snapshot from http://www.libsdl.org/cvs/SDL-1.2.tar.gz

perhaps it might work…
and if not, then we can fix it for the next release if it’s a problem
with SDL.
You should check your installation of your compiler as well, just in
case…

It gives me :

configure: error: cannot find install-sh or install.sh in . ./… ./…/…

You need to re-run autogen.sh
But then it won’t work any better.

I also tried http://www.libsdl.org/cvs/SDL-1.3.tar.gz but it’s really
better :

[snip problem]
This snapshot seems old, that bug was fixed some time ago IIRC.

As for your problem, it seems the kernel headers have changed like one
month ago. I’m investigating the problem.

Stephane

Pierre wrote:

Stephane Marchesin wrote:

We need to know more about your system.
What is your system ? I can only guess it is linux since you have DGA
enabled, but :

  • what distro ?

LFS

  • what kernel version ? where do your kernel headers come from ?

2.6.9

  • what gcc version (looks like 3.3.X, but again, I’m guessing form
    the messages) ?

3.4.3

Ok, you have two problems :

  • you are using an old SDL_endian.h file (it includes asm/byteorder.h,
    which was removed 9 months ago according to CVS logs)
  • there is a bug that was introduced in the kernel headers for 2.6.9
    which is fixed in 2.6.10. This bug will byte when compiling the cdrom
    subsystem. A patch that works around this bug is attached. Note that
    users affected are not those running 2.6.9, but those using the 2.6.9
    kernel headers for their system (i.e. whose libc is built against 2.6.9
    headers).

Stephane

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: sdl-2.6.9.patch
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20041124/e01cfcce/attachment.txt

Stephane Marchesin wrote:

Pierre wrote:

Stephane Marchesin wrote:

We need to know more about your system.
What is your system ? I can only guess it is linux since you have DGA
enabled, but :

  • what distro ?

LFS

  • what kernel version ? where do your kernel headers come from ?

2.6.9

  • what gcc version (looks like 3.3.X, but again, I’m guessing form
    the messages) ?

3.4.3

Ok, you have two problems :

  • you are using an old SDL_endian.h file (it includes asm/byteorder.h,
    which was removed 9 months ago according to CVS logs)

locate SDL_endian.h

/usr/local/include/SDL/SDL_endian.h

Should I remove it ?

  • there is a bug that was introduced in the kernel headers for 2.6.9
    which is fixed in 2.6.10. This bug will byte when compiling the cdrom
    subsystem. A patch that works around this bug is attached. Note that
    users affected are not those running 2.6.9, but those using the 2.6.9
    kernel headers for their system (i.e. whose libc is built against 2.6.9
    headers).

Ok I’m gonna try your patch.–
Pierre.

  • there is a bug that was introduced in the kernel headers for 2.6.9
    which is fixed in 2.6.10. This bug will byte when compiling the cdrom
    subsystem. A patch that works around this bug is attached. Note that
    users affected are not those running 2.6.9, but those using the 2.6.9
    kernel headers for their system (i.e. whose libc is built against 2.6.9
    headers).

Thanks, I’ve added your patch to CVS.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment