0

Let me describe my problems. So far I was building the MPNet which requests the libbot2 library.

I have installed the requirement libraries as followed:

        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

Here is my partial of environment setting.

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

When I used sudo make, I got this error. I found I cannot build successfully bot2-vis this stage.

-------------------------------------------
-- 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

How can I solve this problem? Thank you

0

Ubuntu 18.04: building the MPNet which requests libbot2: libbot2 errors

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

Note: LCM_ENABLE_TESTS is a default option, and results in errors at 95% → test/java/hamcrest-core-1.3/org/hamcrest/core/AllOf.java . Hence -DLCM_ENABLE_TESTS=NO, i.e. the tests are disabled in the above build example.

*** Using a later version of 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.