Scid 国际象棋程序编译问题

Scid 国际象棋程序编译问题

首先我要指出的是,我是 Ubuntu 的新手,所以如果我问的问题很荒谬,我很抱歉。

我已经下载了 Scid 4.4 国际象棋程序,并尝试按照其网站上的说明对其进行编译:

1)初始化git。

2)创建一个您想要下载并(?)编译源代码的文件夹,然后在命令行上输入:git init。

3) 您现在可以下载回忆 Fulvio 咒语的源代码:git clone git://scid.git.sourceforge.net/gitroot/scid/scid 这应该会为您提供最新的 Scid 源代码。

4) 现在你可以编译 Scid 了。原则上,你需要做的就是:./configure 然后 make

5) 如果遇到问题,您可能需要获取 tcl/tk 的开发人员版本。这相当于发出以下三个命令:sudo apt-get install tcl8.5-dev sudo apt-get install tk8.5-dev sudo apt-get install zlib1g -dev

6)现在你可以开始编译了

问题是,当我运行 ./configure 开始编译时,终端上出现以下消息:

configure:Scid 的 Makefile 配置程序

    Tcl/Tk version: 8.5
    Your operating system is: Linux 3.8.0-19-generic
    Location of "tcl.h": /usr/include/tcl8.5
    Location of "tk.h": /usr/include/tcl8.5
    Location of Tcl 8.5 library: not found
    Location of Tk 8.5 library: not found
    Checking if your system already has zlib installed: yes.
    Using Makefile.conf.
Not all settings could be determined!
The default Makefile was written.
You will need to edit it before you can compile Scid.

我该怎么办?有人遇到过这个问题吗?提前谢谢


我跑了

ls -l /usr/include/tcl8.5/tcl.h

结果如下:

-rw-r--r-- 1 根根 87291 abr 22 10:45 /usr/include/tcl8.5/tcl.h

我也尝试过你建议的

您能否运行 git reset --hard HEAD 和 git clean -d -f 来使用 Git 清理所有内容?然后再次运行 ./configure。这只是一个猜测 - 我看到一些 GNU automake 东西仍在监听其“缓存”版本的结果或类似的东西。

还是没解决。不知道为什么虽然安装了库,但是还是无法识别


我打开了 configure 来查看程序在哪里查找库。这是代码:

# libraryPath: List of possible locations of Tcl/Tk library.
set libraryPath {
    /usr/lib
    /usr/lib64
    /usr/local/tcl/lib
    /usr/local/lib
    /usr/X11R6/lib
    /opt/tcltk/lib
    /usr/lib/x86_64-linux-gnu
}
lappend libraryPath "/usr/lib/tcl${tclv}"
lappend libraryPath "/usr/lib/tk${tclv}"
lappend libraryPath "/usr/lib/tcl${tclv_nodot}"
lappend libraryPath "/usr/lib/tk${tclv_nodot}"

# Try to add tcl_library and auto_path values to libraryPath,
# in case the user has a non-standard Tcl/Tk library location:

if {[info exists ::tcl_library]} {
    lappend headerPath \
        [file join [file dirname [file dirname $::tcl_library]] include]
    lappend libraryPath [file dirname $::tcl_library]
    lappend libraryPath $::tcl_library
}
if {[info exists ::auto_path]} {
    foreach name $::auto_path {
        lappend libraryPath $name
    }
}

if {! [info exists var(TCL_INCLUDE)]} {
    puts -nonewline {    Location of "tcl.h": }
    set opt(tcl_h) [findDir "tcl.h" $headerPath "TCL_VERSION.*$tclv"]
    if {$opt(tcl_h) == ""} {
        puts "not found"
        set success 0
        set opt(tcl_h) "$::defaultVar(TCL_INCLUDE)"
    } else {
        puts $opt(tcl_h)
    }
}

set opt(tcl_lib) ""

