Sdl 1.2.4 on *bsd

Hi

on compiling sdl 1.2.4 I receive the following errors :

./src/endian -I…/…/…/src/file -c SDL_sysjoystick.c -fPIC -DPIC -o .libs/SDL_sysjoystick.lo
SDL_sysjoystick.c:44: usbhid.h: No such file or directory
*** Error code 1

bash-2.05a$ uname -a
FreeBSD balrog.daeda 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Sat Feb 9 14:56:36 GMT 2002 root at balrog.daeda:/usr/src/sys/compile/BALROG i386

well, i also tested it on NetBSD 1.5.2 and 1.5ZA

Now the really bad thing about this :

After I do a ./configure --enable-joystick=no SDL compiles.
But now i get the following error while compiling the dull teststuff beyond.

bash-2.05a$ gcc -I/usr/local/include -I/usr/local/include/SDL -D_REENTRANT -D_THREAD_SAFE -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -pthread main.c
main.c: In function main': main.c:24: warning: passing arg 1 ofatexit’ makes pointer from integer without a cast
/usr/local/lib/libSDL.so: undefined reference to SDL_JoystickUpdate' /usr/local/lib/libSDL.so: undefined reference toSDL_numjoysticks’

–main.c–

#include <SDL/SDL.h>
#include <stdio.h>
#include <stdlib.h>

int main(){
SDL_Surface *screen;
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
printf(“cannot initialize SDL :%s\n”, SDL_GetError());
return 1;
}
atexit(SDL_QUIT);
screen = SDL_SetVideoMode(640,480,16,SDL_DOUBLEBUF);
if (screen == NULL) {
printf(“cannot set video mode: %s\n”, SDL_GetError());
}
SDL_Quit;
}-----

The whole stuff works well with SDL 1.2.3 so i guess that the newly added joystick support require some header’s common under linux.
(in fact there is a usbhid.h in the kernelsrc but if you copy it into the std-include dir the whole compile goes totally havoc)

regards, robert

on compiling sdl 1.2.4 I receive the following errors :

./src/endian -I…/…/…/src/file -c SDL_sysjoystick.c -fPIC -DPIC -o .libs/SDL_sysjoystick.lo
SDL_sysjoystick.c:44: usbhid.h: No such file or directory
*** Error code 1

Get the latest from CVS. We already fixed this.

–ryan.

GreetingsOn Thu, 23 May 2002 20:12:19 -0400 (EDT) “Ryan C. Gordon” wrote:

Get the latest from CVS. We already fixed this.

Yep, under FreeBSD the lastest CVS Snapshot (19.5) works fine
while under NetBSD it lacks the same problem :

…/…/src/thread -I…/…/…/src/timer -I…/…/…/src/endian -I…/…/…/src/file -c SDL_sysjoystick.c -fPIC -DPIC -o .libs/SDL_sysjoystick.lo
SDL_sysjoystick.c:48: usbhid.h: No such file or directory
*** Error code 1

And with disable joystick i catch the following on compiling the fire demon from libsdl.org :
checking for SDL - version >= 1.0.1… 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/local/bin/sdl-config
configure: error: *** SDL version 1.0.1 not found!

bash-2.05# sdl-config --version
1.2.5
bash-2.05# uname -a
NetBSD chimaira.daeda 1.5.2 NetBSD 1.5.2 (CHIMAIRA) #4: Sun May 19 20:13:20 CEST 2002 robert at chimaira.daeda:/usr/src/sys/arch/i386/compile/CHIMAIRA i386

(/usr/local/bin/sdl-config attached)

regards and thanks for the freebsd-fix, robert

-------------- next part --------------
A non-text attachment was scrubbed…
Name: sdl-config
Type: application/octet-stream
Size: 1418 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020525/4ac93061/attachment.obj

Yep, under FreeBSD the lastest CVS Snapshot (19.5) works fine
while under NetBSD it lacks the same problem :

…/…/src/thread -I…/…/…/src/timer -I…/…/…/src/endian -I…/…/…/src/file -c SDL_sysjoystick.c -fPIC -DPIC -o .libs/SDL_sysjoystick.lo
SDL_sysjoystick.c:48: usbhid.h: No such file or directory
*** Error code 1

Okay, this should be fixed with the latest CVS:
http://www.libsdl.org/cvs.php

Please let us know if there are any problems.

Thanks!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Please let us know if there are any problems.

Hi
I’m sorry for my late answer on the previous fix.
Well I downloaded the snapshot from 1.6, did the usual stuff and suffered the usual problem :frowning:
Hhhhmmmm…while SDL on FreeBSD works quite fine it seems to be a real mess under NetBSD.
Well then followed a --disable-joystick compile.
As usual this one worked but then a even more funny error occured on compiled the fire demo :

checking for SDL - version >= 1.0.1… 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/local/bin/sdl-config
configure: error: *** SDL version 1.0.1 not found!
bash-2.05# sdl-config --version
1.2.5

