2007年6月1日星期五

xserve1上Gate运行错误

xserve1上安装的Gate运行时总是提示 dyld: library not loaded: libCLHEP-2.0.3.1.dylib 错误。

otool -L /Applications/Gate/gate_v3.1.1/bin/Darwin-g++/Gate

/Applications/Gate/gate_v3.1.1/bin/Darwin-g++/Gate:

        /usr/X11R6/lib/libXt.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /Users/rdm/root/lib/libCore.dylib (compatibility version 0.0.0, current version 0.0.0)
        /Users/rdm/root/lib/libCint.dylib (compatibility version 0.0.0, current version 0.0.0 )
        /Users/rdm/root/lib/libHist.dylib (compatibility version 0.0.0, current version 0.0.0)
        /Users/rdm/root/lib/libGraf.dylib (compatibility version 0.0.0, current version 0.0.0)
        /Users/rdm/root/lib/libGraf3d.dylib (compatibility version 0.0.0, current version 0.0.0)
        /Users/rdm/root/lib/libGpad.dylib (compatibility version 0.0.0, current version 0.0.0)
        /Users/rdm/root/lib/libTree.dylib (compatibility version 0.0.0, current version 0.0.0 )
        /Users/rdm/root/lib/libRint.dylib (compatibility version 0.0.0, current version 0.0.0)
        /Users/rdm/root/lib/libPostscript.dylib (compatibility version 0.0.0, current version 0.0.0)
        /Users/rdm/root/lib/libMatrix.dylib (compatibility version 0.0.0, current version 0.0.0)
        /Users/rdm/root/lib/libPhysics.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.9 )
        /usr/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.16.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
        /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/X11R6/lib/libGLU.1.dylib (compatibility version 1.3.0, current version 1.3.0)
        /usr/X11R6/lib/libGL.1.dylib (compatibility version 1.2.0, current version 1.2.0)
        /usr/X11R6/lib/libXmu.6.dylib (compatibility version 6.2.0, current version 6.2.0)
        /usr/X11R6/lib/libXext.6.dylib (compatibility version 6.4.0, current version 6.4.0)
        /usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current version 6.2.0)
        /usr/X11R6/lib/libXi.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /usr/X11R6/lib/libSM.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /usr/X11R6/lib/libICE.6.dylib (compatibility version 6.3.0, current version 6.3.0)
        libCLHEP-2.0.3.1.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0)

而在我的desktop(Gate正常运行)里

 otool -L /Applications/gate_v3.1.0/bin/Darwin-g++/Gate

/Applications/gate_v3.1.0/bin/Darwin-g++/Gate:

        /usr/X11R6/lib/libXt.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /Users/zixiongcao/Projects/Root/lib/libCore.dylib (compatibility version 0.0.0, current version 0.0
.0)
        /Users/zixiongcao/Projects/Root/lib/libCint.dylib (compatibility version 0.0.0, current version 0.0
.0)
        /Users/zixiongcao/Projects/Root/lib/libHist.dylib (compatibility version 0.0.0, current version 0.0
.0)
        /Users/zixiongcao/Projects/Root/lib/libGraf.dylib (compatibility version 0.0.0, current version 0.0
.0)
        /Users/zixiongcao/Projects/Root/lib/libGraf3d.dylib (compatibility version 0.0.0, current version 0
.0.0)
        /Users/zixiongcao/Projects/Root/lib/libGpad.dylib (compatibility version 0.0.0, current version 0.0
.0)
        /Users/zixiongcao/Projects/Root/lib/libTree.dylib (compatibility version 0.0.0, current version 0.0
.0)
        /Users/zixiongcao/Projects/Root/lib/libRint.dylib (compatibility version 0.0.0, current version 0.0
.0)
        /Users/zixiongcao/Projects/Root/lib/libPostscript.dylib (compatibility version 0.0.0, current versi
on 0.0.0)
        /Users/zixiongcao/Projects/Root/lib/libMatrix.dylib (compatibility version 0.0.0, current version 0
.0.0)
        /Users/zixiongcao/Projects/Root/lib/libPhysics.dylib (compatibility version 0.0.0, current version
0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0 , current version 88.1.8)
        /usr/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.16.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
        /sw/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/X11R6/lib/libGLU.1.dylib (compatibility version 1.3.0, current version 1.3.0)
        /usr/X11R6/lib/libGL.1.dylib (compatibility version 1.2.0, current version 1.2.0)
        /usr/X11R6/lib/libXmu.6.dylib (compatibility version 6.2.0, current version 6.2.0)
        /usr/X11R6/lib/libXext.6.dylib (compatibility version 6.4.0, current version 6.4.0)
        /usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current version 6.2.0)
        /usr/X11R6/lib/libXi.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /usr/X11R6/lib/libSM.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /usr/X11R6/lib/libICE.6.dylib (compatibility version 6.3.0, current version 6.3.0)
        /sw/lib/libCLHEP.2.dylib (compatibility version 3.0.0, current version 3.0.2)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

关键就是xserve1上面的是:

libCLHEP-2.0.3.1.dylib (compatibility version 0.0.0, current version 0.0.0)

不知道为什么漏掉了path...

另外为什么xserve1上的root会是那么奇怪的一个path?ROOTSYS并没有错

 echo $ROOTSYS
/Applications/Gate/root-5.12

ls: /Users/rdm/root/lib/libCore.dylib: No such file or directory

在xserve1运行root,然后:

root [0] gSystem->ListLibraries()

Loaded shared libraries
=======================
/Applications/Gate/root-5.12/lib/libGX11.so
/Applications/Gate/root-5.12/lib/libGui.so
/Applications/Gate/root-5.12/lib/libGX11TTF.so
/Applications/Gate/root-5.12/lib/libMinuit.so
/Applications/Gate/root- 5.12 /lib/libPostscript.so
/Applications/Gate/root-5.12/lib/libHtml.so
/Users/rdm/root/lib/libCore.dylib
/Users/rdm/root/lib/libCint.dylib
/Users/rdm/root/lib/libHist.dylib
/Users/rdm/root/lib/libGraf.dylib
/Users/rdm/root/lib/libGraf3d.dylib
/Users/rdm/root/lib/libGpad.dylib
/Users/rdm/root/lib/libTree.dylib
/Users/rdm/root/lib/libMatrix.dylib
/Users/rdm/root/lib/libRint.dylib
/usr/lib/libstdc++.6.dylib
/usr/lib/libgcc_s.1.dylib
-----------------------
17 libraries loaded
=======================

desktop里:

root [0] gSystem->ListLibraries()

Loaded shared libraries
=======================
/Users/zixiongcao/Projects/Root/lib/libGX11.so
/Users/zixiongcao/Projects/Root/lib/libGui.so
/Users/zixiongcao/Projects/Root/lib/libGX11TTF.so
/Users/zixiongcao/Projects/Root/lib/libvectorDict.so
/Users/zixiongcao/Projects/Root/lib/libCore.dylib
/Users/zixiongcao/Projects/Root/lib/libCint.dylib
/Users/zixiongcao/Projects/Root/lib/libHist.dylib
/Users/zixiongcao/Projects/Root/lib/libGraf.dylib
/Users/zixiongcao/Projects/Root/lib/libGraf3d.dylib
/Users/zixiongcao/Projects/Root/lib/libGpad.dylib
/Users/zixiongcao/Projects/Root/lib/libTree.dylib
/Users/zixiongcao/Projects/Root/lib/libMatrix.dylib
/Users/zixiongcao/Projects/Root/lib/libRint.dylib
/usr/lib/libstdc++.6.dylib
/usr/lib/libgcc_s.1.dylib
-----------------------
15 libraries loaded
=======================

应该是安装root的方式导致的,因为desktop里是通过编译源码安装的,而xserve1上是装的binary。

(查看这个文件 $ROOTSYS/etc/system.rootmap)

使用 install_name_tool 命令修改Gate调用的 libCLHEP-2.0.3.1.dylib 的地址:

 install_name_tool -change libCLHEP-2.0.3.1.dylib /Applications/Gate/CLHEP/lib/libCLHEP-2.0.3.1.dylib Gate

然后再运行Gate就正常了!

0 条评论:

发表评论

订阅 博文评论 [Atom]

<< 主页