Re: [PD] Building Pd App on OSX
Might be related to this: http://stackoverflow.com/questions/10111987/xcode-build-error-arm-apple-darwin11-gcc-4-2-1-execvp-no-such-file-or-director?rq=1 You probably need to explictly set CC. See this script which sets the ENV variables based on the SDK root: https://github.com/danomatika/apothecary/blob/master/scripts/apothecary/formulas/tess2/ios/build_ios.sh On Jul 28, 2013, at 10:14 PM, Jonathan Wilkes jancs...@yahoo.com wrote: Thanks. I've got the xcode-select and -isysroot pointing at the correct location. Any ideas on the error I'm getting (below)? -Jonathan cd ../obj; cc -Wl -framework CoreAudio -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI -arch i386 -arch ppc -o ../bin/pd g_canvas.o g_graph.o g_text.o g_rtext.o g_array.o g_template.o g_io.o g_scalar.o g_traversal.o g_guiconnect.o g_readwrite.o g_editor.o g_all_guis.o g_bang.o g_hdial.o g_hslider.o g_mycanvas.o g_numbox.o g_toggle.o g_vdial.o g_vslider.o g_vumeter.o m_pd.o m_class.o m_obj.o m_atom.o m_memory.o m_binbuf.o m_conf.o m_glob.o m_sched.o s_main.o s_inter.o s_file.o s_print.o s_loader.o s_path.o s_entry.o s_audio.o s_midi.o s_utf8.o d_ugen.o d_ctl.o d_arithmetic.o d_osc.o d_filter.o d_dac.o d_misc.o d_math.o d_fft.o d_array.o d_global.o d_delay.o d_resample.o x_arithmetic.o x_connective.o x_interface.o x_midi.o x_misc.o x_time.o x_acoustics.o x_net.o x_qlist.o x_gui.o x_list.o d_soundfile.o s_midi_pm.o s_audio_pa.o s_audio_paring.o ../portaudio/src/common/pa_allocation.o ../portaudio/src/common/pa_converters.o ../portaudio/src/common/pa_cpuload.o ../portaudio/src/common/pa_dither.o ../portaudio/src/common/pa_front.o ../portaudio/src/common/pa_process.o ../portaudio/src/common/pa_stream.o ../portaudio/src/common/pa_trace.o ../portaudio/src/common/pa_debugprint.o ../portaudio/src/common/pa_ringbuffer.o ../portaudio/src/os/unix/pa_unix_util.o ../portaudio/src/os/mac_osx/pa_mac_hostapis.o ../portaudio/src/hostapi/coreaudio/pa_mac_core.o ../portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.o ../portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.o ../portmidi/pm_mac/pmmac.o ../portmidi/pm_mac/pmmacosxcm.o ../portmidi/pm_common/pmutil.o ../portmidi/pm_common/portmidi.o ../portmidi/porttime/ptmacosx_cf.o d_fft_mayer.o d_fftroutine.o -ldl -lm -lpthread clang: warning: unknown warning option '-Wl' llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory clang: error: linker (via gcc) command failed with exit code 255 (use -v to see invocation) make: *** [../bin/pd] Error 255 macintosh-3:src David$ xcode-select -print-path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer Wee. You're lucky I just did a bunch of low level library compiling stuff on OSX/iOS for OpenFrameworks ... On Jul 27, 2013, at 5:51 AM, pd-list-request at iem.at wrote: From: Jonathan Wilkes jancsika at yahoo.com Subject: Re: [PD] Building Pd App on OSX Date: July 27, 2013 1:34:11 AM EDT To: Miller Puckette msp at ucsd.edu Cc: pd-list at iem.at pd-list at iem.at On 07/06/2013 06:18 PM, Miller Puckette wrote: Yeah... I originally assembled it by trial and error, starting from the Wish Shell app and changing stuff by trial and error. It might even be the case that the Wish Shell.app archive used by the script below can be replaced with your own local one... but I thought it safer to cache copy once I had it all working. After yet another wasted hour on a non-free OS, some questions regarding makefile.mac: * what is -O6? It throws an error right off the bat. (I changed it to -O3 to fix) * why is there -arch ppc as well as i386? By specifying multiple architectures, OSX will build a fat lib that supports them in a single binary. i386 + ppc is the old universal binary/lib. The new 10.7+ format is i386 + x86_64 so I'd suggest dropping the old format now as the vast majority of people are using newer Intel machines. * Why is there -isysroot? If I'm using Xcode 4.6 the directory specified after that flag in makefile.mac doesn't exist, and I get an error that stdlib.h doesn't exist. sysroot should point to the Mac OSX SDK location. For newer Xcodes, there is a commandline util that returns the path to the Xcode developer root: xcode-select -print-path. With Xcode 4.6, it returns: /Applications/Xcode.app/Contents/Developer For example, with the 10.8 SDK you can use this: $(xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/ Naturally, you can do a search in that SDKs folder and choose the last one to build for the latest SDK or simply use a shell variable: OSX_SDK_VER=10.8 SYSROOT=$(xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_SDK_VER.sdk/ * Any hint what -isysroot should be to find something as common
Re: [PD] Building Pd App on OSX
Wee. You're lucky I just did a bunch of low level library compiling stuff on OSX/iOS for OpenFrameworks ... On Jul 27, 2013, at 5:51 AM, pd-list-requ...@iem.at wrote: From: Jonathan Wilkes jancs...@yahoo.com Subject: Re: [PD] Building Pd App on OSX Date: July 27, 2013 1:34:11 AM EDT To: Miller Puckette m...@ucsd.edu Cc: pd-list@iem.at pd-list@iem.at On 07/06/2013 06:18 PM, Miller Puckette wrote: Yeah... I originally assembled it by trial and error, starting from the Wish Shell app and changing stuff by trial and error. It might even be the case that the Wish Shell.app archive used by the script below can be replaced with your own local one... but I thought it safer to cache copy once I had it all working. After yet another wasted hour on a non-free OS, some questions regarding makefile.mac: * what is -O6? It throws an error right off the bat. (I changed it to -O3 to fix) * why is there -arch ppc as well as i386? By specifying multiple architectures, OSX will build a fat lib that supports them in a single binary. i386 + ppc is the old universal binary/lib. The new 10.7+ format is i386 + x86_64 so I'd suggest dropping the old format now as the vast majority of people are using newer Intel machines. * Why is there -isysroot? If I'm using Xcode 4.6 the directory specified after that flag in makefile.mac doesn't exist, and I get an error that stdlib.h doesn't exist. sysroot should point to the Mac OSX SDK location. For newer Xcodes, there is a commandline util that returns the path to the Xcode developer root: xcode-select -print-path. With Xcode 4.6, it returns: /Applications/Xcode.app/Contents/Developer For example, with the 10.8 SDK you can use this: $(xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/ Naturally, you can do a search in that SDKs folder and choose the last one to build for the latest SDK or simply use a shell variable: OSX_SDK_VER=10.8 SYSROOT=$(xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_SDK_VER.sdk/ * Any hint what -isysroot should be to find something as common as stdlib.h? Yes, it contains all of the includes and libs for that particular SDK. * Is make -f makefile.mac supposed to compile using cc, gcc, or something else? gcc should be fine for now, you could target llvm-gcc if you want, but gcc isn't disappearing complete in the meantime. Dan Wilcox @danomatika danomatika.com robotcowboy.com ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Building Pd App on OSX
On 07/06/2013 06:18 PM, Miller Puckette wrote: Yeah... I originally assembled it by trial and error, starting from the Wish Shell app and changing stuff by trial and error. It might even be the case that the Wish Shell.app archive used by the script below can be replaced with your own local one... but I thought it safer to cache copy once I had it all working. After yet another wasted hour on a non-free OS, some questions regarding makefile.mac: * what is -O6? It throws an error right off the bat. (I changed it to -O3 to fix) * why is there -arch ppc as well as i386? * Why is there -isysroot? If I'm using Xcode 4.6 the directory specified after that flag in makefile.mac doesn't exist, and I get an error that stdlib.h doesn't exist. * Any hint what -isysroot should be to find something as common as stdlib.h? * Is make -f makefile.mac supposed to compile using cc, gcc, or something else? Slowly getting there, Jonathan cheers M On Sat, Jul 06, 2013 at 06:08:13PM -0400, Jonathan Wilkes wrote: On 07/06/2013 05:22 PM, Miller Puckette wrote: What I do (in effect): Get an existing Pd application As in download one of your prebuilt mac binaries? -Jonathan and remove all the Pd sources (Contents/Resources/src, bin, doc, tcl, portaudio, portmidi, extra, *.txt) then un-tar a source tarball into Contrnts/Resources, cd to src, and make -f makefile.mac (Actually, of course, I do this from a script. I have a pre-prepared tarball of an empty Pd app, and using that and a source tarball I run this shell file: ) - #!/bin/sh #usage: ./build 0.38-0 or 0.38-0test4 if test x$1 == x then echo usage: ./build 0.38-0 or 0.38-0test4 exit 1 fi if test -d Pd-$1.app then chmod -R 777 Pd-$1.app rm -rf Pd-$1.app fi tar xzf attic/wish-shell.tgz mv Wish Shell.app Pd-$1.app cd Pd-$1.app/Contents chmod 755 . rm -f Info.plist cp -p ../../attic/Info.plist . cd MacOS chmod 755 . mv Wish Shell Pd cd .. cd Resources chmod 755 . rm -f Wish.icns cp -p ../../../attic/pd.icns ../../../attic/pd-file.icns . mv Wish Shell.rsrc Pd.rsrc tar xzf ../../../pd-$1.src.tar.gz mv pd-$1/* . rmdir pd-$1 cd src make -f makefile.mac cd .. ln -s tcl Scripts chmod 555 . .. cd ../../.. pwd chmod 755 Pd-$1.app touch Pd-$1.app chmod 555 Pd-$1.app tar czf pd-$1.mac.tar.gz Pd-$1.app cheers M On Wed, Jul 03, 2013 at 07:00:48PM -0400, Jonathan Wilkes wrote: Miller et al, Once I get Pd built on OSX, I can make install so that pd from the terminal will launch it. But how do I make it into an App? Any hints? INSTALL.txt doesn't have anything. I'd like to get it building so that a) I can make use of all the goodies someone put into AppMain.tcl and b) post a working copy so people can try out the new Preferences dialog. Separate question: even for running pd from the terminal, why doesn't the AppMain.tcl stuff get used? For example, I still want to use the OSX Preferences panel, and set all the Apple specific stuff like About Pd in the App menu, regardless of how pd was started. (Though it's not a huge deal, as the vast majority would just be running the app.) Thanks, Jonathan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Building Pd App on OSX
What I do (in effect): Get an existing Pd application and remove all the Pd sources (Contents/Resources/src, bin, doc, tcl, portaudio, portmidi, extra, *.txt) then un-tar a source tarball into Contrnts/Resources, cd to src, and make -f makefile.mac (Actually, of course, I do this from a script. I have a pre-prepared tarball of an empty Pd app, and using that and a source tarball I run this shell file: ) - #!/bin/sh #usage: ./build 0.38-0 or 0.38-0test4 if test x$1 == x then echo usage: ./build 0.38-0 or 0.38-0test4 exit 1 fi if test -d Pd-$1.app then chmod -R 777 Pd-$1.app rm -rf Pd-$1.app fi tar xzf attic/wish-shell.tgz mv Wish Shell.app Pd-$1.app cd Pd-$1.app/Contents chmod 755 . rm -f Info.plist cp -p ../../attic/Info.plist . cd MacOS chmod 755 . mv Wish Shell Pd cd .. cd Resources chmod 755 . rm -f Wish.icns cp -p ../../../attic/pd.icns ../../../attic/pd-file.icns . mv Wish Shell.rsrc Pd.rsrc tar xzf ../../../pd-$1.src.tar.gz mv pd-$1/* . rmdir pd-$1 cd src make -f makefile.mac cd .. ln -s tcl Scripts chmod 555 . .. cd ../../.. pwd chmod 755 Pd-$1.app touch Pd-$1.app chmod 555 Pd-$1.app tar czf pd-$1.mac.tar.gz Pd-$1.app cheers M On Wed, Jul 03, 2013 at 07:00:48PM -0400, Jonathan Wilkes wrote: Miller et al, Once I get Pd built on OSX, I can make install so that pd from the terminal will launch it. But how do I make it into an App? Any hints? INSTALL.txt doesn't have anything. I'd like to get it building so that a) I can make use of all the goodies someone put into AppMain.tcl and b) post a working copy so people can try out the new Preferences dialog. Separate question: even for running pd from the terminal, why doesn't the AppMain.tcl stuff get used? For example, I still want to use the OSX Preferences panel, and set all the Apple specific stuff like About Pd in the App menu, regardless of how pd was started. (Though it's not a huge deal, as the vast majority would just be running the app.) Thanks, Jonathan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Building Pd App on OSX
On 07/06/2013 05:22 PM, Miller Puckette wrote: What I do (in effect): Get an existing Pd application As in download one of your prebuilt mac binaries? -Jonathan and remove all the Pd sources (Contents/Resources/src, bin, doc, tcl, portaudio, portmidi, extra, *.txt) then un-tar a source tarball into Contrnts/Resources, cd to src, and make -f makefile.mac (Actually, of course, I do this from a script. I have a pre-prepared tarball of an empty Pd app, and using that and a source tarball I run this shell file: ) - #!/bin/sh #usage: ./build 0.38-0 or 0.38-0test4 if test x$1 == x then echo usage: ./build 0.38-0 or 0.38-0test4 exit 1 fi if test -d Pd-$1.app then chmod -R 777 Pd-$1.app rm -rf Pd-$1.app fi tar xzf attic/wish-shell.tgz mv Wish Shell.app Pd-$1.app cd Pd-$1.app/Contents chmod 755 . rm -f Info.plist cp -p ../../attic/Info.plist . cd MacOS chmod 755 . mv Wish Shell Pd cd .. cd Resources chmod 755 . rm -f Wish.icns cp -p ../../../attic/pd.icns ../../../attic/pd-file.icns . mv Wish Shell.rsrc Pd.rsrc tar xzf ../../../pd-$1.src.tar.gz mv pd-$1/* . rmdir pd-$1 cd src make -f makefile.mac cd .. ln -s tcl Scripts chmod 555 . .. cd ../../.. pwd chmod 755 Pd-$1.app touch Pd-$1.app chmod 555 Pd-$1.app tar czf pd-$1.mac.tar.gz Pd-$1.app cheers M On Wed, Jul 03, 2013 at 07:00:48PM -0400, Jonathan Wilkes wrote: Miller et al, Once I get Pd built on OSX, I can make install so that pd from the terminal will launch it. But how do I make it into an App? Any hints? INSTALL.txt doesn't have anything. I'd like to get it building so that a) I can make use of all the goodies someone put into AppMain.tcl and b) post a working copy so people can try out the new Preferences dialog. Separate question: even for running pd from the terminal, why doesn't the AppMain.tcl stuff get used? For example, I still want to use the OSX Preferences panel, and set all the Apple specific stuff like About Pd in the App menu, regardless of how pd was started. (Though it's not a huge deal, as the vast majority would just be running the app.) Thanks, Jonathan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Building Pd App on OSX
Yeah... I originally assembled it by trial and error, starting from the Wish Shell app and changing stuff by trial and error. It might even be the case that the Wish Shell.app archive used by the script below can be replaced with your own local one... but I thought it safer to cache copy once I had it all working. cheers M On Sat, Jul 06, 2013 at 06:08:13PM -0400, Jonathan Wilkes wrote: On 07/06/2013 05:22 PM, Miller Puckette wrote: What I do (in effect): Get an existing Pd application As in download one of your prebuilt mac binaries? -Jonathan and remove all the Pd sources (Contents/Resources/src, bin, doc, tcl, portaudio, portmidi, extra, *.txt) then un-tar a source tarball into Contrnts/Resources, cd to src, and make -f makefile.mac (Actually, of course, I do this from a script. I have a pre-prepared tarball of an empty Pd app, and using that and a source tarball I run this shell file: ) - #!/bin/sh #usage: ./build 0.38-0 or 0.38-0test4 if test x$1 == x then echo usage: ./build 0.38-0 or 0.38-0test4 exit 1 fi if test -d Pd-$1.app then chmod -R 777 Pd-$1.app rm -rf Pd-$1.app fi tar xzf attic/wish-shell.tgz mv Wish Shell.app Pd-$1.app cd Pd-$1.app/Contents chmod 755 . rm -f Info.plist cp -p ../../attic/Info.plist . cd MacOS chmod 755 . mv Wish Shell Pd cd .. cd Resources chmod 755 . rm -f Wish.icns cp -p ../../../attic/pd.icns ../../../attic/pd-file.icns . mv Wish Shell.rsrc Pd.rsrc tar xzf ../../../pd-$1.src.tar.gz mv pd-$1/* . rmdir pd-$1 cd src make -f makefile.mac cd .. ln -s tcl Scripts chmod 555 . .. cd ../../.. pwd chmod 755 Pd-$1.app touch Pd-$1.app chmod 555 Pd-$1.app tar czf pd-$1.mac.tar.gz Pd-$1.app cheers M On Wed, Jul 03, 2013 at 07:00:48PM -0400, Jonathan Wilkes wrote: Miller et al, Once I get Pd built on OSX, I can make install so that pd from the terminal will launch it. But how do I make it into an App? Any hints? INSTALL.txt doesn't have anything. I'd like to get it building so that a) I can make use of all the goodies someone put into AppMain.tcl and b) post a working copy so people can try out the new Preferences dialog. Separate question: even for running pd from the terminal, why doesn't the AppMain.tcl stuff get used? For example, I still want to use the OSX Preferences panel, and set all the Apple specific stuff like About Pd in the App menu, regardless of how pd was started. (Though it's not a huge deal, as the vast majority would just be running the app.) Thanks, Jonathan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Building Pd App on OSX
On 07/06/2013 06:18 PM, Miller Puckette wrote: Yeah... I originally assembled it by trial and error, starting from the Wish Shell app and changing stuff by trial and error. It might even be the case that the Wish Shell.app archive used by the script below can be replaced with your own local one... but I thought it safer to cache copy once I had it all working. Ok, I'll give it a shot. Thanks! -Jonathan cheers M On Sat, Jul 06, 2013 at 06:08:13PM -0400, Jonathan Wilkes wrote: On 07/06/2013 05:22 PM, Miller Puckette wrote: What I do (in effect): Get an existing Pd application As in download one of your prebuilt mac binaries? -Jonathan and remove all the Pd sources (Contents/Resources/src, bin, doc, tcl, portaudio, portmidi, extra, *.txt) then un-tar a source tarball into Contrnts/Resources, cd to src, and make -f makefile.mac (Actually, of course, I do this from a script. I have a pre-prepared tarball of an empty Pd app, and using that and a source tarball I run this shell file: ) - #!/bin/sh #usage: ./build 0.38-0 or 0.38-0test4 if test x$1 == x then echo usage: ./build 0.38-0 or 0.38-0test4 exit 1 fi if test -d Pd-$1.app then chmod -R 777 Pd-$1.app rm -rf Pd-$1.app fi tar xzf attic/wish-shell.tgz mv Wish Shell.app Pd-$1.app cd Pd-$1.app/Contents chmod 755 . rm -f Info.plist cp -p ../../attic/Info.plist . cd MacOS chmod 755 . mv Wish Shell Pd cd .. cd Resources chmod 755 . rm -f Wish.icns cp -p ../../../attic/pd.icns ../../../attic/pd-file.icns . mv Wish Shell.rsrc Pd.rsrc tar xzf ../../../pd-$1.src.tar.gz mv pd-$1/* . rmdir pd-$1 cd src make -f makefile.mac cd .. ln -s tcl Scripts chmod 555 . .. cd ../../.. pwd chmod 755 Pd-$1.app touch Pd-$1.app chmod 555 Pd-$1.app tar czf pd-$1.mac.tar.gz Pd-$1.app cheers M On Wed, Jul 03, 2013 at 07:00:48PM -0400, Jonathan Wilkes wrote: Miller et al, Once I get Pd built on OSX, I can make install so that pd from the terminal will launch it. But how do I make it into an App? Any hints? INSTALL.txt doesn't have anything. I'd like to get it building so that a) I can make use of all the goodies someone put into AppMain.tcl and b) post a working copy so people can try out the new Preferences dialog. Separate question: even for running pd from the terminal, why doesn't the AppMain.tcl stuff get used? For example, I still want to use the OSX Preferences panel, and set all the Apple specific stuff like About Pd in the App menu, regardless of how pd was started. (Though it's not a huge deal, as the vast majority would just be running the app.) Thanks, Jonathan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list