progweb / gpx2video

Creating video with telemetry overlay from GPX data
GNU General Public License v3.0
186 stars 10 forks source link

Won't build extractor on Arch Linux #23

Open QuetschKuh opened 1 year ago

QuetschKuh commented 1 year ago

When installing as usual an error about "std::setprecision" comes up. After doing the fix 'make' recommends it errors at 97% because of "av_mallocz_array". I should have all dependencies installed, at least 'cmake ..' confirmed that everything was there. Although I had some trouble installing certain dependencies due to them not or barely being available on the AUR. I also tried building on my laptop running fedora, there 'cmake ..' errors due to not finding libevent (even though it is installed using dnf).

Steps to reproduce the behaviour:

  1. Install the program as described in the README
  2. Wait for 'make' to reach about 70%
  3. Error
  4. include \<iomanip> in extractor.cpp

  5. Wait for 'make' to reach 97%
  6. Error

Expected behaviour: The program builds as usual lol

System Specifications:

Error before "fix" [ 70%] Building CXX object CMakeFiles/gpx2video.dir/src/frame.cpp.o [ 71%] Building CXX object CMakeFiles/gpx2video.dir/src/extractor.cpp.o gpx2video/src/extractor.cpp: In member function ‘virtual bool Extractor::run()’: gpx2video/src/extractor.cpp:215:46: error: ‘setprecision’ is not a member of ‘std’ 215 | out_ << std::setprecision(9); | ^~~~~~~~~~~~ gpx2video/src/extractor.cpp:14:1: note: ‘std::setprecision’ is defined in header ‘<iomanip>’; did you forget to ‘#include <iomanip>’? 13 | #include "extractor.h" +++ |+#include <iomanip> 14 | make[2]: *** [CMakeFiles/gpx2video.dir/build.make:230: CMakeFiles/gpx2video.dir/src/extractor.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:139: CMakeFiles/gpx2video.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

Error after "fix" [ 96%] Building C object tests/CMakeFiles/extract-gpx.dir/test-extract.c.o gpx2video/tests/test-extract.c: In function ‘open_input_file’: gpx2video/tests/test-extract.c:77:22: warning: implicit declaration of function ‘av_mallocz_array’; did you mean ‘av_malloc_array’? [-Wimplicit-function-declaration] 77 | stream_ctx = av_mallocz_array(ifmt_ctx->nb_streams, sizeof(*stream_ctx)); | ^~~~~~~~~~~~~~~~ | av_malloc_array gpx2video/tests/test-extract.c:77:20: warning: assignment to ‘StreamContext *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 77 | stream_ctx = av_mallocz_array(ifmt_ctx->nb_streams, sizeof(*stream_ctx)); | ^ [ 97%] Linking C executable extract-gpx /usr/bin/ld: CMakeFiles/extract-gpx.dir/test-extract.c.o: in function 'open_input_file': gpx2video/tests/test-extract.c:77:(.text.startup+0xe5): undefined reference to 'av_mallocz_array' collect2: error: ld returned 1 exit status make[2]: *** [tests/CMakeFiles/extract-gpx.dir/build.make:97: tests/extract-gpx] Error 1 make[1]: *** [CMakeFiles/Makefile2:217: tests/CMakeFiles/extract-gpx.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

progweb commented 1 year ago

Should be fixed.

tests are only to do some api tests and so shouldn't be built.