goestools icon indicating copy to clipboard operation
goestools copied to clipboard

Some issues building with Bullseye

Open RyLeeRyno opened this issue 3 years ago • 2 comments

Hello Goesers,

I'm new to Github so forgive me if I'm not providing build recommendations in the correct context.

To Summarize: Debian Bullseye introduced OpenCV 4 and Project 7 which are incompatible with the existing build. I've had to make a few modifications as follows:

CMakeLists.txt in the main folder.

  • Line 85 add: include_directories(BEFORE SYSTEM /usr/include/opencv4)

src/goesproc/CMakeLists.txt

  • Line 23 replace with: pkg_check_modules(OPENCV REQUIRED opencv4)

src/lib/packet_reader.h

  • Line 5 add: #include <stdint.h>

src/lib/packet_writer.h

  • Line 4 add: #include <stdint.h>

src/goesproc/config.cc

  • Line 210 replace with: auto img = cv::imread(path, cv::IMREAD_UNCHANGED);

src/goesproc/image.cc

  • Lines 302 and 309 replace: return std::move(out); with return out;

And lastly see https://github.com/pietern/goestools/pull/83

I hope this is helpful for anyone struggling with compiling goestools with Bullseye. Thank you.

RyLeeRyno avatar Aug 20 '21 00:08 RyLeeRyno

I added those changes but I'm getting this error on the latest Bullseye:

In file included from /home/pi/goestools/src/lib/packet_reader.cc:1:
/home/pi/goestools/src/lib/packet_reader.h:11:38: error: ‘uint8_t’ was not declared in this scope
   11 |   virtual bool nextPacket(std::array<uint8_t, 892>& out) = 0;
      |                                      ^~~~~~~
/home/pi/goestools/src/lib/packet_reader.h:11:50: error: template argument 1 is invalid
   11 |   virtual bool nextPacket(std::array<uint8_t, 892>& out) = 0;
      |                                                  ^
make[2]: *** [src/lib/CMakeFiles/packet_reader.dir/build.make:82: src/lib/CMakeFiles/packet_reader.dir/packet_reader.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1681: src/lib/CMakeFiles/packet_reader.dir/all] Error 2

I think in your comment you mentioned src/lib/packet_writer.h twice. One should be src/lib/packet_reader.h

hjf avatar Nov 02 '21 21:11 hjf

CMakeLists.txt in the main folder.

Line 84 replace with: include_directories(BEFORE SYSTEM /usr/include/opencv4)

Replacing this messed up some dependencies. Adding this line after 84 worked though.

Higgy710 avatar Dec 17 '21 04:12 Higgy710