在 Ubuntu 10.04 上编译 CARMEN Nav 工具包

在 Ubuntu 10.04 上编译 CARMEN Nav 工具包

我是 Ubuntu 新手,我一直在尝试安装一些机器人工具包,用于我正在开发的 Powerbot。我目前正在尝试安装 CARMEN 导航工具包,我一直在关注Ubuntu Wiki 中的这些说明以便一步一步地进行。我的程序如下:

  1. 在 /usr/include 中导入 canlib.h
  2. 通过以下方式安装 gtk+-2.0:sudo apt-get install libgtk2.0-*
  3. 安装其他软件包(无法安装 libwrap0-deb:E:找不到软件包 libwrap0-deb)。否则,所有其他软件包都已安装。
  4. 根据我指定的链接,他们指定了一个技巧,您可以在配置文件中注释掉第 274 至 286 行,以便系统不会查找 libgdk_imlib.a。
  5. 我运行了 ./configure 并得到了以下输出:

    Using $CC as gcc...
    Found processor i686.
    Congratulations. You are running Linux.
    Found kernel 2.6.32-71-generic.
    This doesn't look like SuSE!
    Searching for linux kernel headers... found at /usr/src/linux-headers-2.6.32-71-generic/include
    Searching for canlib... Found canlib header at /usr/include/canlib.h
    Searching for GTK... found, version 2.20.1
    Searching for joystick... found at /usr/include/linux/joystick.h
    
    It looks like this is a system include, so I won't add it to the standard
    include path. Adding partial system include paths is usually a recipe for
    disaster. If this is the wrong thing to do, you could add the following
    line to Makefile.vars:
    JOYSTICK_INCLUDE = -I/usr/include/linux/joystick.h
    
    Searching for tcpd.h... not found
    Looks like your system does not support access control.
    Sorry about adding security holes.
    Searching for jpeglib.h... found
    Searching for zlib.h... found
    Searching for ImageMagick (Wand)... not found
    Searching for Java... not found
    Searching for doxygen... found
    Searching for SWIG... not found
    Should the C++ tools be installed for CARMEN: [Y/n] y
    Should the old laser server be used instead of the new one: [y/N] n
    
    Type the install prefix to use for public installs, or hit enter to keep the
    default as /usr/local. (This prefix is not currently used by any rules.)
    
    Install path [/usr/local/]: 
    
    You must have Linux kernel 2.0.20 to compile:
    Nomadic Technologies XR4000
    
    These are the robot types CARMEN currently supports:
    1. ActiveMedia Pioneer I
    2. ActiveMedia Pioneer II
    3. iRobot ATRV
    4. iRobot ATRV-JR
    5. iRobot B21R
    6. Scout
    7. OrcBoard v.4 
    8. OrcBoard v.5 (Experimental)
    9. Segway RMP
    10. *
    
    Please select which robots you wish to compile base modules for.
    e.g., 1, 2, 6 would compile support for both Pioneer types and a Scout.
    Hit enter to compile them all, or type "none" to compile no base module
    support, for example, if you will be working exclusively in simulation.
    
    Robot numbers [*]: 1,2,3,4,5,6,7,8 
    
    Compiling base support for: pioneer rflex scout orc4 orc5
    

我不喜欢的是 tcpd.h未找到根据链接,它应该被找到。无论如何,我运行了 make 文件,当它试图创建 CARMEN 的全局函数时,我得到了以下结果

    ****************************************************************
    * Module  : GLOBAL
    * Comment : CARMEN global functions
    ****************************************************************

    --> Starting make
    ---- Assigning dependencies in GLOBAL
    ---- Compiling global.c to global.o (cc)
    cc1: warnings being treated as errors
    global.c: In function ‘carmen_get_host’:
    global.c:411: error: ignoring return value of ‘fscanf’, declared with attribute     warn_unused_result
    make[3]: *** [global.o] Error 1
    exit: 7: Illegal number: -1
    make[2]: *** [libraries] Error 2
    make[1]: *** [phase1] Error 2
    exit: 1: Illegal number: -1
    make: *** [phase1] Error 2

请问,有人能帮我吗?我不知道这些错误是什么意思,也不知道如何纠正它们!我应该求助于更旧版本的 Ubuntu 吗?

答案1

我不知道所讨论的工具,但可能有用:

  1. 根据apt-searchtcpd.h由包提供libwrap0-dev(似乎有一个拼写错误,“deb”而不是“的");

  2. 关于错误,编译停止是因为在 configure 或 Makefile 中的某个地方gcc要求将所有警告视为错误。具体警告可能是通常情况下忽略;您可以通过两种方式进行:

    • 编辑文件global.c,在第 411 行,在出错的(void)调用前面加上一个,或者fscanf

    • 编辑 Makefile 并找到-Werror添加选项的位置,然后将其删除。然后祈祷一切顺利。

最好的办法是联系软件作者并报告问题。

顺便说一句,我们不建议回到旧版本;与开发人员合作将软件调整为现代版本会更好。短期内需要做更多工作,长期内则不需要。

祝你好运!

相关内容