mpromonet / v4l2rtspserver

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

Errors when compiling for Openwrt 22.0.3 #306

Closed t3therdev closed 8 months ago

t3therdev commented 1 year ago

Describe the bug Compiling v4l2rtspserver for Openwrt 22.03.3, the default feed (https://git.openwrt.org/?p=feed/packages.git;a=shortlog;h=refs/heads/openwrt-22.03) has version 2.3.

To add audio support, I did these modifcations, which seem to work as well after recompile:

--- a/package/feeds/packages/v4l2rtspserver/Makefile
+++ a/package/feeds/packages/v4l2rtspserver/Makefile
@@ -31,7 +31,7 @@
        SECTION:=multimedia
        CATEGORY:=Multimedia
        TITLE:=v4l2rtspserver
-       DEPENDS:=+libstdcpp
+       DEPENDS:=+libstdcpp +AUDIO_SUPPORT:alsa-lib
        URL:=https://github.com/mpromonet/v4l2rtspserver
 endef

@@ -53,7 +53,7 @@
 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed

 CMAKE_OPTIONS += \
-       -DALSA=OFF \
+       -DALSA=ON \
        -DLIVE555CFLAGS=" -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1 -DNO_OPENSSL"

 define Build/Prepare

I found that the Master feed (https://git.openwrt.org/?p=feed/packages.git;a=shortlog;h=refs/heads/master) has the newer version 3.7, but when I try to compile with those same changes above, it won't compile. Diff between feed package: https://git.openwrt.org/?p=feed/packages.git;a=commitdiff;h=40d516b15610fcf4b6e9e9f6b0f373b8aa09643f

Output of compile:
--------------------------------------------------------------------------------
user@openwrt-dev:~/projects/openwrt/openwrt$ make package/v4l2rtspserver/compile V=s
make[2]: Entering directory '/home/user/projects/openwrt/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/user/projects/openwrt/openwrt/scripts/config'
time: target/linux/prereq#0.19#0.03#0.22
make[1]: Entering directory '/home/user/projects/openwrt/openwrt'
cd "/home/user/projects/openwrt/openwrt"; git log --format=%h -1 toolchain > /home/user/projects/openwrt/openwrt/tmp/.ver_check
cmp -s /home/user/projects/openwrt/openwrt/tmp/.ver_check /home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/stamp/.ver_check || { \
        rm -rf /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl /home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl /home/user/projects/openwrt/openwrt/build_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl; \
        mkdir -p /home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/stamp; \
        mv /home/user/projects/openwrt/openwrt/tmp/.ver_check /home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/stamp/.ver_check; \
}
make[2]: Entering directory '/home/user/projects/openwrt/openwrt/package/libs/toolchain'
Makefile:735: WARNING: skipping libgomp -- package has no install section
echo "libc" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/toolchain.default.install
echo "libgcc" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/toolchain.default.install
echo "libatomic" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/toolchain.default.install
echo "libstdcpp" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/toolchain.default.install
echo "libpthread" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/toolchain.default.install
echo "librt" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/toolchain.default.install
touch -r /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/toolchain/.built /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/toolchain/.autoremove 2>/dev/null >/dev/null
find /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/toolchain -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir'  -print0 | xargs -r -0 rm -rf
make[2]: Leaving directory '/home/user/projects/openwrt/openwrt/package/libs/toolchain'
time: package/libs/toolchain/compile#0.12#0.02#0.13
make[2]: Entering directory '/home/user/projects/openwrt/openwrt/package/firmware/linux-firmware'
touch -r /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/linux-firmware-20220411/.built /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/linux-firmware-20220411/.autoremove 2>/dev/null >/dev/null
find /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/linux-firmware-20220411 -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir'  -print0 | xargs -r -0 rm -rf
make[2]: Leaving directory '/home/user/projects/openwrt/openwrt/package/firmware/linux-firmware'
time: package/firmware/linux-firmware/compile#0.84#0.04#0.87
make[2]: Entering directory '/home/user/projects/openwrt/openwrt/package/firmware/prism54-firmware'
touch -r /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/prism54-firmware/.built /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/prism54-firmware/.autoremove 2>/dev/null >/dev/null
find /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/prism54-firmware -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir'  -print0 | xargs -r -0 rm -rf
make[2]: Leaving directory '/home/user/projects/openwrt/openwrt/package/firmware/prism54-firmware'
time: package/firmware/prism54-firmware/compile#0.25#0.04#0.28
make[2]: Entering directory '/home/user/projects/openwrt/openwrt/package/kernel/gpio-button-hotplug'
echo "kmod-gpio-button-hotplug" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/gpio-button-hotplug.default.install
touch -r /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/gpio-button-hotplug/.built /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/gpio-button-hotplug/.autoremove 2>/dev/null >/dev/null
find /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/gpio-button-hotplug -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir'  -print0 | xargs -r -0 rm -rf
make[2]: Leaving directory '/home/user/projects/openwrt/openwrt/package/kernel/gpio-button-hotplug'
time: package/kernel/gpio-button-hotplug/compile#0.10#0.01#0.11
make[2]: Entering directory '/home/user/projects/openwrt/openwrt/package/kernel/linux'
echo "kernel" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-scsi-core" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-aead" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-ccm" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-cmac" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-crc32c" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-ctr" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-gcm" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-gf128" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-ghash" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-hash" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-hmac" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
WARNING: kmod-crypto-hw-padlock is not available in the kernel config - generating empty package
echo "kmod-crypto-manager" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-null" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-rng" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-seqiv" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-crypto-sha256" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-fs-ext4" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-i2c-core" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
WARNING: kmod-i2c-pxa is not available in the kernel config - generating empty package
echo "kmod-input-core" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-leds-gpio" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-lib-crc-ccitt" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-lib-crc16" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-lib-crc32c" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
WARNING: kmod-phylink is not available in the kernel config - generating empty package
WARNING: kmod-ixgbevf is not available in the kernel config - generating empty package
WARNING: kmod-iavf is not available in the kernel config - generating empty package
WARNING: kmod-sfp is not available in the kernel config - generating empty package
echo "kmod-nf-reject" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nf-reject6" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nf-ipt" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-ipt-core" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nf-conntrack" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nf-conntrack6" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nf-log" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nf-log6" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nf-nat" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nf-flow" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-ipt-conntrack" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-ipt-conntrack-extra" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-ipt-nat" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nfnetlink" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nft-core" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nft-nat" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nft-offload" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nft-fib" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-slhc" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-ppp" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-pppox" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-pppoe" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-nls-base" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-dma-buf" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
WARNING: kmod-parport-pc is not available in the kernel config - generating empty package
echo "kmod-mmc" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-rtc-pcf8563" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-regmap-core" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
WARNING: kmod-thermal is not available in the kernel config - generating empty package
WARNING: kmod-w83627hf-wdt is not available in the kernel config - generating empty package
WARNING: kmod-itco-wdt is not available in the kernel config - generating empty package
WARNING: kmod-it87-wdt is not available in the kernel config - generating empty package
echo "kmod-sound-core" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-ac97" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-sound-soc-core" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
WARNING: kmod-sound-hda-core is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-realtek is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-cmedia is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-analog is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-idt is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-si3054 is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-cirrus is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-ca0110 is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-ca0132 is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-conexant is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-via is not available in the kernel config - generating empty package
WARNING: kmod-sound-hda-codec-hdmi is not available in the kernel config - generating empty package
echo "kmod-usb-core" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-usb-ledtrig-usbport" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-usb-uhci" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-usb-ohci" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-usb-ehci" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-usb2" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-usb-audio" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-usb-storage" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-video-core" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-video-videobuf2" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-video-uvc" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
WARNING: kmod-net-prism54 is not available in the kernel config - generating empty package
WARNING: kmod-ca8210 is not available in the kernel config - generating empty package
echo "kmod-sdhci-mt7620" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-i2c-mt7628" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
echo "kmod-dma-ralink" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/linux.default.install
touch -r /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/packages/.built /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/packages/.autoremove 2>/dev/null >/dev/null
find /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/packages -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir'  -print0 | xargs -r -0 rm -rf
make[2]: [Makefile:65: compile] Error 1 (ignored)
make[2]: Leaving directory '/home/user/projects/openwrt/openwrt/package/kernel/linux'
time: package/kernel/linux/compile#1.36#0.11#1.47
make[2]: Entering directory '/home/user/projects/openwrt/openwrt/feeds/packages/libs/alsa-lib'
echo "alsa-lib" >> /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/pkginfo/alsa-lib.default.install
touch -r /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/alsa-lib-1.2.6.1/.built /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/alsa-lib-1.2.6.1/.autoremove 2>/dev/null >/dev/null
find /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/alsa-lib-1.2.6.1 -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir'  -print0 | xargs -r -0 rm -rf
make[2]: Leaving directory '/home/user/projects/openwrt/openwrt/feeds/packages/libs/alsa-lib'
time: package/feeds/packages/alsa-lib/compile#0.13#0.02#0.14
make[2]: Entering directory '/home/user/projects/openwrt/openwrt/feeds/packages/multimedia/v4l2rtspserver'
rm -f /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/v4l2rtspserver-0.3.7/.built
touch /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/v4l2rtspserver-0.3.7/.built_check
MAKEFLAGS="" /home/user/projects/openwrt/openwrt/staging_dir/host/bin/ninja  -j1 -C /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/v4l2rtspserver-0.3.7
ninja: Entering directory `/home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/v4l2rtspserver-0.3.7'
[1/1] Linking CXX executable v4l2rtspserver
FAILED: v4l2rtspserver
: && /home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin/mipsel-openwrt-linux-musl-g++ -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/v4l2rtspserver-0.3.7=v4l2rtspserver-0.3.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -flto -DNDEBUG -L/home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/usr/lib -L/home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/lib -znow -zrelro -Wl,--gc-sections,--as-needed   -rdynamic CMakeFiles/v4l2rtspserver.dir/main.cpp.o -o v4l2rtspserver  liblibv4l2rtspserver.a  /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libssl.so  -lasound  libv4l2cpp/liblibv4l2cpp.a  -static-libgcc  -static-libstdc++  /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libcrypto.so && :
v4l2rtspserver-0.3.7/live/liveMedia/MPEG1or2Demux.cpp:29:6: warning: type 'MPEGParseState' violates the C++ One Definition Rule [-Wodr]
v4l2rtspserver-0.3.7/live/liveMedia/MPEG1or2VideoStreamFramer.cpp:29:6: note: an enum with different value name is defined in another translation unit
v4l2rtspserver-0.3.7/live/liveMedia/MPEG1or2Demux.cpp:30:3: note: name 'PARSING_PACK_HEADER' differs from name 'PARSING_VIDEO_SEQUENCE_HEADER' defined in another translation unit
v4l2rtspserver-0.3.7/live/liveMedia/MPEG1or2VideoStreamFramer.cpp:30:3: note: mismatching definition
/home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/lib/gcc/mipsel-openwrt-linux-musl/11.2.0/../../../../mipsel-openwrt-linux-musl/bin/ld: /home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/lib/libstdc++.a(eh_throw.o): undefined reference to symbol '_Unwind_Resume_or_Rethrow@@GCC_3.3'
/home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/lib/gcc/mipsel-openwrt-linux-musl/11.2.0/../../../../mipsel-openwrt-linux-musl/bin/ld: /home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-11.2.0_musl/lib/libgcc_s.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make[2]: *** [Makefile:80: /home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/v4l2rtspserver-0.3.7/.built] Error 1
make[2]: Leaving directory '/home/user/projects/openwrt/openwrt/feeds/packages/multimedia/v4l2rtspserver'
time: package/feeds/packages/v4l2rtspserver/compile#5.66#0.23#5.76
    ERROR: package/feeds/packages/v4l2rtspserver failed to build.
make[1]: *** [package/Makefile:116: package/feeds/packages/v4l2rtspserver/compile] Error 1
make[1]: Leaving directory '/home/user/projects/openwrt/openwrt'
make: *** [/home/user/projects/openwrt/openwrt/include/toplevel.mk:230: package/v4l2rtspserver/compile] Error 2
--------------------------------------------------------------------------------
mpromonet commented 1 year ago

Hi,

It seems you did not clean cmake generated files. Using 3.7 should not link static gcc/stdc++ as we see in the output : && /home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin/mipsel-openwrt-linux-musl-g++ -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -ffile-prefix-map=/home/user/projects/openwrt/openwrt/build_dir/target-mipsel_24kc_musl/v4l2rtspserver-0.3.7=v4l2rtspserver-0.3.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -flto -DNDEBUG -L/home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/usr/lib -L/home/user/projects/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/lib -znow -zrelro -Wl,--gc-sections,--as-needed -rdynamic CMakeFiles/v4l2rtspserver.dir/main.cpp.o -o v4l2rtspserver liblibv4l2rtspserver.a /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libssl.so -lasound libv4l2cpp/liblibv4l2cpp.a -static-libgcc -static-libstdc++ /home/user/projects/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl/usr/lib/libcrypto.so && : Enabling -DSTATICSTDCPP=OFF should not include -static-libgcc -static-libstdc++

Best Regards, Michel.