您的位置:首页 > 职场人生

[转载]ubuntu10.04 安装insight后无法启动

2011-03-07 13:05 399 查看
原文地址http://forum.ubuntu.org.cn/viewtopic.php?t=200605

After read <Ubuntu8.04下如何安装arm-linux编译及调试工具>, I setup all the tools step by step successfully. But when I input "arm-linux-insight", the error below comes out. Do others see it and have the solution?Thanks a lot.

yc200@yc200:~/Desktop/insight-6.8$ arm-linux-insight

Tk_Init failed: Can't find a usable tk.tcl in the following directories:

/usr/local/arm/2.95.3/share/tk8.4 /usr/local/arm/2.95.3/lib/tk8.4 /usr/local/arm/lib/tk8.4 /usr/local/arm/2.95.3/library /usr/local/arm/library /usr/local/arm/tk8.4.1/library /usr/local/tk8.4.1/library

/usr/local/arm/2.95.3/share/tk8.4/tk.tcl: no event type or button # or keysym

no event type or button # or keysym

while executing

"bind Listbox <MouseWheel> {

%W yview scroll [expr {- (%D / 120) * 4}] units

}"

(file "/usr/local/arm/2.95.3/share/tk8.4/listbox.tcl" line 182)

invoked from within

"source /usr/local/arm/2.95.3/share/tk8.4/listbox.tcl"

(in namespace eval "::" script line 1)

invoked from within

"namespace eval :: [list source [file join $::tk_library $file.tcl]]"

(procedure "SourceLibFile" line 2)

invoked from within

"SourceLibFile listbox"

(in namespace eval "::tk" script line 4)

invoked from within

"namespace eval ::tk {

SourceLibFile button

SourceLibFile entry

SourceLibFile listbox

SourceLibFile menu

SourceLibFile panedwindow

SourceLibFile ..."

invoked from within

"if {$::tk_library ne ""} {

if {[string equal $tcl_platform(platform) "macintosh"]} {

proc ::tk::SourceLibFile {file} {

if {[catch {

namesp..."

(file "/usr/local/arm/2.95.3/share/tk8.4/tk.tcl" line 393)

invoked from within

"source /usr/local/arm/2.95.3/share/tk8.4/tk.tcl"

("uplevel" body line 1)

invoked from within

"uplevel #0 [list source $file]"

This probably means that tk wasn't installed properly.

解决办法:

编译insight-6.8前必须修改insight-6.8的源代码。

1)修改insight-6.8/tk/generic/tk.h

将(line 653)

#define VirtualEvent (LASTEvent)

#define ActivateNotify (LASTEvent + 1)

#define DeactivateNotify (LASTEvent + 2)

#define MouseWheelEvent (LASTEvent + 3)

#define TK_LASTEVENT (LASTEvent + 4)

改为:

#define VirtualEvent (MappingNotify)

#define ActivateNotify (MappingNotify + 1)

#define DeactivateNotify (MappingNotify + 2)

#define MouseWheelEvent (MappingNotify + 3)

#define TK_LASTEVENT (MappingNotify + 4)

并将随后的#define TK_LASTEVENT (LASTEvent + 4)删除(line 661附近)

2)修改insight-6.8/tk/generic/tkBind.c

在line 586和line 587之间增加

#ifdef GenericEvent

/* GenericEvent */ 0,

#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  职场 ubuntu 休闲