[MacPorts] #26446: openal 1.3 on Tiger: invalid conversion from 'volatile int32_t*' to 'int32_t*'
#26446: openal 1.3 on Tiger: invalid conversion from 'volatile int32_t*' to 'int32_t*' -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: openal -------------------------------------+-------------------------------------- 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*)' }}} -- Ticket URL: <http://trac.macports.org/ticket/26446> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26446: openal 1.3 on Tiger: invalid conversion from 'volatile int32_t*' to 'int32_t*' -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: tiger | Port: openal -------------------------------------+-------------------------------------- Changes (by jmr@…): * keywords: => tiger -- Ticket URL: <https://trac.macports.org/ticket/26446#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26446: openal 1.3 on Tiger: invalid conversion from 'volatile int32_t*' to 'int32_t*' -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: tiger | Port: openal -------------------------------------+-------------------------------------- Comment(by rudloff@…): I have added a log. -- Ticket URL: <https://trac.macports.org/ticket/26446#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#26446: openal 1.3 on Tiger: invalid conversion from 'volatile int32_t*' to 'int32_t*' ---------------------------+-------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Resolution: | Keywords: tiger Port: openal | ---------------------------+-------------------------------- Comment (by blair@…): 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 [http://developer.apple.com/library/mac/samplecode/CoreAudioUtilityClasses/Li... 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! -- Ticket URL: <https://trac.macports.org/ticket/26446#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts