Opened 15 years ago
Closed 14 years ago
#23938 closed defect (fixed)
bochs: error: 'kAudioUnitComponentType' was not declared in this scope
Reported by: | jjh13@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.2 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt), ovidiu.ciule@…, wcmiii@…, domiman@… | |
Port: | bochs |
Description
Trying to build on Snow Leopard fails with the following output:
Warning: Skipping upgrade since ncursesw 5.7_0 >= ncursesw 5.7_0, even though installed variants "" do not match "+darwin_10". Use 'upgrade --enforce-variants' to switch to the requested variants. Warning: Skipping upgrade since ncurses 5.7_0 >= ncurses 5.7_0, even though installed variants "" do not match "+darwin_10". Use 'upgrade --enforce-variants' to switch to the requested variants. ---> Computing dependencies for bochs ---> Building bochs Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_emulators_bochs/work/bochs-2.3.7" && /usr/bin/make -j2 all " returned error 2 Command output: rm -rf test_hfsplus /bin/sh ./libtool --mode=link /usr/bin/g++-4.2 -o bximage -O2 -arch i386 -fpascal-strings -fno-common -Wno-four-char-constants -Wno-unknown-pragmas -Dmacintosh -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -L/opt/local/lib misc/bximage.o mkdir .libs /usr/bin/g++-4.2 -o bximage -O2 -arch i386 -fpascal-strings -fno-common -Wno-four-char-constants -Wno-unknown-pragmas -Dmacintosh -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES misc/bximage.o -Wl,-bind_at_load -L/opt/local/lib /bin/sh ./libtool --mode=link /usr/bin/g++-4.2 -o bxcommit -O2 -arch i386 -fpascal-strings -fno-common -Wno-four-char-constants -Wno-unknown-pragmas -Dmacintosh -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -L/opt/local/lib misc/bxcommit.o /usr/bin/g++-4.2 -o bxcommit -O2 -arch i386 -fpascal-strings -fno-common -Wno-four-char-constants -Wno-unknown-pragmas -Dmacintosh -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES misc/bxcommit.o -Wl,-bind_at_load -L/opt/local/lib soundosx.cc: In member function 'virtual int bx_sound_osx_c::openmidioutput(char*)': soundosx.cc:97: error: 'kAudioUnitComponentType' was not declared in this scope soundosx.cc:98: error: 'kAudioUnitSubType_MusicDevice' was not declared in this scope soundosx.cc:99: error: 'kAudioUnitID_DLSSynth' was not declared in this scope soundosx.cc:102: warning: 'AUGraphNewNode' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:673) soundosx.cc:102: warning: 'AUGraphNewNode' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:673) soundosx.cc:106: error: 'kAudioUnitSubType_Output' was not declared in this scope soundosx.cc:107: error: 'kAudioUnitID_DefaultOutput' was not declared in this scope soundosx.cc:110: warning: 'AUGraphNewNode' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:673) soundosx.cc:110: warning: 'AUGraphNewNode' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:673) soundosx.cc:121: warning: 'AUGraphGetNodeInfo' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:687) soundosx.cc:121: warning: 'AUGraphGetNodeInfo' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:687) soundosx.cc: In member function 'virtual int bx_sound_osx_c::openwaveoutput(char*)': soundosx.cc:187: warning: 'OpenDefaultAudioOutput' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/DefaultAudioOutput.h:26) soundosx.cc:187: warning: 'OpenDefaultAudioOutput' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/DefaultAudioOutput.h:26) soundosx.cc:192: error: 'AudioUnitInputCallback' was not declared in this scope soundosx.cc:192: error: expected `;' before 'input' soundosx.cc:193: error: 'input' was not declared in this scope soundosx.cc:195: error: 'kAudioUnitProperty_SetInputCallback' was not declared in this scope soundosx.cc: In function 'OSStatus MyRenderer(void*, AudioUnitRenderActionFlags, const AudioTimeStamp*, UInt32, AudioBuffer*)': soundosx.cc:369: warning: 'AudioConverterFillBuffer' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AudioConverter.h:640) soundosx.cc:369: warning: 'AudioConverterFillBuffer' is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AudioConverter.h:640) make[1]: *** [soundosx.o] Error 1 make: *** [iodev/libiodev.a] Error 2
Change History (12)
comment:1 Changed 15 years ago by jmroot (Joshua Root)
comment:2 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
Maybe not, but it doesn't build for me either, and updating to 2.4.2 doesn't change the error.
comment:3 Changed 15 years ago by patricio.moro@…
The same happened to me, but with a fresh install of Snow Leopard (System Version:Mac OS X 10.6.3 Kernel Version: Darwin 10.3.0) and Xcode3.2.2 I'm trying bochs 2.4.2
comment:4 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | Bochs 2.3.7 doesn't compile → bochs: error: 'kAudioUnitComponentType' was not declared in this scope |
---|
comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
I reported this problem to the developers but they apparently have nobody developing on Mac so anybody greatly interested in seeing this fixed should try to do so themselves and send the patch to the developers and MacPorts.
comment:9 Changed 14 years ago by instinc@…
Well good news everyone. After a bit of fiddling in the sources, the Portfile and rebuilding all my ports, I got Bochs to build! Unfortunately I had to disable sound support and switch the GUI to wxWidget; but otherwise seems to work.
So, here's what I had to do to get there: 1.) Modify the Portfile /opt/local/var/macports/sources/rsync.macports.org/release/ports/emulators/bochs/Portfile
1.1) Change the configure arguments to remove sound and use wxWidget for the GUI:
... configure.args --exec-prefix=${prefix} \ --bindir=${prefix}/bin \ --mandir=${prefix}/share/man \ --enable-all-optimizations \ --enable-vbe \ --enable-cdrom \ --with-wx ...
note: feel free to add or remove other options, PCI support, ACPI, etc. 1.2)Because we are not following the standard MacOS build of Bochs, the resulting executable file is not the same as originally planned, so also change the post-destroot code to:
post-destroot { xinstall -d ${destroot}${prefix}/share/bochs file copy ${worksrcpath}/bochs ${destroot}${prefix}/share/bochs system "ln -s ${prefix}/share/bochs/bochs ${destroot}${applications_dir}/bochs.app" xinstall -W ${worksrcpath} bochs bximage bxcommit ${destroot}${prefix}/bin # reinplace "s|\$BXSHARE/|${prefix}/share/bochs/|g" \ # ${destroot}${prefix}/share/bochs/bochsrc-sample.txt }
1.3) We will also need a small patch file for wxmain.cc to compile properly:
patchfiles patch-.bochsrc.diff \ patch-gui-wxmain.cc.diff
2) Create the following file /opt/local/var/macports/sources/rsync.macports.org/release/ports/emulators/bochs/files/patch-gui-wxmain.cc.diff
--- gui/wxmain.cc.orig 2010-11-16 21:03:56.000000000 -0500 +++ gui/wxmain.cc 2010-11-16 21:02:40.000000000 -0500 @@ -76,9 +76,9 @@ //#include "bitmaps/configbutton.xpm" #include "bitmaps/userbutton.xpm" #include "bitmaps/saverestore.xpm" -#ifdef __WXGTK__ +//#ifdef __WXGTK__ #include "icon_bochs.xpm" -#endif +//#endif // FIXME: ugly global variables that the bx_gui_c object in wx.cc can use // to access the MyFrame and the MyPanel.
3) Last but not least, update your /opt/local/etc/macports/macports.conf file to build all your ports in 32bits:
... build_arch i386
4) cross your fingers then run: port install bochs
After a while if you were lucky you will have a usable /opt/local/bin/bochs executable file. Note that you will need to have a usable configuration file in either the local directory or your home directory. Let me know how it goes for you.
comment:10 Changed 14 years ago by instinc@…
note: when you are changing the build_arch, you will have to uninstall all installed ports then re-install them. To view your installed ports:
$ port installed
Then to remove them....
$ port uninstall packagename
Cheers and good luck!
comment:11 Changed 14 years ago by instinc@…
One can also use the SDL library; change the --with-wx for --with-sdl in the Portfile, and make sure to install libsdl prior to installing bochs.
comment:12 Changed 14 years ago by raimue (Rainer Müller)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Disabled sound support and switched to X11 frontend in r75891-75894.
You don't appear to have followed the Migration procedure after upgrading to Snow Leopard.