if {! [info exists var(TCL_LIBRARY)]} {
    puts -nonewline "    Location of Tcl $tclv library: "
    set opt(tcl_lib) [findDir "libtcl${tclv}.*" $libraryPath]
    if {$opt(tcl_lib) == ""} {
        set opt(tcl_lib) [findDir "libtcl${tclv_nodot}.*" $libraryPath]
        if {$opt(tcl_lib) == ""} {
            puts "not found"
            set success 0
            set opt(tcl_lib) "$opt(tcl_h)"
            set opt(tcl_lib_file) "tcl\$(TCL_VERSION)"
        } else {
            set opt(tcl_lib_file) "tcl${tclv_nodot}"
            puts $opt(tcl_lib)
        }
    } else {
        set opt(tcl_lib_file) "tcl\$(TCL_VERSION)"
        puts $opt(tcl_lib)
    }
}

if {! [info exists var(TCL_INCLUDE)]} {
    set var(TCL_INCLUDE) "-I$opt(tcl_h)"
}
if {! [info exists var(TCL_LIBRARY)]} {
    set var(TCL_LIBRARY) "-L$opt(tcl_lib) -l$opt(tcl_lib_file)"
}
return $success

所以我猜(我猜的意思是我不知道如何编码)我应该在这里的某个地方写下 usr/lib/tcl8.5 和 usr/lib/tk8.5,对吗?

答案1

Location of Tcl 8.5 library: not found
Location of Tk 8.5 library: not found

意味着您缺少 Tcl 和 Tk 库(开发包)。

安装tcl8.5-dev安装 tcl8.5-devtk8.5-dev安装 tk8.5-dev一切就绪。

我如何找到这个?使用http://packages.ubuntu.com地点:

在此处输入图片描述


安装软件包之前:

$ ./configure 
configure: Makefile configuration program for Scid
    Tcl/Tk version: 8.5
    Your operating system is: Linux 3.8.0-29-generic
    Location of "tcl.h": not found
    Location of "tk.h": not found
    Location of Tcl 8.5 library: /usr/lib
    Location of Tk 8.5 library: /usr/lib
    Checking if your system already has zlib installed: yes.
    Using Makefile.conf.
Not all settings could be determined!
The default Makefile was written.
You will need to edit it before you can compile Scid.

安装软件包后:

$ ./configure 
configure: Makefile configuration program for Scid
    Renaming "Makefile" to "Makefile.bak"
    Tcl/Tk version: 8.5
    Your operating system is: Linux 3.8.0-29-generic
    Location of "tcl.h": /usr/include/tcl8.5
    Location of "tk.h": /usr/include/tcl8.5
    Location of Tcl 8.5 library: /usr/lib
    Location of Tk 8.5 library: /usr/lib
    Checking if your system already has zlib installed: yes.
    Using Makefile.conf.
The Makefile configured for your system was written.
Multi-threading enabled (if you have problems try ./configure THREADS="").
Now just type "make" to compile Scid.

你看,它非常相似,而且很容易忽视它现在实际上已经取得了成功。

答案2

Location of Tcl 8.5 library: not found
Location of Tk 8.5 library: not found

在 Ubuntu 13.04 上也遇到了同样的问题。虽然我已经安装了必要的软件包,但还是无法编译。问题似乎是,scid 在 /usr/lib 中查找 tcl 和 tk 库,尽管它们安装在 /usr/lib/x86_64-linux-gnu 中,您可以在包管理器中右键单击 tcl8.5-lib 包并选择“属性/已安装文件”来查看。

解决方案是创建软链接/usr/lib 目录中的那些库:

sudo ln -s /usr/lib/x86_64-linux-gnu/libtcl8.5.so.0 /usr/lib/libtcl8.5.so.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libtk8.5.so.0 /usr/lib/libtk8.5.so.0

希望有所帮助。

答案3

在我的情况下,修改配置脚本是有效的。我/usr/lib/i386-linux-gnu在列表中添加了 libraryPath (第 167 行)

答案4

尝试简单的:

sudo apt-get install scid

相关内容