Author Topic: OpenBSD OpenAL configure test fix  (Read 3169 times)

0 Members and 1 Guest are viewing this topic.

Offline rsaxvc

  • 27
    • rsaxvc
OpenBSD OpenAL configure test fix
configure's OpenAL test fails on OpenBSD due to not linking in libpthread. The attached patch just adds -lpthread to the OpenAL test. It doesn't currently not limit itself to OpenBSD, but I don't think it'll hurt any other unix-based systems to have it on there.

[attachment deleted by an evil time traveler]

 

Offline rsaxvc

  • 27
    • rsaxvc
Re: OpenBSD OpenAL configure test fix
Perhaps this is an OpenAL problem? Should libopenal be specifying that it needs libpthreads? Is there a way to do that?

 

Offline niffiwan

  • 211
  • Eluder Class
Re: OpenBSD OpenAL configure test fix
hmm... I think we'll need to update configure.ac rather than the acinclude.m4?  Although I'm not 100% sure why the following statement isn't working for OpenBSD, when it seems so be working for FreeBSD...

Code: (configure.ac:456) [Select]
dnl Posix Threads
AC_SEARCH_LIBS([pthread_mutex_timedlock], [pthread])
FS2_LIBS=$FS2_LIBS" -lpthread"
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline rsaxvc

  • 27
    • rsaxvc
Re: OpenBSD OpenAL configure test fix
so, fs2 builds fine once the configure check passes(-lpthreads applied correctly). My patch only adds '-lpthreads' to the OpenAL test case. Should the OpenAL test case be affected by FS2_LIBS? The OpenAL test case also uses $LIBS, but I'm not sure where that comes from.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: OpenBSD OpenAL configure test fix
I have OpenAL Soft installed on my FreeBSD environment, but apparently they also provide openal-20060211_12 in the ports system, which I don't have installed.  If this is the newest OpenBSD, the only OpenAL package I'm seeing is openal-1.15.1v0, which should be OpenAL Soft.  So I'm not sure why the same config isn't working on both platforms.  If it's an older system or somehow the older OpenAL reference library, I'm not sure what kinds of differences there are between those releases.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline rsaxvc

  • 27
    • rsaxvc
Re: OpenBSD OpenAL configure test fix
chief, can you run ldd against yours?

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: OpenBSD OpenAL configure test fix
Here ya go.

[cliff@ghostbsd ~]$ ldd /usr/local/lib/libopenal.so.1.15.1
/usr/local/lib/libopenal.so.1.15.1:
   libthr.so.3 => /lib/libthr.so.3 (0x80124b000)
   libm.so.5 => /lib/libm.so.5 (0x80146e000)
   libc.so.7 => /lib/libc.so.7 (0x80081b000)
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline rsaxvc

  • 27
    • rsaxvc
Re: OpenBSD OpenAL configure test fix
Ah-ha! I suspect on FreeBSD that the OpenAL test program is linking against libthr, and I think that's a pthread implementation.

OpenBSD 5.2's libopenal.so doesn't have that listed, so we'll want to add -lpthread to the build flags for that test.