因为工作原因,在Arch上安装了闭源软件ANSYS 2022R1版本,这个软件体积很大,40-50个G,里面包含了很多子软件,我用到其中一个软件icemcfd时,在终端./icemcfd,无法运行,症状是运行后出现窗口但是立刻闪退,报错如下
ICEM_ACN is "/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd".
ANSYSLIC_DIR is set to /home/weich/Softwares/ansys_2022R1_linux/ansys_inc/shared_files/licensing
LD_LIBRARY_PATH is "/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/lib::/usr/lib/openmpi/:/usr/lib/openmpi/:/home/weich/Softwares
/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/bin:/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/dif/iges:/home/weich/So
ftwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/../../Framework/bin/Linux64:/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linu
x64_amd/../../tp/IntelCompiler/2019.3.199/linx64/lib/intel64:/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/../../tp/qt_fw/5.9.6/
Linux64/lib:/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/../../tp/hdf5/1_10_5/linx64/lib".
args =
libGL error: MESA-LOADER: failed to open radeonsi: /home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/lib/libstdc++.so.6: version `GL
IBCXX_3.4.29' not found (required by /usr/lib/dri/radeonsi_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open radeonsi: /home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/lib/libstdc++.so.6: version `GL
IBCXX_3.4.29' not found (required by /usr/lib/dri/radeonsi_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast: /home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/lib/libstdc++.so.6: version `GLIB
CXX_3.4.29' not found (required by /usr/lib/dri/swrast_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Window information: depth = 24
class = 4
visual depth = 24 class = 4
Couldn't get context..
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 4431
Current serial number in output stream: 4432
Exit from ICEM CFD
这里需要探讨的,只是最后几行报错原因
Window information: depth = 24
class = 4
visual depth = 24 class = 4
Couldn't get context..
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 4431
Current serial number in output stream: 4432
Exit from ICEM CFD
这应该是导致这个软件无法运行的原因,前面报错信息感觉不重要,这是因为,我运行同属于ANSYS包的软件Fluent时,能够正常运行,但是终端也会出现前面的一些报错信息,但没有影响,我猜大概是显卡驱动问题。但是icem这个软件运行时,就出现X报错,不清楚是怎么回事。
系统配置:台式电脑,intel 12700k + amd 6500xt,显卡驱动是xf86-video-amdgpu,没有单独在/etc/X11/xorg.conf.d下写xorg的配置文件,默认运行就很正常。
这个问题我google了半天,部分人在ubuntu上运行icem这个软件,也遇到这个问题,https://www.cfd-online.com/Forums/ansys … buntu.html,这个链接里涉及的问题感觉和我的很接近,但是好像很少人在Arch上安装这个软件,ubuntu里运到相同问题的解决方法是
apt-get install xfs xfstt
apt-get install t1-xfree86-nonfree ttf-xfree86-nonfree ttf-xfree86-nonfree-syriac xfonts-75dpi xfonts-100dpi
xset +fp /usr/share/fonts/X11/75dpi/
xset +fp /usr/share/fonts/X11/100dpi/
在Arch里,上面这些包用pacman压根找不到,而且下面也没/X11/75dpi和/X11/100dpi/这两个文件,这两个文件夹的路径都是/usr/share/fonts/100dpi/ 和/usr/share/fonts/75dpi/,我用xset添加了也没用。xset q输出如下
Keyboard Control: [0/1819]
auto repeat: on key click percent: 0 LED mask: 00000000
XKB indicators:
00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
03: Compose: off 04: Kana: off 05: Sleep: off
06: Suspend: off 07: Mute: off 08: Misc: off
09: Mail: off 10: Charging: off 11: Shift Lock: off
12: Group 2: off 13: Mouse Keys: off
auto repeat delay: 300 repeat rate: 25
auto repeating keys: 00ffffffdffffbbf
fadfffefffedffff
9fffffffffffffff
fff7ffffffffffff
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 2/1 threshold: 4
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 0 cycle: 600
Colors:
default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff
Font Path:
/usr/share/fonts/TTF,/usr/share/fonts/100dpi,/usr/share/fonts/75dpi,built-ins
DPMS (Energy Star):
Standby: 600 Suspend: 600 Off: 600
DPMS is Disabled
我感觉应该是xorg的配置出问题了?或者显卡驱动?应该不是软件本身的问题,但就是不知道问题出哪儿了,大佬们帮我分析下,感谢!
最近编辑记录 Oliver Wei (2022-04-17 15:58:55)
离线
你的显卡对应的 OpenGL 库加载失败了啦:
failed to open radeonsi: /home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/lib/libstdc++.so.6: version `GL
IBCXX_3.4.29' not found
也就是说,你这个软件带了个旧版本的 C++ 库,而你系统上的 OpenGL 库需要新的。你试试把那个旧版本的 libstdc++.so.6 删掉让它用系统上的版本?
离线
你的显卡对应的 OpenGL 库加载失败了啦:
failed to open radeonsi: /home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/lib/libstdc++.so.6: version `GL
IBCXX_3.4.29' not found也就是说,你这个软件带了个旧版本的 C++ 库,而你系统上的 OpenGL 库需要新的。你试试把那个旧版本的 libstdc++.so.6 删掉让它用系统上的版本?
谢谢仙子,我按照你说的,删除了软件自带的libstdc++.so.6,然后把系统的libstdc++.so.6弄了个软链接过来,确实没有出现OpenGL库报错的信息,但是运行软件依然出现以下报错
ICEM_ACN is "/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd".
ANSYSLIC_DIR is set to /home/weich/Softwares/ansys_2022R1_linux/ansys_inc/shared_files/licensing
LD_LIBRARY_PATH is "/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/lib::/usr/lib/openmpi/:/usr/lib/openmpi/:/home/weich/Softwares
/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/bin:/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/dif/iges:/home/weich/So
ftwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/../../Framework/bin/Linux64:/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linu
x64_amd/../../tp/IntelCompiler/2019.3.199/linx64/lib/intel64:/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/../../tp/qt_fw/5.9.6/
Linux64/lib:/home/weich/Softwares/ansys_2022R1_linux/ansys_inc/v221/icemcfd/linux64_amd/../../tp/hdf5/1_10_5/linx64/lib".
args =
Window information: depth = 24
class = 4
visual depth = 24 class = 4
can't load font screen14, using variable
Signal 11 caught!
segmentation violation - exiting after doing an emergency save
Exiting...
Exit from ICEM CFD
上述报错信息,我百度和google了,很多人也遇到过,基本上都说是缺少字体引起的,https://blog.csdn.net/mengql12/article/details/43898145,ubuntu下,为解决这个问题,安装libmotif3,libmotif4,xfonts-75dpi and xfonts-100dpi这四个包。
但是上述包在Arch下都没有,前两个包,我猜测,Arch下对应的包是openmotif,后两个包,Arch里对应的应该是xorg-fonts-100dpi, xorg-fonts-75dpi,这些字体包都安装了,依然出现上述字体报错,没辙了。我猜测的原因是,ANSYS这个商用软件无法调用Arch系统下的字体?和软件内置的字体调用有关?
离线
xorg-fonts- 开头的都装上,openmotif 也装上试试?
这种依赖不全的老软件跑起来挺麻烦的。如果可以的话建议搞个容器(docker、podman、systemd-nspawn 等)在其它已知可行的发行版上跑。
离线
xorg-fonts- 开头的都装上,openmotif 也装上试试?
这种依赖不全的老软件跑起来挺麻烦的。如果可以的话建议搞个容器(docker、podman、systemd-nspawn 等)在其它已知可行的发行版上跑。
解决了,一股脑把xorg-fonts-*字体都安装了,包括xorg-fonts-type1 xorg-fonts-misc等,重启后软件能打开了,也不知道是哪个字体包满足软件要求了,不过搞定了,谢谢仙子!!
离线
我遇到的情况比较奇葩,重启居然就行了……
离线