[OpenWrt Compile]: FAILED: src/libmedialibrary.a.p/utils_Strings.cpp.o
Attempting to port VLC to openwrt (using contribs), for a tiled security camera app, X11 / support libraries already working.
Latest master VLC version, checked out yesterday.
Can someone toss me a bone to fix this?
Thanks; Bill
Getting this compile error which I suspect is a build infrastructure issue, missing library or include:
[44/58] Compiling C++ object src/libmedialibrary.a.p/utils_Strings.cpp.o
FAILED: src/libmedialibrary.a.p/utils_Strings.cpp.o
aarch64-openwrt-linux-g++ -Isrc/libmedialibrary.a.p -Isrc -I../src -I. -I.. -Iinclude -I../include -I../src/utils/xxhash -I/include -I/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -std=c++14 -O2 -g -DHAVE_CONFIG_H=1 -fPIC -pthread -MD -MQ src/libmedialibrary.a.p/utils_Strings.cpp.o -MF src/libmedialibrary.a.p/utils_Strings.cpp.o.d -o src/libmedialibrary.a.p/utils_Strings.cpp.o -c ../src/utils/Strings.cpp
../src/utils/Strings.cpp: In function 'std::string medialibrary::utils::str::trim(std::string)':
../src/utils/Strings.cpp:44:11: error: no matching function for call to 'std::basic_string<char>::erase(std::basic_string<char>::iterator, __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >)'
}));
^
In file included from /home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/string:52,
from ../src/utils/Strings.h:25,
from ../src/utils/Strings.cpp:27:
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4632:7: note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]'
erase(size_type __pos = 0, size_type __n = npos)
^~~~~
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4632:7: note: no known conversion for argument 1 from 'std::basic_string<char>::iterator' {aka '__gnu_cxx::__normal_iterator<char*, std::basic_string<char> >'} to 'std::basic_string<char>::size_type' {aka 'long unsigned int'}
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4648:7: note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]'
erase(iterator __position)
^~~~~
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4648:7: note: candidate expects 1 argument, 2 provided
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4668:7: note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator, std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]'
erase(iterator __first, iterator __last);
^~~~~
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4668:7: note: no known conversion for argument 2 from '__normal_iterator<const char*,[...]>' to '__normal_iterator<char*,[...]>'
../src/utils/Strings.cpp:47:32: error: no matching function for call to 'std::basic_string<char>::erase(std::reverse_iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > >::iterator_type, std::basic_string<char>::iterator)'
}).base(), value.end() );
^
In file included from /home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/string:52,
from ../src/utils/Strings.h:25,
from ../src/utils/Strings.cpp:27:
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4632:7: note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]'
erase(size_type __pos = 0, size_type __n = npos)
^~~~~
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4632:7: note: no known conversion for argument 1 from 'std::reverse_iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > >::iterator_type' {aka '__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >'} to 'std::basic_string<char>::size_type' {aka 'long unsigned int'}
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4648:7: note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]'
erase(iterator __position)
^~~~~
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4648:7: note: candidate expects 1 argument, 2 provided
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4668:7: note: candidate: 'std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator, std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]'
erase(iterator __first, iterator __last);
^~~~~
/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/aarch64-openwrt-linux-gnu/include/c++/8.4.0/bits/basic_string.h:4668:7: note: no known conversion for argument 1 from '__normal_iterator<const char*,[...]>' to '__normal_iterator<char*,[...]>'
[46/58] Compiling C++ object src/libmedialibrary.a.p/utils_ModificationsNotifier.cpp.o
ninja: build stopped: subcommand failed.
Here's what leads up to it:
cd medialibrary && CC="aarch64-openwrt-linux-gcc" CXX="aarch64-openwrt-linux-g++" LD="aarch64-openwrt-linux-ld" AR="aarch64-openwrt-linux-gcc-ar" CCAS="aarch64-openwrt-linux-gcc -c" RANLIB="aarch64-openwrt-linux-gcc-ranlib" STRIP="aarch64-openwrt-linux-strip" PATH="/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/extras/tools/build/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/host/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/hostpkg/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/host/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/host/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PKG_CONFIG="/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/host/bin/pkg-config" CPPFLAGS="-Os -pipe -march=armv8-a -mtune=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3=vlc-3.0.17.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fPIC -Wno-error=format-security -L/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/lib/libintl-full/lib/ -L/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/lib/ -I/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux/include" CFLAGS="-Os -pipe -march=armv8-a -mtune=cortex-a53 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3=vlc-3.0.17.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fPIC -Wno-error=format-security -L/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/lib/libintl-full/lib/ -L/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/lib/ -I/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux/include" CXXFLAGS=" -I/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux/include " LDFLAGS="-L/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/usr/lib -L/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/lib -znow -zrelro -L/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/lib/ -L/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/lib/libintl-full/lib/ -L/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/root-armvirt/usr/lib -Wl,-rpath-link=/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/root-armvirt/usr/lib -lssl -lcrypto -L/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux/lib " env -i PATH="/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/extras/tools/build/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/host/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/hostpkg/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_glibc/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/host/bin:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/host/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PKG_CONFIG_PATH="/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux/lib/pkgconfig:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/lib/pkgconfig:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/share/pkgconfig" meson -Dpkg_config_path="/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux/lib/pkgconfig:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/lib/pkgconfig:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/share/pkgconfig" --default-library static --prefix "/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux" --backend ninja -Dlibdir=lib --buildtype debugoptimized --cross-file /home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/cross/crossfile.meson -Dlibvlc=disabled -Dlibtool_workaround=true build
DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: cpp_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
The Meson build system
Version: 0.61.4
Source dir: /home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/cross/medialibrary
Build dir: /home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/cross/medialibrary/build
Build type: cross build
Project name: medialibrary
Project version: 0.12.0
C compiler for the host machine: aarch64-openwrt-linux-gcc (gcc 8.4.0 "aarch64-openwrt-linux-gcc (OpenWrt GCC 8.4.0 r16495-bf0c965af0) 8.4.0")
C linker for the host machine: aarch64-openwrt-linux-gcc ld.bfd 2.35.1
C++ compiler for the host machine: aarch64-openwrt-linux-g++ (gcc 8.4.0 "aarch64-openwrt-linux-g++ (OpenWrt GCC 8.4.0 r16495-bf0c965af0) 8.4.0")
C++ linker for the host machine: aarch64-openwrt-linux-g++ ld.bfd 2.35.1
C compiler for the build machine: ccache cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
C linker for the build machine: cc ld.bfd 2.34
C++ compiler for the build machine: ccache c++ (gcc 9.4.0 "c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
C++ linker for the build machine: c++ ld.bfd 2.34
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: aarch64
Host machine cpu: aarch64
Target machine cpu family: aarch64
Target machine cpu: aarch64
Checking for function "link" : YES
Message: Checking for C++11 thread support
Message: Checking for C++11 mutex support
Message: Checking for C++11 thread_local support
Message: Checking for C++11 condition_variable support
Run-time dependency threads found: YES
Library atomic found: YES
Found pkg-config: /home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/host/bin/pkg-config (1.7.3)
Run-time dependency sqlite3 found: YES 3.33.0
Dependency libvlc skipped: feature libvlc disabled
Found CMake: NO
Run-time dependency libxxhash found: NO (tried pkgconfig and cmake)
Configuring config.h using configuration
Run-time dependency benchmark found: NO (tried pkgconfig and cmake)
Build targets in project: 1
medialibrary 0.12.0
User defined options
Cross files : /home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/cross/crossfile.meson
backend : ninja
buildtype : debugoptimized
default_library : static
libdir : lib
pkg_config_path : /home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux/lib/pkgconfig:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/lib/pkgconfig:/home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/target-aarch64_cortex-a53_glibc/usr/share/pkgconfig
prefix : /home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/build_dir/target-aarch64_cortex-a53_glibc/vlc-3.0.17.3/contrib/aarch64-openwrt-linux
libtool_workaround: true
libvlc : disabled
Found ninja-1.10.2 at /home/rossb/openwrt/v21.02.2/openwrt-v21.02.2/staging_dir/hostpkg/bin/ninja
ninja -C medialibrary/build
ninja: Entering directory `medialibrary/build'
[44/58] Compiling C++ object src/libmedialibrary.a.p/utils_Strings.cpp.o
Edited by Hugo Beauzée-Luyssen