mpromonet / v4l2rtspserver

RTSP Server for V4L2 device capture supporting HEVC/H264/JPEG/VP8/VP9
The Unlicense
1.82k stars 423 forks source link

error: 'struct std::atomic_flag' has no member named 'test #316

Closed pepeRossRobotics closed 1 year ago

pepeRossRobotics commented 1 year ago

Describe the bug Docker file will not build in a raspberry pi.

To Reproduce

Expected behavior A clean easy build

Terminal output

#0 60.84 ALSA_FOUND = TRUE
#0 60.84 running git submodule update --init 2>&1
#0 60.92 Submodule 'hls.js' (https://github.com/video-dev/hls.js) registered for path 'hls.js'
#0 60.92 Submodule 'v4l2wrapper' (https://github.com/mpromonet/v4l2wrapper) registered for path 'libv4l2cpp'
#0 60.94 Cloning into '/v4l2rtspserver/hls.js'...
#0 108.3 Cloning into '/v4l2rtspserver/libv4l2cpp'...
#0 109.5 Submodule path 'hls.js': checked out 'e90a1b999071e88af0f734ef18b9e8520c839cec'
#0 109.6 Submodule path 'libv4l2cpp': checked out 'fac4b836b556f6befc55663f2aa1d6577fbabb8a'
#0 109.6 -- Performing Test CXX_SUPPORTS_STATIC_LIBGCC
#0 109.9 -- Performing Test CXX_SUPPORTS_STATIC_LIBGCC - Success
#0 109.9 -- Performing Test CXX_SUPPORTS_STATIC_LIBSTDCPP
#0 110.2 -- Performing Test CXX_SUPPORTS_STATIC_LIBSTDCPP - Success
#0 110.2 -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
#0 110.3 -- CPACK_DEBIAN_PACKAGE_ARCHITECTURE=aarch64
#0 110.3 -- Configuring done
#0 110.5 -- Generating done
#0 110.5 -- Build files have been written to: /v4l2rtspserver
#0 110.6 Scanning dependencies of target libv4l2cpp
#0 110.6 [  0%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2Access.cpp.o
#0 111.5 [  0%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2Capture.cpp.o
#0 112.6 [  1%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2Device.cpp.o
#0 114.7 [  1%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2MmapDevice.cpp.o
#0 116.2 [  2%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2Output.cpp.o
#0 117.5 [  2%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2ReadWriteDevice.cpp.o
#0 118.3 [  3%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/logger.cpp.o
#0 119.3 [  3%] Linking CXX static library liblibv4l2cpp.a
#0 119.4 [  3%] Built target libv4l2cpp
#0 120.0 Scanning dependencies of target libv4l2rtspserver
#0 120.1 [  3%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/live/BasicUsageEnvironment/BasicHashTable.cpp.o
#0 120.8 [  4%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/live/BasicUsageEnvironment/BasicTaskScheduler.cpp.o
#0 121.2 /v4l2rtspserver/live/BasicUsageEnvironment/BasicTaskScheduler.cpp: In member function 'virtual void BasicTaskScheduler::SingleStep(unsigned int)':
#0 121.2 /v4l2rtspserver/live/BasicUsageEnvironment/BasicTaskScheduler.cpp:200:35: error: 'struct std::atomic_flag' has no member named 'test'
#0 121.2   200 |  if (fTriggersAwaitingHandling[i].test()) {
#0 121.2       |                                   ^~~~
#0 121.2 make[2]: *** [CMakeFiles/libv4l2rtspserver.dir/build.make:76: CMakeFiles/libv4l2rtspserver.dir/live/BasicUsageEnvironment/BasicTaskScheduler.cpp.o] Error 1
#0 121.2 make[1]: *** [CMakeFiles/Makefile2:99: CMakeFiles/libv4l2rtspserver.dir/all] Error 2
#0 121.2 make: *** [Makefile:163: all] Error 2
------
Dockerfile:6
--------------------
   5 |     
   6 | >>> RUN apt-get update \
   7 | >>>     && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates g++ autoconf automake libtool xz-utils cmake make pkg-config git wget libasound2-dev libssl-dev \
   8 | >>>     && cmake . && make install && apt-get clean && rm -rf /var/lib/apt/lists/
   9 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update     && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates g++ autoconf automake libtool xz-utils cmake make pkg-config git wget libasound2-dev libssl-dev     && cmake . && make install && apt-get clean && rm -rf /var/lib/apt/lists/" did not complete successfully: exit code: 2

Desktop:

Additional context I tried with multiple docker files (some hoe brew) and I get the same error

pepeRossRobotics commented 1 year ago

Same happens if I try to build outside the container and installing all libs (in a raspberry pi)

Scanning dependencies of target libv4l2cpp
[  0%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2Access.cpp.o
[  0%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2Capture.cpp.o
[  1%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2Device.cpp.o
[  1%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2MmapDevice.cpp.o
[  2%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2Output.cpp.o
[  2%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/V4l2ReadWriteDevice.cpp.o
[  3%] Building CXX object libv4l2cpp/CMakeFiles/libv4l2cpp.dir/src/logger.cpp.o
[  3%] Linking CXX static library liblibv4l2cpp.a
[  3%] Built target libv4l2cpp
Scanning dependencies of target libv4l2rtspserver
[  3%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/live/BasicUsageEnvironment/BasicHashTable.cpp.o
[  4%] Building CXX object CMakeFiles/libv4l2rtspserver.dir/live/BasicUsageEnvironment/BasicTaskScheduler.cpp.o
/home/extrm_mk4/v4l2rtspserver/live/BasicUsageEnvironment/BasicTaskScheduler.cpp: In member function ‘virtual void BasicTaskScheduler::SingleStep(unsigned int)’:
/home/extrm_mk4/v4l2rtspserver/live/BasicUsageEnvironment/BasicTaskScheduler.cpp:200:35: error: ‘struct std::atomic_flag’ has no member named ‘test’
  200 |  if (fTriggersAwaitingHandling[i].test()) {
      |                                   ^~~~
make[2]: *** [CMakeFiles/libv4l2rtspserver.dir/build.make:95: CMakeFiles/libv4l2rtspserver.dir/live/BasicUsageEnvironment/BasicTaskScheduler.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:118: CMakeFiles/libv4l2rtspserver.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
pepeRossRobotics commented 1 year ago

There is an issue in the live555 repo https://github.com/rgaufman/live555/issues/45