Problems - SDL on NetBSD

Hello, list,

I’m trying to build Aleph One on NetBSD/mac68k. It requires SDL, SDL_image, and
SDL_net. I read about the NetBSD patch for pthreads earlier this month, and
thus managed to get SDL to build and install using (yesterday’s) cvs as long as
I configured with the joystick disabled. (I won’t be using one, so hopefully
this is OK?) However, SDL_image and SDL_net seem unable to find/use it. Both
give this error:

checking for a BSD-compatible install… /usr/bin/install -c
checking for sdl-config… /usr/local/bin/sdl-config
checking for SDL - version >= 1.2.4… 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.2.4 not found!

When I look in the config.log (for SDL_image), it stopped after this:

configure:20476: result: /usr/bin/install -c
configure:20550: checking for sdl-config
configure:20568: found /usr/local/bin/sdl-config
configure:20581: result: /usr/local/bin/sdl-config
configure:20589: checking for SDL - version >= 1.2.4
configure:20679: gcc -o conftest -g -O2 -I/usr/local/include/SDL -I/usr/include
-D_REENTRANT -D_THREAD_SAFE -I/usr/pkg/include -L/usr/pkg/lib conftest.c -L/usr
/local/lib -lSDL -L/usr/lib -lpthread -lm -L/usr/X11R6/lib >&5
/usr/local/lib/libSDL.so: undefined reference to pthread_yield_np' configure:20682: $? = 1 configure: program exited with status 1 configure: failed program was: [snip actual program] configure:20709: result: no configure:20747: gcc -o conftest -g -O2 -I/usr/local/include/SDL -I/usr/include -D_REENTRANT -D_THREAD_SAFE -I/usr/pkg/include -L/usr/pkg/lib conftest.c -L/usr /local/lib -lSDL -L/usr/lib -lpthread -lm -L/usr/X11R6/lib >&5 /usr/local/lib/libSDL.so: undefined reference topthread_yield_np’
configure:20753: $? = 1
configure: failed program was:
[snip actual program]
configure:20794: error: *** SDL version 1.2.4 not found!

The SDL_net log looks pretty much the same with different line numbers. I don’t
know what this “pthread_yield_np” is or why my SDL build has an undefined
reference to it. Any ideas appreciated.

Thanks,
Tim–
Tim Larson
Web Application Engineer
ElectricShoes Productions

Hi Tim,

The pkgsrc guys have done many patches for the SDL lib (1.2.9), to be able
to build them as packages.

you can have a look at them here :
ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/devel/SDL/patches/
there might be one for the pthread yield stuff… unless it is a "current"
issue only…
Looks like there is no patches for SDL_net and SDL_image.

So if you dont need the current CVS version of SDL, you might consider
installing SDL (1.2.9), SDL_image(1.2.4) and SDL_net(1.2.5) using pkgsrc
(yes you can build them from source with the options you want).
Otherwise, well you might have to patch the current CVS version manually and
carefully…

2005/12/31, Tim Larson :>

Hello, list,

I’m trying to build Aleph One on NetBSD/mac68k. It requires SDL,
SDL_image, and
SDL_net. I read about the NetBSD patch for pthreads earlier this month,
and
thus managed to get SDL to build and install using (yesterday’s) cvs as
long as
I configured with the joystick disabled. (I won’t be using one, so
hopefully
this is OK?) However, SDL_image and SDL_net seem unable to find/use
it. Both
give this error:

checking for a BSD-compatible install… /usr/bin/install -c
checking for sdl-config… /usr/local/bin/sdl-config
checking for SDL - version >= 1.2.4… no
*** Could not run SDL test program, checking why…
*** The test program failed to compile or link. See the file config.logfor 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.2.4 not found!

When I look in the config.log (for SDL_image), it stopped after this:

