[PD] Help with OSX App minefield

Jonathan Wilkes jancsika at yahoo.com
Mon Oct 7 22:05:03 CEST 2013


Hello,
     I'm hoping some MacOSX gurus can help me traverse this mine-field.

What I'm trying to do:
Port Pd-l2ork (quick-and-dirty) to MacOSX in the form of a Pd-l2ork.app

Minefields:
* Pd-l2ork uses tkpath, which is built to work with Carbon and not Cocoa.  So I
must use tcl/tk Framework that uses Carbon instead of Cocoa.  That should be
ok because Pd-extended.app is currently set up to use Carbon.
* Pd-l2ork uses the old pd.tk framework instead of the newer stuff from the gui-rewrite

What I've done so far:
* updated the configure file successfully
* made a workaround for statbuf from stat.h not existing on OSX (in s_main.c)
* made a workaround for RTLD not existing after ./configure and trying to make (s_loader.c)
* successfully compiled Pd-l2ork
* checked that tkpath actually works on OSX.  It seems to work, using tcl/tk w/Carbon
instead of Cocoa.
* used otool and install_name_tool to change libPdTcl.dylib libraries to point at the
App's Framework directory instead of system directories
* changed AppMain.tcl to launch pd.tk instead of pd-gui (which it does successfully)

What crashes so far:
* inside pd.tk, I'm trying to do this:
    load $pd_guidir/bin/libPdTcl.dylib
It finds the dylib fine but then it crashes, with the crash report referencing the first line
of the following function of t_tkcmd.c in the backtrace:

int Pdtcl_Init(Tcl_Interp *interp)
{
    const char *argv = Tcl_GetVar(interp, "argv", 0);

***

Any ideas where to begin to debug this?  Is there some code I can add to
Pdtcl_Init to print out some info I can use to tell where it's going wrong?

I put the full error log here:
http://pastebin.com/duHdRrsY

Any suggestions appreciated.

-Jonathan




More information about the Pd-list mailing list