SDL is definitly installed so this is not the problem.
I guessed that it was caused because gcc wasn’t able to link the sample-programm so I tested this one :
bash-2.05# sdl-config --cflags
-I/usr/local/include -I/usr/local/include/SDL
bash-2.05# gcc -I/usr/local/include -I/usr/local/include/SDL -o ./fire fire.c
/tmp/ccXNjf3A.o: In function scrlock': /tmp/ccXNjf3A.o(.text+0x2b): undefined reference toSDL_LockSurface’
/tmp/ccXNjf3A.o(.text+0x39): undefined reference to SDL_GetError' /tmp/ccXNjf3A.o: In functionscrunlock’:
/tmp/ccXNjf3A.o(.text+0x8f): undefined reference to SDL_UnlockSurface' /tmp/ccXNjf3A.o(.text+0xa5): undefined reference toSDL_UpdateRect’
/tmp/ccXNjf3A.o: In function nomem': /tmp/ccXNjf3A.o(.text+0xc1): undefined reference toSDL_Quit’
/tmp/ccXNjf3A.o: In function updatemap': /tmp/ccXNjf3A.o(.text+0x89e): undefined reference toSDL_SetColors’
/tmp/ccXNjf3A.o: In function main': /tmp/ccXNjf3A.o(.text+0xea0): undefined reference toSDL_Init’
/tmp/ccXNjf3A.o(.text+0xeae): undefined reference to SDL_GetError' /tmp/ccXNjf3A.o(.text+0xeec): undefined reference toSDL_SetVideoMode’
/tmp/ccXNjf3A.o(.text+0xf04): undefined reference to SDL_GetError' /tmp/ccXNjf3A.o(.text+0xf1e): undefined reference toSDL_Quit’
/tmp/ccXNjf3A.o(.text+0x1108): undefined reference to SDL_GetTicks' /tmp/ccXNjf3A.o(.text+0x131d): undefined reference toSDL_PollEvent’
/tmp/ccXNjf3A.o(.text+0x14a9): undefined reference to SDL_GetTicks' /tmp/ccXNjf3A.o(.text+0x14c5): undefined reference toSDL_Quit’
collect2: ld returned 1 exit status

This one confused me even more due to the fact that in former versions no undefs towards things like GetError or Quit was reported.
making sdl returns the same error like before ( if you need complete ouptut of make just ask me )
regards robertOn Wed, 29 May 2002 13:50:07 -0700 Sam Lantinga wrote:

Unless this is a cut and paste error, you didn’t
actually link with SDL. Try adding -lSDL

Good luck,

Andrew.

— Robert Altschaffel <rob.alt at gmx.de> wrote:> On Wed, 29 May 2002 13:50:07 -0700 Sam Lantinga wrote:

Please let us know if there are any problems.

Hi
I’m sorry for my late answer on the previous fix.
Well I downloaded the snapshot from 1.6, did the
usual stuff and suffered the usual problem :frowning:
Hhhhmmmm…while SDL on FreeBSD works quite fine it
seems to be a real mess under NetBSD.
Well then followed a --disable-joystick compile.
As usual this one worked but then a even more funny
error occured on compiled the fire demo :

checking for SDL - version >= 1.0.1… 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/local/bin/sdl-config
configure: error: *** SDL version 1.0.1 not found!
bash-2.05# sdl-config --version
1.2.5

SDL is definitly installed so this is not the
problem.
I guessed that it was caused because gcc wasn’t able
to link the sample-programm so I tested this one :
bash-2.05# sdl-config --cflags
-I/usr/local/include -I/usr/local/include/SDL
bash-2.05# gcc -I/usr/local/include
-I/usr/local/include/SDL -o ./fire fire.c
/tmp/ccXNjf3A.o: In function scrlock': /tmp/ccXNjf3A.o(.text+0x2b): undefined reference to SDL_LockSurface’
/tmp/ccXNjf3A.o(.text+0x39): undefined reference to
SDL_GetError' /tmp/ccXNjf3A.o: In function scrunlock’:
/tmp/ccXNjf3A.o(.text+0x8f): undefined reference to
SDL_UnlockSurface' /tmp/ccXNjf3A.o(.text+0xa5): undefined reference to SDL_UpdateRect’
/tmp/ccXNjf3A.o: In function nomem': /tmp/ccXNjf3A.o(.text+0xc1): undefined reference to SDL_Quit’
/tmp/ccXNjf3A.o: In function updatemap': /tmp/ccXNjf3A.o(.text+0x89e): undefined reference to SDL_SetColors’
/tmp/ccXNjf3A.o: In function main': /tmp/ccXNjf3A.o(.text+0xea0): undefined reference to SDL_Init’
/tmp/ccXNjf3A.o(.text+0xeae): undefined reference to
SDL_GetError' /tmp/ccXNjf3A.o(.text+0xeec): undefined reference to SDL_SetVideoMode’
/tmp/ccXNjf3A.o(.text+0xf04): undefined reference to
SDL_GetError' /tmp/ccXNjf3A.o(.text+0xf1e): undefined reference to SDL_Quit’
/tmp/ccXNjf3A.o(.text+0x1108): undefined reference
to SDL_GetTicks' /tmp/ccXNjf3A.o(.text+0x131d): undefined reference to SDL_PollEvent’
/tmp/ccXNjf3A.o(.text+0x14a9): undefined reference
to SDL_GetTicks' /tmp/ccXNjf3A.o(.text+0x14c5): undefined reference to SDL_Quit’
collect2: ld returned 1 exit status