configure:20476: result: /usr/bin/install -c
configure:20550: checking for sdl-config
configure:20568: found /usr/local/bin/sdl-config
configure:20581: result: /usr/local/bin/sdl-config
configure:20589: checking for SDL - version >= 1.2.4
configure:20679: gcc -o conftest -g -O2 -I/usr/local/include/SDL
-I/usr/include
-D_REENTRANT -D_THREAD_SAFE -I/usr/pkg/include -L/usr/pkg/lib conftest.c
-L/usr
/local/lib -lSDL -L/usr/lib -lpthread -lm -L/usr/X11R6/lib >&5
/usr/local/lib/libSDL.so: undefined reference to pthread_yield_np' configure:20682: $? = 1 configure: program exited with status 1 configure: failed program was: [snip actual program] configure:20709: result: no configure:20747: gcc -o conftest -g -O2 -I/usr/local/include/SDL -I/usr/include -D_REENTRANT -D_THREAD_SAFE -I/usr/pkg/include -L/usr/pkg/lib conftest.c -L/usr /local/lib -lSDL -L/usr/lib -lpthread -lm -L/usr/X11R6/lib >&5 /usr/local/lib/libSDL.so: undefined reference topthread_yield_np’
configure:20753: $? = 1
configure: failed program was:
[snip actual program]
configure:20794: error: *** SDL version 1.2.4 not found!

The SDL_net log looks pretty much the same with different line numbers. I
don’t
know what this “pthread_yield_np” is or why my SDL build has an undefined
reference to it. Any ideas appreciated.

Thanks,
Tim

Tim Larson
Web Application Engineer
ElectricShoes Productions


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

Asmodehn Shade wrote:

The pkgsrc guys have done many patches for the SDL lib (1.2.9), to be able
to build them as packages.

I had problems with the source package last time I grabbed it (July?).
That’s why I was trying the latest CVS. I just got the new 2005Q4
tarball, so I’ll try again. Hopefully it has fixes for whatever the
issue was then that I’ve since forgotten.

you can have a look at them here :
ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/devel/SDL/patches/
there might be one for the pthread yield stuff… unless it is a "current"
issue only…
Looks like there is no patches for SDL_net and SDL_image.

So if you dont need the current CVS version of SDL, you might consider
installing SDL (1.2.9), SDL_image(1.2.4) and SDL_net(1.2.5) using pkgsrc
(yes you can build them from source with the options you want).

How do I build with options from packages? There’s no ./configure step
when using pkgsrc. I don’t know that I need any particular options set,
except that I couldn’t get CVS to build until I used --disable-joystick
as I mentioned.

Otherwise, well you might have to patch the current CVS version manually and
carefully…

Thanks much,
Tim

Well usually I have a look in the package Makefile :
ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/devel/SDL/Makefile.common
And I change the CONFIGURS_ARGS from there or in the env, if it is really
needed.

The other way is to fetch the files, then once uncompressed go to the work
directory, and build it manually with a ./configure (options) && make, then
back to the package level for make install…

Have fun !

2006/1/2, Timothy Larson :>

Asmodehn Shade wrote:

The pkgsrc guys have done many patches for the SDL lib (1.2.9), to be
able
to build them as packages.

I had problems with the source package last time I grabbed it (July?).
That’s why I was trying the latest CVS. I just got the new 2005Q4
tarball, so I’ll try again. Hopefully it has fixes for whatever the
issue was then that I’ve since forgotten.

you can have a look at them here :
ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/devel/SDL/patches/
there might be one for the pthread yield stuff… unless it is a
"current"
issue only…
Looks like there is no patches for SDL_net and SDL_image.

So if you dont need the current CVS version of SDL, you might consider
installing SDL (1.2.9), SDL_image(1.2.4) and SDL_net(1.2.5) using pkgsrc
(yes you can build them from source with the options you want).

How do I build with options from packages? There’s no ./configure step
when using pkgsrc. I don’t know that I need any particular options set,
except that I couldn’t get CVS to build until I used --disable-joystick
as I mentioned.

Otherwise, well you might have to patch the current CVS version manually
and
carefully…

Thanks much,
Tim


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

Asmodehn Shade wrote:

Well usually I have a look in the package Makefile :
ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/devel/SDL/Makefile.common
And I change the CONFIGURS_ARGS from there or in the env, if it is really
needed.

The other way is to fetch the files, then once uncompressed go to the work
directory, and build it manually with a ./configure (options) && make, then
back to the package level for make install…

I was able to build all three from the latest (2005q4) pkgsrc without
any special options. Thanks for your help!

Tim

Hi Tim,

The pkgsrc guys have done many patches for the SDL lib (1.2.9), to be able
to build them as packages.

you can have a look at them here :
ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/devel/SDL/patches/

I’ve added a note in Bugzilla to remind us to take a look at these:
https://bugzilla.libsdl.org/show_bug.cgi?id=52

Thanks!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment