2016-06-10 40 views
0

我在运行magic vlsi时遇到了问题。问题是无法加载文件“/usr/lib/x86_64-linux-gnu/magic/tcl/tclmagic.so”

couldn't load file "/usr/lib/x86_64-linux-gnu/magic/tcl/tclmagic.so": /usr/lib/x86_64-linux-gnu/magic/tcl/tclmagic.so: undefined symbol: Tk_GetCursorFromData 

我觉得这引起:

/usr/lib/x86_64-linux-gnu/magic/tcl/magic.tcl 
in line 13: load /usr/lib/x86_64-linux-gnu/magic/tcl/tclmagic.so 

文件 /usr/lib/x86_64-linux-gnu/magic/tcl/tclmagic.so 存在

运行魔术中的错误来源是来自shellcript中的qflow display.sh

#!/bin/tcsh -f 
#---------------------------------------------------------- 
# Qflow layout display script using magic-8.0 
#---------------------------------------------------------- 
# Tim Edwards, April 2013 
#---------------------------------------------------------- 

if ($#argv < 2) then echo Usage: display.sh [options] <project_path> <source_name> exit 1 endif 

# Split out options from the main arguments (no options---placeholder only) set argline=(`getopt "" $argv[1-]`) set cmdargs=`echo "$argline" | awk 'BEGIN {FS = "-- "} END {print $2}'` set argc=`echo $cmdargs | wc -w` 

if ($argc == 2) then set argv1=`echo $cmdargs | cut -d' ' -f1` set argv2=`echo $cmdargs | cut -d' ' -f2` else echo Usage: display.sh [options] <project_path> <source_name> echo where echo  <project_path> is the name of the project directory containing echo     a file called qflow_vars.sh. echo  <source_name> is the root name of the verilog file, and exit 1 endif 

foreach option (${argline}) switch (${option}) 
     case --: break endsw end 

set projectpath=$argv1 set sourcename=$argv2 set rootname=${sourcename:h} 

# This script is called with the first argument <project_path>, which should 
# have file "qflow_vars.sh". Get all of our standard variable definitions 
# from the qflow_vars.sh file. 

if (! -f ${projectpath}/qflow_vars.sh) then echo "Error: Cannot find file qflow_vars.sh in path ${projectpath}" exit 1 endif 

source ${projectpath}/qflow_vars.sh source ${techdir}/${techname}.sh cd ${projectpath} 

#---------------------------------------------------------- 
# Copy the .magicrc file from the tech directory to the 
# layout directory, if it does not have one. This file 
# automatically loads the correct technology file. 
#---------------------------------------------------------- 

if (! -f ${layoutdir}/.magicrc) then if (-f ${techdir}/${magicrc}) then 
     cp ${techdir}/${magicrc} ${layoutdir}/.magicrc endif endif 

#---------------------------------------------------------- 
# Done with initialization 
#---------------------------------------------------------- 

cd ${layoutdir} 

#--------------------------------------------------- 
# Create magic layout (.mag file) using the 
# technology LEF file to determine route widths 
# and other parameters. 
#--------------------------------------------------- 

if ($techleffile == "") then set lefcmd="lef read ${techdir}/${leffile}" else set lefcmd="lef read ${techdir}/${techleffile}\nlef read ${techdir}/${techleffile}" endif 

# Timestamp handling: If the .mag file is more recent 
# than the .def file, then print a message and do not 
# overwrite. 

set docreate=1 if (-f ${rootname}.def && -f ${rootname}.mag) then set defstamp=`stat --format="%Y" ${rootname}.def` set magstamp=`stat --format="%Y" ${rootname}.mag` if ($magstamp > $defstamp) then 
     echo "Magic database file ${rootname}.mag is more recent than DEF file." 
     echo "If you want to recreate the .mag file, remove or rename the existing one." 
     set docreate=0 endif endif 

# The following script reads in the DEF file and modifies labels so 
# that they are rotated outward from the cell, since DEF files don't 
# indicate label geometry. 

if (${docreate} == 1) then ${bindir}/magic -dnull -noconsole <<EOF drc off box 0 0 0 0 snap int ${lefcmd} def read ${rootname} select top cell select area labels setlabel font FreeSans setlabel size 0.3um box grow s -[box height] box grow s 100 select area labels setlabel rotate 90 setlabel just e select top cell box height 100 select area labels setlabel rotate 270 setlabel just w select top cell box width 100 select area labels setlabel just w select top cell box grow w -[box width] box grow w 100 select area labels setlabel just e save ${sourcename} quit -noprompt EOF 

endif 

# Run magic and query what graphics device types are 
# available. Use OpenGL if available, fall back on 
# X11, or else exit with a message 

${bindir}/magic -noconsole -d <<EOF >& .magic_displays exit EOF 

set magicogl=`cat .magic_displays | grep OGL | wc -l` set magicx11=`cat .magic_displays | grep X11 | wc -l` 

rm -f .magic_displays 

# Run magic again, this time interactively. The script 
# exits when the user exits magic. 


#if (${magicogl} >= 1) then magic -d OGL ${rootname} if (${magicx11} >= 1) then magic -d X11 ${rootname} else echo "Magic does not support OpenGL or X11 graphics on this host." endif 

#------------------------------------------------------------ 
# Done! 
#------------------------------------------------------------ 

enter image description here

我该如何解决这个问题?

+0

'未定义的符号:Tk_GetCursorFromData'似乎足够清楚。某处某处出现版本不匹配的情况。 –

+0

当我运行'puts $ tcl_version;退出0'| tclsh 我得到8.6 –

+0

那么各种图书馆呢?如果你有(例如)8.5的库,那很可能会导致这个错误。 –

回答

0

这是一个来自某些操作系统版本的运行时链接程序的已知问题(并且非常烦人),它不想链接包含对未知例程的引用的文件,即使该例程从未被调用。在这种情况下,Tcl在没有Tk图形的情况下运行,所以基本的Tcl对象库没有定义任何Tk例程,并且链接器停止在出现的第一个这样的例程(Tk_GetCursorFromData)上。由于某些原因,Fedora链接器(或者有关我的设置)不会这样做,否则我很久以前就已经解决了这个问题。事实上,我最近只修复了它,而解决方案是最新版本的magic-8.1。既然你有Tcl/Tk 8.6,这个解决方案应该可以工作(该解决方案只适用于Tcl/Tk 8.6)。你可以更新到最新的魔术版本8.1,或者你可以编辑文件magic.tcl(在源文件中,它是tcltk/magic.tcl.in,并安装了它,它是/usr/local/lib/magic/tcl/magic.tcl)。在13号线,开关-lazy添加到加载命令:

load -lazy /usr/local/lib/magic/tcl/tclmagic.so 
1

我应该修改我的答案,因为它听起来像魔法可调用的Tcl 8.5,而不是8.6,如果你下载了神奇的可能发生包。 “加载”的“-lazy”选项仅在Tcl 8.6中实现,所以在Tcl 8.5中完全不起作用。我建议从opencircuitdesign.com获得魔法并从源代码编译,这在Linux系统中通常没有问题。 autoconf脚本应该能够找到Tcl版本8.6。

您也可以忽略qflow中的“显示”选项并以交互方式运行魔术。使用“lef read”命令读取标准单元定义,然后“def read”从qflow读取路由布局。

0

谢谢R.蒂莫西爱德华兹和蒂姆爱德华兹。你的回答非常有帮助 我已经解决了这个问题。

enter image description here

0

magic-配置...:下周,我将如何在Ubuntu 14.04解决这个问题,对于有同样问题的用户操作指南在此处添加了一步的./configure - with-tcl =/opt/ActiveTcl-8.6 --with-tk =/usr/local/lib/tk8.6

qflow- configure ...:./configure --with-magic =/usr/local /斌/魔幻

后安装qflow

sudo易于得到魔术(它会下载魔法7.5机智我们只需要覆盖魔术8.0。所以从那里文件)

开放/usr/local/lib/magic/tcl/magic.tcl(如须藤)

和编辑行13: 负载-lazy/usr/lib中/ x86_64的Linux的-gnu/magic/tcl/tclmagic.so