SimSpark 和 RCSSServer 报告“未定义符号:SDL_Init”

SimSpark 和 RCSSServer 报告“未定义符号:SDL_Init”

我正在尝试运行 SimSpark 和 RCSSServer,当我$ rcsoccersim3d在终端中输入以下内容时发生:

(SimulationServer) SimControlNode 'AgentControl' registered
(AgentControl) Running in normal mode.
(spark.rb) sparkSetupInput
(spark.rb) using InputSystem 'InputSystemSDL'
/usr/local/bin/rcssserver3d: symbol lookup error: /usr/local/lib/simspark/inputsdl.so: undefined symbol: SDL_WasInit
(MonitorServer) WARNING: SimulationServer not found.
rcssmonitor3d, 0.2
Koblenz University.
Copyright (C) 2004, The RoboCup Soccer Server Maintenance Group.

Type '--help' for further information

(spark.rb) sparkSetupRendering
(spark.rb) using OpenGLSystem 'OpenGLSystemSDL'
/usr/local/bin/rcssmonitor3d: symbol lookup error: /usr/local/lib/simspark/openglsyssdl.so: undefined symbol: SDL_Init
kill: 65: No such process

我已经安装了大部分 SDL 包,但问题仍未解决。

答案1

注释掉以下几行simspark/plugin/CMakeLists.txt

# It is problematic under Linux! Will cause segfaults on simspark exit.
#if (WIN32 OR APPLE)
   set(spark_libs kerosin oxygen salt zeitgeist)
#endif (WIN32 OR APPLE)

并再次构建 SimSpark 和 RCSSServer3D!

您可以使用Rubuntu Robocup 存储库作为安装 2D 和 3D 足球模拟服务器的 Ubuntu 存储库。

答案2

我还发现了一些关于这个问题的讨论这里

升级到ubuntu 11.10后,simspark可以编译,但是运行时出现错误:

./simspark:符号查找错误:.../lib/simspark/openglsyssdl.so:未定义符号:SDLInit ./simspark:符号查找错误:.../lib/simspark/inputsdl.so:未定义符号:SDLWasInit

问题是由于-lSDL某种原因而未通过。因此,为了快速修复,请编辑两个文件:spark/plugin/openglsyssdl/CMakeList.txtspark/plugin/inputsdl/CMakeList.txt,并SDL添加target_link_libraries

相关内容