求助:Debian 8 i386 升级到 9.3后,象棋游戏gmchess 无法启动

最大的社区版本,Ubuntu的发源地
回复
头像
careone
帖子: 839
注册时间: 2007-12-17 21:41

求助:Debian 8 i386 升级到 9.3后,象棋游戏gmchess 无法启动

#1

帖子 careone » 2018-01-12 17:04

求助:Debian 8.9 i386 升级到 9.3后,象棋游戏gmchess 无法启动

报错:
gmchess: symbol lookup error: gmchess: undefined symbol: _ZN3Gtk7Builder16create_from_fileERKSsPKc
是因为 python 版本升级造成的问题,还是 Linux 内核的问题?

试过下面两个内核版本,都是无法启动 Gmchess:
* linux-image-3.16.0-4-686-pae 3.16.43-2+deb8u2 (Debian 8.9 自带的内核版本)
* linux-image-4.9.0-4-686-pae 4.9.65-3+deb9u1 (Debian 9.3 自带的内核版本)

有没有朋友遇到同样的问题?或者有什么解决办法?
魁拔不死,天下不宁。
魁拔既死,天下不平。
--------------
Careone <emacslocale^126.com>
https://sourceforge.net/projects/emacslocale/files/
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: 求助:Debian 8 i386 升级到 9.3后,象棋游戏gmchess 无法启动

#2

帖子 科学之子 » 2018-01-13 13:45

个人根据直觉猜测是python的问题.
为了达到最好的兼容性,python2和3应该同时装上.
或者检查一下对应py脚本里的第一行指定的解释器,看版本是否正确.
解决办法就是想办法指定正确的版本.
比如直接用python2/3(正确版本)来运行main.py 之类
上次由 科学之子 在 2018-01-14 17:05,总共编辑 1 次。
头像
careone
帖子: 839
注册时间: 2007-12-17 21:41

Re: 求助:Debian 8 i386 升级到 9.3后,象棋游戏gmchess 无法启动

#4

帖子 careone » 2018-01-29 10:55

科学之子 写了:刚开始看楼主描述以为是Python程序.
"aptitude show gmchess"看了一下,貌似是C++写的.
重新做了一些搜索,希望对您有所帮助.
https://www.google.com/search?newwindow ... hETkwMy_YQ
http://gdwarner.blogspot.com/2009/03/c- ... error.html
感谢关注和帮助!

回贴有点晚了,非常抱歉!
给出的两个链接,试了一下,好像很难打开。也许是被墙了。或者是我这边网络的问题。
现在在另一台电脑上,继续 debian 8 + Gmchess, 还能凑和。

再次表示感谢!
魁拔不死,天下不宁。
魁拔既死,天下不平。
--------------
Careone <emacslocale^126.com>
https://sourceforge.net/projects/emacslocale/files/
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: 求助:Debian 8 i386 升级到 9.3后,象棋游戏gmchess 无法启动

#5

帖子 科学之子 » 2018-01-29 21:20

careone 写了:
科学之子 写了:刚开始看楼主描述以为是Python程序.
"aptitude show gmchess"看了一下,貌似是C++写的.
重新做了一些搜索,希望对您有所帮助.
https://www.google.com/search?newwindow ... hETkwMy_YQ
http://gdwarner.blogspot.com/2009/03/c- ... error.html
感谢关注和帮助!

回贴有点晚了,非常抱歉!
给出的两个链接,试了一下,好像很难打开。也许是被墙了。或者是我这边网络的问题。
现在在另一台电脑上,继续 debian 8 + Gmchess, 还能凑和。

再次表示感谢!
试试看全新安装 Debian 9
怀疑是老版本的库残留了之类什么的.
c++ runtime "symbol lookup error"

I was working on a c++ project. Everything linked and compiled fine. Upon running the executable, I got the following error:

./TestCppProgram: symbol lookup error: ./TestCppProgram: undefined symbol: _ZN12CppProgramC1Ev

I searched the internet. Two of the interesting links I found were the following:

http://osdir.com/ml/gcc.g++.general/200 ... 00061.html
http://www.linuxquestions.org/questions ... ut-263568/

For me it ended up being a bad LD_LIBRARY_PATH. The path I intended the executable to find it's needed shared library was in the LD_LIBRARY_PATH, it just wasn't before a different path which had an older version of the needed shared library. (This happened to me when I updated by bashrc with a library path and just re-sourced it).

Some cool commands in the debugging process:

ldd TestCppProgram (Shows you where your program is getting it's libraries from. An early-on careful inspection of this would've quickly let me to my problem!)
ldd -d -r TestCppProgram (Shows you any undefined symbols. There shouldn't be any undefined symbols for an executable, but there will be for a shared lib if it depends on another shared lib. Somebody please correct me if I'm wrong)
nm TestCppProgram | c++filt (displays unmangled symbol information)
nm TestCppProgram (Displays mangled symbol information. Ie: You should be able to find stuff like ZN12CppProgramC1Ev in here. In my problem above, I found which line number the undefined symbol in question was on, and then looked it up in the unmangled version to see what function it was trying to resolve. It let me know, but it didn't really help me find out what my problem was.)
readelf -d TestCppProgram (Shows library dependencies. similar to ldd.)
原文:http://gdwarner.blogspot.com/2009/03/c- ... error.html
大意是库文件的版本不匹配了.
头像
careone
帖子: 839
注册时间: 2007-12-17 21:41

Re: 求助:Debian 8 i386 升级到 9.3后,象棋游戏gmchess 无法启动

#6

帖子 careone » 2018-01-30 23:10

再次感谢关注!

个人想也是库文件残留了.

大概说一下升级的过程吧.
因为是一台很老的电脑,20G的 / 分区.可用空间大约1G.
先把 sources.list 的版本号代码替换了,再 apt-get update, 再
从 Debian 8.9 apt-get dist-upgrade 到 Debian 9.3 过程中,升级包都下载完了,
解压时报错,空间不够.自动中止.
于是又 apt-get clean 清空了下载包,再次 apt-get dist-upgrade. 这样反复弄了几次.

中间似乎还应该有 apt-get autoremove 删包增加空间的操作.
很可能就是这样导致了配置文件或库文件版本混乱吧.
魁拔不死,天下不宁。
魁拔既死,天下不平。
--------------
Careone <emacslocale^126.com>
https://sourceforge.net/projects/emacslocale/files/
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: 求助:Debian 8 i386 升级到 9.3后,象棋游戏gmchess 无法启动

#7

帖子 科学之子 » 2018-02-02 0:27

careone 写了:再次感谢关注!

个人想也是库文件残留了.

大概说一下升级的过程吧.
因为是一台很老的电脑,20G的 / 分区.可用空间大约1G.
先把 sources.list 的版本号代码替换了,再 apt-get update, 再
从 Debian 8.9 apt-get dist-upgrade 到 Debian 9.3 过程中,升级包都下载完了,
解压时报错,空间不够.自动中止.
于是又 apt-get clean 清空了下载包,再次 apt-get dist-upgrade. 这样反复弄了几次.

中间似乎还应该有 apt-get autoremove 删包增加空间的操作.
很可能就是这样导致了配置文件或库文件版本混乱吧.
感觉像Debian/Ubuntu 这种每隔一段时间来个"大升级"的发行版,最好的"大升级"方式是全新安装.
稍微花时间熟悉一下initramfs和debootstrap,多个版本的Debian/Ubuntu 可以安装在同一个分区里,不必"全新安装"时格式化之类.
单个分区可用空间不够的话可以用dmsetup将多个分区里的文件映射成一个loop设备
回复