Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#918 closed task (fixed)

Fix HOpenAL's bug that can't find OpenAL framework under Mac OS X

Reported by: guest Owned by: igloo
Priority: normal Milestone: 6.6.1
Component: libraries (other) Version: 6.4.2
Keywords: Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: N/A
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Some people who want to build GHC under Mac OS X platform find that HOpenAL's can't find OpenAL framework. And If they compare with some package's, they find OpenAL package's is different from OpenGL, GLUT and ALUT packages'.

shelarcy already made patch for its problem. How about apply this patch to fix HOpenGL's bug?

This patch fix Windows bug, too. Because uses CALLCONV=stdcall on *-mingw32 case, although it has comment like this: "NOTE: For some obscure/unknown reason, OpenAL uses ccall, even on WinDoze...".

Attachments (2)

openal-mac-os-x.patch (2.5 KB) - added by guest 12 years ago.
openal-mac-os-x-part-1.patch (2.6 KB) - added by thorkilnaur 12 years ago.
Mac OS X related part of openal-mac-os-x.patch

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by guest

Attachment: openal-mac-os-x.patch added

comment:1 Changed 12 years ago by igloo

Milestone: 6.6.1
Test Case: N/A

comment:2 Changed 12 years ago by thorkilnaur

Owner: set to thorkilnaur

comment:3 Changed 12 years ago by thorkilnaur

Since I am unable to test the Windows part of this patch, I have split off the Windows-related part of the patch and attached it to a new ticket: #1140. The Mac OS X-related part of the patch (attached file openal-mac-os-x-part-1.patch) has been tested with success on a PPC Mac OS X 10.4. The difference in the configure output before and after applying the patch is summarized here:

> checking build system type... powerpc-apple-darwin8.6.0
> checking host system type... powerpc-apple-darwin8.6.0
> checking target system type... powerpc-apple-darwin8.6.0
< checking for library containing alGenSources... no
< configure: WARNING: no OpenAL library found, so this package will not be built
> checking how to run the C preprocessor... gcc -E
> checking value of ALC_CAPTURE_SAMPLES... 786
< config.status: include/HsOpenALConfig.h is unchanged
< config.status: include/HsOpenAL.h is unchanged

The patch has also been tested on a (SuSE) Linux system to ensure that OpenAL is still detected. For Linux, the difference between the configure output before and after applying the patch is less marked, as we would expect:

> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking target system type... i686-pc-linux-gnu
< config.status: include/HsOpenALConfig.h is unchanged
< config.status: include/HsOpenAL.h is unchanged

I should stress that the above test has only served to ensure that OpenAL after the change is detected and that the OpenAL package is then being built. The functions of the OpenAL package have not been tested.

Based on this, I recommend that the attached patch openal-mac-os-x-part-1.patch is applied and the ticket closed. Ian, please ...?

Changed 12 years ago by thorkilnaur

Mac OS X related part of openal-mac-os-x.patch

comment:4 Changed 12 years ago by thorkilnaur

Owner: changed from thorkilnaur to igloo

comment:5 Changed 12 years ago by igloo

Resolution: fixed
Status: newclosed

Applied, thanks to everyone involved in writing and testing the patch!

comment:6 Changed 10 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:7 Changed 9 years ago by simonmar

difficulty: Easy (1 hr)Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.