[Csnd] Building Csound on Mac OS X Lion
Date | 2011-11-28 18:39 |
From | hcenteno |
Subject | [Csnd] Building Csound on Mac OS X Lion |
Hello, I'm planning on coming back to using Csound more after a Max/MSP period. Long time since the last time I built Csound from source and I can see some things have changed. Browsing the source I found a new installer directory that contains scripts for Mac OS for building and packaging Csound. I'm not sure if this would be the best way to go about building and installing in Mac OS, but I got it to work and generated a usable package. I did some changes to the release-build-10.7.sh script in order to get STK and Loris included but I came across a couple of problems that I would like to share here. First, I had trouble with the libpng library not getting detected and found that the detection was failing because the Scons test for that library was including "-framework CsoundLib" as a requirement, which obviously doesn't exist yet. I fixed it by moving the section of the code that detects libpng above the definition of the libCsoundLinkFlags variable in the SConstruct file. Second, my build works fine using csd files (and runs all the QuteCsound examples) but I get a segmentation fault when trying to open orq/sco pairs, with no other eror messages. I tried a few of these from the Csound Book CD compilation and wasn't able to make them work (and on a related note, some of the examples from that CD didn't work as csd either but due to syntax errors in the score, I guess things have changed over time?). I tested using the official 5.14 Mac OS package available on Sourceforge and the orq/sco files worked fine so I wonder if this is related to the way I built it. For example: CoreMIDI real time MIDI plugin for Csound PortMIDI real time MIDI plugin for Csound PortAudio real-time audio module for Csound virtual_keyboard real time MIDI plugin for Csound 0dBFS level = 32768.0 Csound version 5.14 (float samples) Nov 28 2011 libsndfile-1.0.25 orchname: arpeggio.orc graph init Error: define environment variable RAWWAVE_PATH (points to rawwaves directory) to use STK opcodes. rtaudio: PortAudio module enabled ... using callback interface rtmidi: PortMIDI module enabled orch compiler: Csound tidy up: Segmentation fault These are the flags I used for building: CC=gcc-4.2 CXX=g++-4.2 gcc4opt=universalX86 useFLTK=1 includeMP3=1 noDebug=1 buildInterfaces=1 buildStkOpcodes=1 buildPythonOpcodes=1 buildRelease=1 buildTclcsound=1 buildPDClass=1 useOSC=1 buildNewParser=1 dynamicCsoundLibrary=1 buildVirtual=1 useJack=1 buildCsoundAC=1 useGettext=0 buildBeats=1 NewParserDebug=0 buildPythonWrapper=1 buildMultiCore=1 buildJavaWrapper=1 buildLuaOpcodes=0 useDouble=1 Is the version on Sourceforge built with multicore and new parser? Could the new parser be the cause? Thanks! Hector -- View this message in context: http://csound.1045644.n5.nabble.com/Building-Csound-on-Mac-OS-X-Lion-tp5029710p5029710.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-11-28 19:20 |
From | Steven Yi |
Subject | Re: [Csnd] Building Csound on Mac OS X Lion |
Hi Hector, Good to see you around again! The orc/sco issue may be related to some work that was done recently involving removing use of temp files. Are you using the latest from git? As for the installer, it's the fully automated script Victor and I put together. It's somewhat customized for my Macbook Pro, so undoubtedly changes would be required. For the scons changes, if you could send a patch or commit that to git that'd be great. I think next release I may switch to using Cmake for the build though, but it's not certain yet. Thanks! steven On Mon, Nov 28, 2011 at 6:39 PM, hcenteno |
Date | 2011-11-28 23:04 |
From | hcenteno |
Subject | [Csnd] Re: Building Csound on Mac OS X Lion |
Hello Steven, Thanks for your reply. I was just about to create a patch and found that the SConstruct file has been already fixed by someone else and has no issues with detecting the png library. Regarding the orc/sco problem, yes, I built from SVN (Nov 27). I'll rebuild in a few days and check again. I was also wondering what the best practice would be for including the raw wave files, required by the STK opcodes, in the final pkg installer. I modified the release-build-10.7.sh script so it copied the raw waves into the samples directory inside the Framework directories (for single and double), together with the HRTF files. Would this be the appropriate place where to put them? Do you have planned to include the STK opcodes in the next official package release? I built the Loris opcodes too but I haven't actually ever used them so I wonder if they are already superseded by newer opcodes. Are both the STK and Loris not included in the official release due to being already considered obsolete? Cheers! Hector -- View this message in context: http://csound.1045644.n5.nabble.com/Building-Csound-on-Mac-OS-X-Lion-tp5029710p5030456.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-11-29 03:05 |
From | Adam Puckett |
Subject | Re: [Csnd] Re: Building Csound on Mac OS X Lion |
The reason Loris and STK aren't included is probably because they're third party libraries. I guess libpng is standard on most OSes and so is used by default. On 11/28/11, hcenteno |
Date | 2011-11-29 11:21 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] [Csnd] Re: Building Csound on Mac OS X Lion |
Can someone test the orc/sco version on the git code? It worked in my tests so I wopuld like reports wih examples/outpurs please ==John (on developer list) > Hello Steven, > > Thanks for your reply. I was just about to create a patch and found that > the > SConstruct file has been already fixed by someone else and has no issues > with detecting the png library. > > Regarding the orc/sco problem, yes, I built from SVN (Nov 27). I'll > rebuild > in a few days and check again. > ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2011-11-29 20:39 |
From | hcenteno |
Subject | [Csnd] Re: Building Csound on Mac OS X Lion |
Hi Steven, I actually spoke too quick. I just did a SVN checkout and found the same png detection problem, which again I fixed by modifying the SConstruct file. I'm pasting the patch below (not sure if this list accepts attachments), in case it's of any help. This change also fixed an error I was having when using the release-build-10.7.sh script and the building of Opcodes/ampmidid.os requiring -Framework CsoundLib when it didn't exist yet. Cheers, Hector --- /Users/hector/software_dev/csound5_installer/installer/macosx/2011-11-29-145021/csound5/SConstruct 2011-11-29 14:52:03.000000000 -0500 +++ /Users/hector/software_dev/csound5_installer/installer/macosx/2011-11-29-135719/csound5/SConstruct 2011-11-29 14:53:16.000000000 -0500 @@ -1220,6 +1220,25 @@ if commonEnvironment['buildNewParser'] != '0' or commonEnvironment['buildMultiCore'] != '0': libCsoundSources += newParserSources +pluginEnvironment = commonEnvironment.Clone() +pluginEnvironment.Append(LIBS = Split('sndfile')) +if mpafound: + pluginEnvironment.Append(LIBS = ['mpadec']) + +if commonEnvironment['buildImageOpcodes'] == '1': + if getPlatform() == 'win32': + if configure.CheckLibWithHeader("fltk_png", "png.h", language="C") and zlibhfound: + print 'CONFIGURATION DECISION: Building image opcodes' + pluginEnvironment.Append(LIBS= Split(''' fltk_png fltk_z ''')) + makePlugin(pluginEnvironment, 'image', ['Opcodes/imageOpcodes.c']) + else: + if configure.CheckLibWithHeader("png", "png.h", language="C") and zlibhfound: + print 'CONFIGURATION DECISION: Building image opcodes' + pluginEnvironment.Append(LIBS= Split(''' png z ''')) + makePlugin(pluginEnvironment, 'image', ['Opcodes/imageOpcodes.c']) +else: + print 'CONFIGURATION DECISION: Not building image opcodes' + csoundLibraryEnvironment.Append(CCFLAGS='-fPIC') if commonEnvironment['dynamicCsoundLibrary'] == '1': print 'CONFIGURATION DECISION: Building dynamic Csound library' @@ -1286,11 +1305,6 @@ libCsoundLibs.append(csoundLibraryName) libs.append(csoundLibrary) -pluginEnvironment = commonEnvironment.Clone() -pluginEnvironment.Append(LIBS = Split('sndfile')) -if mpafound: - pluginEnvironment.Append(LIBS = ['mpadec']) - if getPlatform() == 'darwin': pluginEnvironment.Append(LINKFLAGS = Split(''' -framework CoreMidi -framework CoreFoundation -framework CoreServices -framework CoreAudio @@ -1748,20 +1762,6 @@ else: print 'CONFIGURATION DECISION: Not building linear algebra opcodes.' -if commonEnvironment['buildImageOpcodes'] == '1': - if getPlatform() == 'win32': - if configure.CheckLibWithHeader("fltk_png", "png.h", language="C") and zlibhfound: - print 'CONFIGURATION DECISION: Building image opcodes' - pluginEnvironment.Append(LIBS= Split(''' fltk_png fltk_z ''')) - makePlugin(pluginEnvironment, 'image', ['Opcodes/imageOpcodes.c']) - else: - if configure.CheckLibWithHeader("png", "png.h", language="C") and zlibhfound: - print 'CONFIGURATION DECISION: Building image opcodes' - pluginEnvironment.Append(LIBS= Split(''' png z ''')) - makePlugin(pluginEnvironment, 'image', ['Opcodes/imageOpcodes.c']) -else: - print 'CONFIGURATION DECISION: Not building image opcodes' - # FLTK widgets vstEnvironment = commonEnvironment.Clone() -- View this message in context: http://csound.1045644.n5.nabble.com/Building-Csound-on-Mac-OS-X-Lion-tp5029710p5033606.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-11-29 20:55 |
From | hcenteno |
Subject | Re: [Cs-dev] [Csnd] Re: Building Csound on Mac OS X Lion |
Hi John, I just rebuilt from git and keep getting segmentation faults when trying to use orc/sco pairs: $ csound arpeggio.orc arpeggio.sco CoreMIDI real time MIDI plugin for Csound PortMIDI real time MIDI plugin for Csound PortAudio real-time audio module for Csound virtual_keyboard real time MIDI plugin for Csound 0dBFS level = 32768.0 Csound version 5.14 (float samples) Nov 29 2011 libsndfile-1.0.25 orchname: arpeggio.orc graph init Error: define environment variable RAWWAVE_PATH (points to rawwaves directory) to use STK opcodes. rtaudio: PortAudio module enabled ... using callback interface rtmidi: PortMIDI module enabled orch compiler: Csound tidy up: Segmentation fault But works fine with csd files (created with the makecsd utility): $ csound arpeggio.csd CoreMIDI real time MIDI plugin for Csound PortMIDI real time MIDI plugin for Csound PortAudio real-time audio module for Csound virtual_keyboard real time MIDI plugin for Csound 0dBFS level = 32768.0 Csound version 5.14 (float samples) Nov 29 2011 libsndfile-1.0.25 UnifiedCSD: arpeggio.csd STARTING FILE Creating options Creating orchestra Creating score graph init Error: define environment variable RAWWAVE_PATH (points to rawwaves directory) to use STK opcodes. rtaudio: PortAudio module enabled ... using callback interface rtmidi: PortMIDI module enabled orch compiler: instr 1 Elapsed time at end of orchestra compile: real: 0.065s, CPU: 0.002s sorting score ... ... done Elapsed time at end of score sort: real: 0.073s, CPU: 0.002s Csound version 5.14 (float samples) Nov 29 2011 0dBFS level = 32768.0 orch now loaded audio buffered in 1024 sample-frame blocks writing 2048-byte blks of shorts to test.aif (AIFF) SECTION 1: ftable 1: B 0.000 .. 1.000 T 1.000 TT 1.000 M: 0.0 new alloc for instr 1: B 1.000 .. 21.000 T 21.000 TT 21.000 M: 22472.6 Score finished in csoundPerform(). inactive allocs returned to freespace end of score. overall amps: 22472.6 overall samples out of range: 0 0 errors in performance Elapsed time at end of performance: real: 1.689s, CPU: 0.278s 1024 2048 sample blks of shorts written to test.aif (AIFF) Same results with other orc/sco files from the Csound Book CD. I can send the orc/sco for this particular output if needed. Cheers, Hector -- View this message in context: http://csound.1045644.n5.nabble.com/Re-Csnd-Re-Building-Csound-on-Mac-OS-X-Lion-tp5032011p5033655.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2011-12-04 23:25 |
From | Steven Yi |
Subject | Re: [Csnd] Re: Building Csound on Mac OS X Lion |
Hi Hector, Just following up on emails as I'm a little behind. Was this ever merged into Git? If not, could you file a bug in the tracker so we don't lose track? (John and Victor have been very good about watching and looking after items in the tracker) Thanks! steven On Tue, Nov 29, 2011 at 8:39 PM, hcenteno |