Opened 14 years ago

Last modified 3 years ago

#26446 new defect

openal 1.3 on Tiger: invalid conversion from 'volatile int32_t*' to 'int32_t*'

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: tiger Cc: rudloff@…, cooljeanius (Eric Gallager)
Port: openal

Description

openal 1.3 doesn't build on Tiger. 1.0 did.

CompileC build/OpenAL.build/Deployment/OpenAL.build/Objects-normal/i386/oalImp.o /opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX/oalImp.cpp normal i386 c++ com.apple.compilers.gcc.4_0
    cd /opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX
    /Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -gfull -Os -fmessage-length=0 -fvisibility-inlines-hidden -mmacosx-version-min=10.4 -I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX/build/OpenAL.build/Deployment/OpenAL.build/OpenAL.hmap -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX/build/Deployment -I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX/build/Deployment/include -I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX/build/OpenAL.build/Deployment/OpenAL.build/DerivedSources -D__MACOSX__ -c /opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX/oalImp.cpp -o /opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX/build/OpenAL.build/Deployment/OpenAL.build/Objects-normal/i386/oalImp.o
/opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX/oalDevice.h: In member function 'void OALDevice::SetInUseFlag()':
/opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX/oalDevice.h:84: error: invalid conversion from 'volatile int32_t*' to 'int32_t*'
/opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_openal/work/openal-1.3/OpenAL-MacOSX/oalDevice.h:84: error:   initializing argument 1 of 'int32_t OSAtomicIncrement32Barrier(int32_t*)'

Attachments (1)

main.log (127.8 KB) - added by rudloff@… 13 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 13 years ago by rudloff@…

Cc: rudloff@… added

Cc Me!

comment:2 Changed 13 years ago by jmroot (Joshua Root)

Keywords: tiger added

Changed 13 years ago by rudloff@…

Attachment: main.log added

comment:3 Changed 13 years ago by rudloff@…

I have added a log.

comment:4 Changed 11 years ago by Raptor007 (Raptor007)

Sad to see this has been hanging in limbo since 2010, but I fixed this on my G5 Tiger system with a few small edits to the .cpp and .h files! Unfortunately after a successful build, it wiped out the sources in the work directory. Drat, I was excited to make some .diff files for you. Here's roughly what I did:

Anywhere it said "invalid conversion from volatile int32_t* to int32_t*", I cast the parameter as int32_t*, like so:

OSAtomicIncrement32Barrier( (int32_t*) &whateverTheArgWas );

The 10.5+ version of CoreAudioType.h defines kAudioChannelLayoutTag_AudioUnit_7_0_Front, but the 10.4 version doesn't. So I added it to the top of oalDevice.cpp:

#define kAudioChannelLayoutTag_AudioUnit_7_0_Front ((148L<<16) | 7)

Apparently the CAMutex class is included from /Developer/Examples, with a different set of features depending on your OSX/Xcode version. Yikes, what a mess. Instead of using CAMutex::Tryer (which doesn't exist in the Xcode2 version), I popped the relevant code straight into oalContext.cpp:

//CAMutex::Tryer tryer(mSourceMapLock); // REMOVED

//if (tryer.HasLock()) // REMOVED

bool mNeedsRelease = false; // ADDED
if( mSourceMapLock.Try(mNeedsRelease) ) // ADDED
{
    newSource = mSourceMap->Get(inSourceToken); // UNCHANGED
    
    if (newSource) // UNCHANGED
        newSource->SetInUseFlag(); // UNCHANGED
}
if( mNeedsRelease ) // ADDED
    mSourceMapLock.Unlock(); // ADDED

// ... and do it again for mDeadSourceMapLock

After all that, I was able to build it on my G5 with the +universal option. Woohoo!

Version 1, edited 11 years ago by Raptor007 (Raptor007) (previous) (next) (diff)

comment:5 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.