Compile error latest git master
Jackfritt opened this issue · 8 comments
Did you read the guide?
Yes
What is the base version number of MotionPlus being used?
0.1.x
What was the install method?
Built from source code
What is base architecture?
ARM-32bit
What is the distro being used?
Raspbian
Disto version number
bookworm 12.1
Camera/Sound type(s) being used?
Other
Describe the issue/problem and steps to reproduce
In file included from motion_loop.cpp:23:
motion_loop.cpp: In function ‘void mlp_frametiming(ctx_dev*)’:
motion_loop.cpp:1421:22: error: conversion from ‘int64_t’ {aka ‘long long int’} to ‘__syscall_slong_t’ {aka ‘long int’} may change value [-Werror=conversion]
1421 | SLEEP(0, avgtime);
util.hpp:91:32: note: in definition of macro ‘SLEEP’
91 | ts1.tv_nsec = (nanoseconds);
| ^~~~~~~~~~~
cc1plus: all warnings being treated as errors
changing this to
//SLEEP(0, avgtime);
SLEEP(0, 1)
remove the "error" from that file but there are other files :)
In file included from netcam.cpp:37:
netcam.cpp: In function ‘void netcam_handler_wait(ctx_netcam*)’:
netcam.cpp:2263:29: error: conversion from ‘int64_t’ {aka ‘long long int’} to ‘__syscall_slong_t’ {aka ‘long int’} may change value [-Werror=conversion]
2263 | SLEEP(0, usec_ltncy * 1000);
util.hpp:91:32: note: in definition of macro ‘SLEEP’
91 | ts1.tv_nsec = (nanoseconds);
| ^~~~~~~~~~~
cc1plus: all warnings being treated as errors
Relevant MotionPlus log output (at log_level 8)
not compiling yet...
Threat errors as warning then compile works.
CPPFLAGS=-Wno-error=conversion ./configure
Install and running it also no problems yet. video is choppy but thats like the old version I build, have to investigate this.
You likely already aware but I also get this deprecated one:
movie.cpp: In function ‘int movie_put_image(ctx_movie*, ctx_image_data*, const timespec*)’:
movie.cpp:1451:29: error: ‘AVFrame::key_frame’ is deprecated [-Werror=deprecated-declarations]
1451 | movie->picture->key_frame = 1;
| ^~~~~~~~~
In file included from /usr/include/libavformat/avformat.h:327,
from motionplus.hpp:64,
from movie.cpp:36:
/usr/include/libavutil/frame.h:436:9: note: declared here
436 | int key_frame;
Thanks. (I'm not getting either of these on my dev machine). I'll push the removal of the -Werror on the default configure in a bit.
Also I do not see the error reported by @Jackfritt.
And, in case of interest this is what I am using:
gcc version 13.2.1
with:
export CFLAGS="-march=x86-64-v3 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection -std=gnu18"
Running and building on arch. ffmpeg is 6.1.1 - specifically:
pacman -Q ffmpeg
ffmpeg 2:6.1.1-7