This one confused me even more due to the fact that
in former versions no undefs towards things like
GetError or Quit was reported.
making sdl returns the same error like before ( if
you need complete ouptut of make just ask me )
regards robert


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

Please let us know if there are any problems.

Hi
I’m sorry for my late answer on the previous fix.
Well I downloaded the snapshot from 1.6, did the usual stuff and suffered the usual problem :frowning:
Hhhhmmmm…while SDL on FreeBSD works quite fine it seems to be a real mess under NetBSD.
Well then followed a --disable-joystick compile.
As usual this one worked but then a even more funny error occured on compiled the fire demo :

checking for SDL - version >= 1.0.1… 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/local/bin/sdl-config
configure: error: *** SDL version 1.0.1 not found!
bash-2.05# sdl-config --version
1.2.5

What is actually in config.log?

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment> On Wed, 29 May 2002 13:50:07 -0700 Sam Lantinga wrote:

Hi

  1. Andrew :
    gcc -i fire.c -o fire -I/usr/local/include -I/usr/local/include/SDL -L/usr/local/lib -lSDL (this time correctly copy and pasted :wink: ) returns all the undef stuff.

  2. Sam :

I attached the config.log of SDL
Thanks for your efforts.

regards, robert
-------------- next part --------------
A non-text attachment was scrubbed…
Name: config.log
Type: application/octet-stream
Size: 12242 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020608/67198595/attachment.obj

Hi

  1. Andrew :
    gcc -i fire.c -o fire -I/usr/local/include -I/usr/local/include/SDL -L/usr/local/lib -lSDL (this time correctly copy and pasted :wink: ) returns all the undef stuff.

How about:
gcc fire.c -o fire sdl-config --cflags --libs

  1. Sam :

I attached the config.log of SDL

I was actually asking for the config.log for the program you were trying
to build - i.e. the one listed in the error message that you posted.

Have you looked at the FAQ?

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

Hi

How about:
gcc fire.c -o fire sdl-config --cflags --libs

Same result. In fact i didn’t expect anything else since I inserted the resulte of sdl-config --cflags --libs the last time.

I was actually asking for the config.log for the program you were trying
to build - i.e. the one listed in the error message that you posted.

argh…sorry, the right one is attached now

Have you looked at the FAQ?

sure ( The code contains support for Windows CE, AmigaOS, Atari, QNX, NetBSD, AIX, OSF/Tru64, and SymbianOS, but these are not yet officially supported.) :wink:

regards, robert
-------------- next part --------------
A non-text attachment was scrubbed…
Name: config.log.tgz
Type: application/octet-stream
Size: 2300 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020608/209fa620/attachment.obj

I was actually asking for the config.log for the program you were trying
to build - i.e. the one listed in the error message that you posted.

argh…sorry, the right one is attached now

Interesting, these are the critical lines:
configure:1215: gcc -o conftest -g -O2 -I/usr/local/include -I/usr/local/include/SDL conftest.c -L/usr/local/lib -lSDL 1>&5
/usr/bin/ld: warning: libesd.so.2, needed by /usr/local/lib/libSDL.so, not found (try using --rpath)
/usr/bin/ld: warning: libaudiofile.so.0, needed by /usr/local/lib/libSDL.so, not found (try using --rpath)
/usr/bin/ld: warning: libX11.so.6, needed by /usr/local/lib/libSDL.so, not found (try using --rpath)
/usr/bin/ld: warning: libXext.so.6, needed by /usr/local/lib/libSDL.so, not found (try using --rpath)

Where are these libraries found on your system?

One thing that should work, is use the output of sdl-config --static-libs
instead of sdl-config --libs

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

Where are these libraries found on your system?

/usr/X11R6/lib/libX11.so.6
/usr/X11R6/lib/libXext.so.6

However libesd.so.2 and libaudiofile.so.0 are not included in starnard-netbsd 1.5*.
The libesd belongs to the enlighment sound daemon, i suppose ( which i do not use ).
Whereas libaudiofiles seems to belong to any other sounddaemon ( alsa ? ).
I’ll try to get these libs and retry compiling fire.c .

One thing that should work, is use the output of sdl-config --static-libs instead of sdl-config --libs

bash-2.05# gcc fire.c -o fire sdl-config --cflags --static-libs
/usr/local/lib/libSDL.so: undefined reference to pthread_yield_np' /usr/local/lib/libSDL.so: undefined reference to__pthread_select’
collect2: ld returned 1 exit status

hmmmmmmmm…maybe the problem here is the non-complete build of the sdllib ? (–disable-joystick)

regards and thanks for advise, robert