Skip to content
Tcl Source Code Artifact [de432fd5d7]
Login

Artifact [de432fd5d7]

Artifact de432fd5d796e9d9ffa75fd8c8f53b44d80eae77:

Ticket change [de432fd5d7] - New ticket [1961211fffffffff|1961211fff] <i>TclpDlopen failing on MacOSX 10.4 and later</i>. by sebbarre on 2008-05-09 20:24:53.
D 2008-05-09T20:24:53
J assignee kennykb
J cmimetype text/plain
J comment Hi\n\nA\schange\swas\smade\sto\stclLoadDyld.c\sto\suse\sthe\sdlfcn\sAPI\s(dlopen)\son\sMacOSX\s10.4\sor\slater\sinstead\sof\sthe\sobsolete/deprecated\sNSModule\sAPI.\n\nHowever,\sthe\scall\sto\sdlopen\sis\sproblematic:\n\s\sdlHandle\s=\sdlopen(nativePath,\sRTLD_NOW\s|\sRTLD_LOCAL);\n\nRLTD_LOCAL\sis\s*not*\sthe\sdefault\svalue\sfor\sdlopen,\sthe\sdefault\sis\sRTLD_GLOBAL.\sRLTD_LOCAL\sprevents\sTcl/Tk\sfrom\sbeing\sable\sto\sload\sany\sdynamic\slibrary/module\swhich\sdepends\s(i.e.\swas\slinked\sagainst)\sa\spreviously\sloaded\sdynamic\slibrary/module.\n\nUnless\sI\smissed\sthe\srational\sfor\spicking\sRLTD_LOCAL,\scould\sTcl/Tk\splease\suse\sthe\sdefault\sRLTD_GLOBAL?\n\nFrom\sthe\sman\spage:\nhttp://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/dlopen.3.html\n\nRTLD_GLOBAL:\sSymbols\sexported\sfrom\sthis\simage\s(dynamic\slibrary\sor\sbundle)\swill\sbe\savailable\sto\sany\simages\sbuild\swith\s-flat_namespace\soption\sto\sld(1)\sor\sto\scalls\sto\sdlsym()\swhen\susing\sa\sspe-cial\sspecialcial\shandle.\n\nRTLD_LOCAL:\sSymbols\sexported\sfrom\sthis\simage\s(dynamic\slibrary\sor\sbundle)\sare\sgenerally\shidden\sand\sonly\savailble\sto\sdlsym()\swhen\sdirectly\susing\sthe\shandle\sreturned\sby\sthis\scall\sto\sdlopen().\n\nIn\sthe\ssecond\scase,\sa\slibrary/module\sA\swill\sload\scorrectly\sbut\swill\shide\sits\ssymbols.\sTcl/Tk\swill\sfail\sto\sload\sa\slibrary/module\sB\sif\sB\sdepends\son\ssymbols\sin\sA\s(i.e.\swas\sdynamically\slinked\sagainst\sA).\n\nExample:\n\nbarre\s[562]\s$\s/opt/tcltk8.5.0/bin/wish8.5\s\n%\sload\slibvtkCommonTCL.dylib\n%\sload\slibvtkFilteringTCL.dylib\ndlopen(libvtkFilteringTCL.dylib,\s6):\sSymbol\snot\sfound:\s__Z14vtkTclInDeleteP10Tcl_Interp\n\s\sReferenced\sfrom:\s/Users/barre/build/VTK-VTK-5-2-tcl85-debug/bin/libvtkFilteringTCL.dylib\n\s\sExpected\sin:\sflat\snamespace\n\nthe\s__Z14vtkTclInDeleteP10Tcl_Interp\ssymbol\s*is*\sactually\sin\slibvtkCommonTCL.dylib.\n\nbarre\s[563]\s$\sotool\s-L\slibvtkFilteringTCL.dylib\s\nlibvtkFilteringTCL.dylib:\n\s\s\s\s\s\s\s\slibvtkFilteringTCL.5.2.dylib\s(compatibility\sversion\s0.0.0,\scurrent\sversion\s0.0.0)\n\s\s\s\s\s\s\s\slibvtkFiltering.5.2.dylib\s(compatibility\sversion\s0.0.0,\scurrent\sversion\s0.0.0)\n\s\s\s\s\s\s\s\slibvtkCommonTCL.5.2.dylib\s(compatibility\sversion\s0.0.0,\scurrent\sversion\s0.0.0)\n\s\s\s\s\s\s\s\slibvtkCommon.5.2.dylib\s(compatibility\sversion\s0.0.0,\scurrent\sversion\s0.0.0)\n\s\s\s\s\s\s\s\s/opt/tcltk8.5.0/lib/libtcl8.5.dylib\s(compatibility\sversion\s8.5.0,\scurrent\sversion\s8.5.0)\n[...]\n\nManually\schanging\sRLTD_LOCAL\sto\sRLTD_GLOBAL,\sI\swas\sable\sto\sload\sboth\slibraries\swithout\sany\sproblem\sinside\sTcl/Tk\s8.5.2.\n\nThank\syou
J foundin obsolete:\s8.5.2
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter sebbarre
J subsystem 40.\sDynamic\sLoading
J title TclpDlopen\sfailing\son\sMacOSX\s10.4\sand\slater
J type Bug
K 1961211fffffffffffffffffffffffffffffffff
U sebbarre
Z 590aa26981b1c469c6e8da993e21a1e0