AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1231756
Accepted
chiehpower
chiehpower
Asked: 2020-04-27 21:44:20 +0800 CST2020-04-27 21:44:20 +0800 CST 2020-04-27 21:44:20 +0800 CST

使文件错误以构建 libbot2 库

  • 772

让我描述一下我的问题。到目前为止,我正在构建请求libbot2库的 MPNet。

  • MPNet GitHub
  • libbot2 GitHub

我已经安装了以下需求库:

        GLib 2.0+
        CMake
        LCM       (http://lcm.googlecode.com)
        Java      (Sun JDK or OpenJDK strongly preferred)
        Python
        GTK+ 2.0+ (required by bot2-vis)
        OpenGL    (required by bot2-vis)
        GLUT
        PyGTK
    libglib2.0-dev
    cmake
    sun-java6-jdk | default-jdk | openjdk-6-jdk
    python-dev
    python-gtk2
    libgtk2.0-dev
    mesa-common-dev
    libgl1-mesa-dev
    libglu1-mesa-dev
    freeglut3-dev
    libjpeg-dev

这是我的部分环境设置。

OS: Ubuntu 18.04
    freeglut3-dev is already the newest version (2.8.1-3)
    libxi-dev is already the newest version (2:1.7.9-1)
    libxmu-dev is already the newest version (2:1.1.2-2)
    binutils is already the newest version (2.30-21ubuntu1~18.04.3)
    libglu1-mesa-dev is already the newest version (9.0.0-2.1build1)
    libgtk2.0-dev is already the newest version (2.24.32-1ubuntu1)
    libjpeg-dev is already the newest version (8c-2ubuntu8)
    freeglut3-dev is already the newest version (2.8.1-3)
    libgl1-mesa-dev is already the newest version (19.2.8-0ubuntu0~18.04.3)
    libglib2.0-dev is already the newest version (2.56.4-0ubuntu0.18.04.6)
    mesa-common-dev is already the newest version (19.2.8-0ubuntu0~18.04.3)
    LCM version 1.4.0

当我使用sudo make时,我得到了这个错误。我发现我无法成功构建bot2-vis这个阶段。

-------------------------------------------
-- bot2-vis
-------------------------------------------
[  2%] Building C object src/bot_vis/CMakeFiles/bot2-vis.dir/viewer.c.o
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c: In function ‘bot_viewer_start_recording’:
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:136:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
     self->movie_gzf = gzopen(self->movie_path, "w");
                     ^
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:137:17: warning: passing argument 1 of ‘gzsetparams’ from incompatible pointer type [-Wincompatible-pointer-types]
     gzsetparams(self->movie_gzf, Z_BEST_SPEED, Z_DEFAULT_STRATEGY);
                 ^~~~
In file included from /home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:9:0:
/usr/include/zlib.h:1380:21: note: expected ‘gzFile {aka struct gzFile_s *}’ but argument is of type ‘struct gzFile_s **’
 ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
                     ^~~~~~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c: In function ‘bot_viewer_stop_recording’:
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:173:13: warning: passing argument 1 of ‘gzclose’ from incompatible pointer type [-Wincompatible-pointer-types]
     gzclose(self->movie_gzf);
             ^~~~
In file included from /home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:9:0:
/usr/include/zlib.h:1631:24: note: expected ‘gzFile {aka struct gzFile_s *}’ but argument is of type ‘struct gzFile_s **’
 ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
                        ^~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c: In function ‘on_gl_expose’:
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:498:18: warning: passing argument 1 of ‘gzprintf’ from incompatible pointer type [-Wincompatible-pointer-types]
         gzprintf(self->movie_gzf, "P6 %d %d %d\n", self->movie_width, self->movie_height, 255);
                  ^~~~
In file included from /home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:9:0:
/usr/include/zlib.h:1469:23: note: expected ‘gzFile {aka struct gzFile_s *}’ but argument is of type ‘struct gzFile_s **’
 ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
                       ^~~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:502:21: warning: passing argument 1 of ‘gzwrite’ from incompatible pointer type [-Wincompatible-pointer-types]
             gzwrite(self->movie_gzf, &self->movie_buffer[offset], self->movie_stride);
                     ^~~~
In file included from /home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:9:0:
/usr/include/zlib.h:1447:21: note: expected ‘gzFile {aka struct gzFile_s *}’ but argument is of type ‘struct gzFile_s **’
 ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
                     ^~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c: In function ‘on_button_press’:
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:600:5: error: expected ‘,’ or ‘;’ before ‘BotEventHandler’
     BotEventHandler *best_handler = NULL;
     ^~~~~~~~~~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:610:21: error: ‘best_handler’ undeclared (first use in this function); did you mean ‘sa_handler’?
                     best_handler = handler;
                     ^~~~~~~~~~~~
                     sa_handler
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:610:21: note: each undeclared identifier is reported only once for each function it appears in
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c: In function ‘on_motion_notify’:
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:690:2: error: expected ‘,’ or ‘;’ before ‘BotEventHandler’
  BotEventHandler *best_handler = NULL;
  ^~~~~~~~~~~~~~~
/home/chieh/github/libbot2/bot2-vis/src/bot_vis/viewer.c:701:21: error: ‘best_handler’ undeclared (first use in this function); did you mean ‘sa_handler’?
                     best_handler = handler;
                     ^~~~~~~~~~~~
                     sa_handler
src/bot_vis/CMakeFiles/bot2-vis.dir/build.make:322: recipe for target 'src/bot_vis/CMakeFiles/bot2-vis.dir/viewer.c.o' failed
make[4]: *** [src/bot_vis/CMakeFiles/bot2-vis.dir/viewer.c.o] Error 1
CMakeFiles/Makefile2:130: recipe for target 'src/bot_vis/CMakeFiles/bot2-vis.dir/all' failed
make[3]: *** [src/bot_vis/CMakeFiles/bot2-vis.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make[2]: *** [all] Error 2
Makefile:27: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:19: recipe for target 'all' failed
make: *** [all] Error 2

我怎么解决这个问题?谢谢

make python-2.7 cmake
  • 1 1 个回答
  • 75 Views

1 个回答

  • Voted
  1. Best Answer
    Knud Larsen
    2020-04-28T09:15:22+08:002020-04-28T09:15:22+08:00

    Ubuntu 18.04:构建请求 libbot2 的 MPNet:libbot2 错误

    sudo apt install openjdk11-jdk
    
    cd lcm-1.4.0/ && mkdir build && cd build/
    cmake -DLCM_ENABLE_TESTS=NO -DCMAKE_INSTALL_PREFIX=/usr ..
    make
    .
    [ 79%] Built target lcm-java
    .
    [ 90%] Built target lcm-python
    [100%] Built target lcm-lua
    

    注意:LCM_ENABLE_TESTS是默认选项,会导致 95% 的错误 → test/java/hamcrest-core-1.3/org/hamcrest/core/AllOf.java 。因此-DLCM_ENABLE_TESTS=NO,即在上面的构建示例中禁用了测试。

    *** 使用更高版本的libbot2 https://github.com/ripl-ttic/libbot2

     git clone https://github.com/ripl-ttic/libbot2.git
     cd libbot2/
     sudo make BUILD_PREFIX=/usr         ## no errors
    .
    [ 91%] Completed 'bot2-lcm-utils'
    [100%] Built target bot2-lcm-utils
    
    • 0

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve