Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error building version 0.18.0 on Amazon Linux 2 #506

Open
yokrysty opened this issue Jul 8, 2023 · 6 comments
Open

error building version 0.18.0 on Amazon Linux 2 #506

yokrysty opened this issue Jul 8, 2023 · 6 comments
Labels

Comments

@yokrysty
Copy link

yokrysty commented Jul 8, 2023

Describe the bug
since version 0.18.0 i get build errors on Amazon Linux 2

Steps To Reproduce

wget https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0.tar.gz
tar zxf patchelf-0.18.0.tar.gz
cd patchelf-0.18.0
./configure
make

i get less errors using
./configure CXXFLAGS='-fpermissive'

Expected behavior

successful build

Additional context

uname -a
Linux amazonlinux.onprem 4.14.318-241.531.amzn2.x86_64 #1 SMP Tue Jun 27 21:49:00 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
[root@amazonlinux patchelf-0.18.0]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for strip... strip
checking for objdump... objdump
checking for objcopy... objcopy
checking for readelf... readelf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking dependency style of gcc... gcc3
checking whether g++ supports C++17 features with -std=c++17... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating patchelf.spec
config.status: executing depfiles commands
[root@amazonlinux patchelf-0.18.0]# clear
[root@amazonlinux patchelf-0.18.0]# make
Making all in src
make[1]: Entering directory `/root/patchelf-0.18.0/src'
g++ -std=c++17 -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.18.0\" -DPACKAGE_STRING=\"patchelf\ 0.18.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.18.0\" -DHAVE_CXX17=1 -I.    -Wall -Wextra -Wcast-qual -std=c++17 -D_FILE_OFFSET_BITS=64     -g -O2 -MT patchelf.o -MD -MP -MF .deps/patchelf.Tpo -c -o patchelf.o patchelf.cc
patchelf.cc: In instantiation of ‘ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>)::<lambda(auto:5, auto:6&)> [with auto:5 = span<Elf32_Sym>; auto:6 = std::vector<unsigned int>; Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]’:
patchelf.cc:2077:16:   required from ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]’
patchelf.cc:2208:28:   required from ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::renameDynamicSymbols(const std::unordered_map<std::basic_string_view<char>, std::__cxx11::basic_string<char> >&) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]’
patchelf.cc:2442:9:   required from ‘void patchElf2(ElfFile&&, const FileContents&, const string&) [with ElfFile = ElfFile<Elf32_Ehdr, Elf32_Phdr, Elf32_Shdr, unsigned int, unsigned int, Elf32_Dyn, Elf32_Sym, short unsigned int, Elf32_Verdef, Elf32_Verdaux, Elf32_Verneed, Elf32_Vernaux, Elf32_Rel, Elf32_Rela, 32>; FileContents = std::shared_ptr<std::vector<unsigned char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]’
patchelf.cc:2463:256:   required from here
patchelf.cc:2072:21: error: class template argument deduction failed:
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
patchelf.cc:2072:21: error: no matching function for call to ‘vector(Elf32_Sym*, Elf32_Sym*)’
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:411:2: note: candidate: template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>
  vector(_InputIterator __first, _InputIterator __last,
  ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:411:2: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   couldn't deduce template parameter ‘_Tp’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:383:7: note: candidate: template<class _Tp, class _Alloc> vector(std::initializer_list<_Tp>, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(initializer_list<value_type> __l,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:383:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘Elf32_Sym*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:358:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __rv, const allocator_type& __m)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:358:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::vector<_Tp, _Alloc>’ and ‘Elf32_Sym*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:348:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x, const allocator_type& __a)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:348:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘const std::vector<_Tp, _Alloc>’ and ‘Elf32_Sym*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:344:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __x) noexcept
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:344:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::vector<_Tp, _Alloc>’ and ‘Elf32_Sym*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:326:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:326:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘const std::vector<_Tp, _Alloc>’ and ‘Elf32_Sym*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:295:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const value_type& __value,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:295:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   cannot convert ‘dst.span<Elf32_Sym>::begin()’ (type ‘Elf32_Sym*’) to type ‘std::vector<_Tp, _Alloc>::size_type {aka long unsigned int}’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:283:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:283:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   couldn't deduce template parameter ‘_Tp’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:270:7: note: candidate: template<class _Tp, class _Alloc> vector(const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:270:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   candidate expects 1 argument, 2 provided
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: template<class _Tp, class _Alloc> vector()-> std::vector<_Tp, _Alloc>
       vector()
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:259:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   candidate expects 0 arguments, 2 provided
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
patchelf.cc: In instantiation of ‘ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>)::<lambda(auto:5, auto:6&)> [with auto:5 = span<short unsigned int>; auto:6 = std::vector<unsigned int>; Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]’:
patchelf.cc:2079:20:   required from ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]’
patchelf.cc:2208:28:   required from ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::renameDynamicSymbols(const std::unordered_map<std::basic_string_view<char>, std::__cxx11::basic_string<char> >&) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]’
patchelf.cc:2442:9:   required from ‘void patchElf2(ElfFile&&, const FileContents&, const string&) [with ElfFile = ElfFile<Elf32_Ehdr, Elf32_Phdr, Elf32_Shdr, unsigned int, unsigned int, Elf32_Dyn, Elf32_Sym, short unsigned int, Elf32_Verdef, Elf32_Verdaux, Elf32_Verneed, Elf32_Vernaux, Elf32_Rel, Elf32_Rela, 32>; FileContents = std::shared_ptr<std::vector<unsigned char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]’
patchelf.cc:2463:256:   required from here
patchelf.cc:2072:21: error: class template argument deduction failed:
patchelf.cc:2072:21: error: no matching function for call to ‘vector(short unsigned int*, short unsigned int*)’
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:411:2: note: candidate: template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>
  vector(_InputIterator __first, _InputIterator __last,
  ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:411:2: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   couldn't deduce template parameter ‘_Tp’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:383:7: note: candidate: template<class _Tp, class _Alloc> vector(std::initializer_list<_Tp>, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(initializer_list<value_type> __l,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:383:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘short unsigned int*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:358:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __rv, const allocator_type& __m)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:358:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::vector<_Tp, _Alloc>’ and ‘short unsigned int*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:348:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x, const allocator_type& __a)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:348:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘const std::vector<_Tp, _Alloc>’ and ‘short unsigned int*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:344:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __x) noexcept
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:344:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::vector<_Tp, _Alloc>’ and ‘short unsigned int*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:326:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:326:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘const std::vector<_Tp, _Alloc>’ and ‘short unsigned int*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:295:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const value_type& __value,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:295:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   cannot convert ‘dst.span<short unsigned int>::begin()’ (type ‘short unsigned int*’) to type ‘std::vector<_Tp, _Alloc>::size_type {aka long unsigned int}’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:283:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:283:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   couldn't deduce template parameter ‘_Tp’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:270:7: note: candidate: template<class _Tp, class _Alloc> vector(const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:270:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   candidate expects 1 argument, 2 provided
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: template<class _Tp, class _Alloc> vector()-> std::vector<_Tp, _Alloc>
       vector()
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:259:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   candidate expects 0 arguments, 2 provided
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
patchelf.cc: In instantiation of ‘ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>)::<lambda(auto:5, auto:6&)> [with auto:5 = span<Elf64_Sym>; auto:6 = std::vector<unsigned int>; Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]’:
patchelf.cc:2077:16:   required from ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]’
patchelf.cc:2208:28:   required from ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::renameDynamicSymbols(const std::unordered_map<std::basic_string_view<char>, std::__cxx11::basic_string<char> >&) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]’
patchelf.cc:2442:9:   required from ‘void patchElf2(ElfFile&&, const FileContents&, const string&) [with ElfFile = ElfFile<Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, long unsigned int, long unsigned int, Elf64_Dyn, Elf64_Sym, short unsigned int, Elf64_Verdef, Elf64_Verdaux, Elf64_Verneed, Elf64_Vernaux, Elf64_Rel, Elf64_Rela, 64>; FileContents = std::shared_ptr<std::vector<unsigned char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]’
patchelf.cc:2465:256:   required from here
patchelf.cc:2072:21: error: class template argument deduction failed:
patchelf.cc:2072:21: error: no matching function for call to ‘vector(Elf64_Sym*, Elf64_Sym*)’
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:411:2: note: candidate: template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>
  vector(_InputIterator __first, _InputIterator __last,
  ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:411:2: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   couldn't deduce template parameter ‘_Tp’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:383:7: note: candidate: template<class _Tp, class _Alloc> vector(std::initializer_list<_Tp>, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(initializer_list<value_type> __l,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:383:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘Elf64_Sym*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:358:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __rv, const allocator_type& __m)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:358:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::vector<_Tp, _Alloc>’ and ‘Elf64_Sym*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:348:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x, const allocator_type& __a)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:348:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘const std::vector<_Tp, _Alloc>’ and ‘Elf64_Sym*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:344:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __x) noexcept
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:344:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::vector<_Tp, _Alloc>’ and ‘Elf64_Sym*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:326:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:326:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘const std::vector<_Tp, _Alloc>’ and ‘Elf64_Sym*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:295:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const value_type& __value,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:295:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   cannot convert ‘dst.span<Elf64_Sym>::begin()’ (type ‘Elf64_Sym*’) to type ‘std::vector<_Tp, _Alloc>::size_type {aka long unsigned int}’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:283:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:283:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   couldn't deduce template parameter ‘_Tp’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:270:7: note: candidate: template<class _Tp, class _Alloc> vector(const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:270:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   candidate expects 1 argument, 2 provided
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: template<class _Tp, class _Alloc> vector()-> std::vector<_Tp, _Alloc>
       vector()
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:259:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   candidate expects 0 arguments, 2 provided
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
patchelf.cc: In instantiation of ‘ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>)::<lambda(auto:5, auto:6&)> [with auto:5 = span<short unsigned int>; auto:6 = std::vector<unsigned int>; Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]’:
patchelf.cc:2079:20:   required from ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]’
patchelf.cc:2208:28:   required from ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::renameDynamicSymbols(const std::unordered_map<std::basic_string_view<char>, std::__cxx11::basic_string<char> >&) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]’
patchelf.cc:2442:9:   required from ‘void patchElf2(ElfFile&&, const FileContents&, const string&) [with ElfFile = ElfFile<Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, long unsigned int, long unsigned int, Elf64_Dyn, Elf64_Sym, short unsigned int, Elf64_Verdef, Elf64_Verdaux, Elf64_Verneed, Elf64_Vernaux, Elf64_Rel, Elf64_Rela, 64>; FileContents = std::shared_ptr<std::vector<unsigned char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]’
patchelf.cc:2465:256:   required from here
patchelf.cc:2072:21: error: class template argument deduction failed:
patchelf.cc:2072:21: error: no matching function for call to ‘vector(short unsigned int*, short unsigned int*)’
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:411:2: note: candidate: template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>
  vector(_InputIterator __first, _InputIterator __last,
  ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:411:2: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   couldn't deduce template parameter ‘_Tp’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:383:7: note: candidate: template<class _Tp, class _Alloc> vector(std::initializer_list<_Tp>, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(initializer_list<value_type> __l,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:383:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘short unsigned int*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:358:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __rv, const allocator_type& __m)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:358:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::vector<_Tp, _Alloc>’ and ‘short unsigned int*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:348:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x, const allocator_type& __a)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:348:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘const std::vector<_Tp, _Alloc>’ and ‘short unsigned int*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:344:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __x) noexcept
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:344:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘std::vector<_Tp, _Alloc>’ and ‘short unsigned int*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:326:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:326:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   mismatched types ‘const std::vector<_Tp, _Alloc>’ and ‘short unsigned int*’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:295:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const value_type& __value,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:295:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   cannot convert ‘dst.span<short unsigned int>::begin()’ (type ‘short unsigned int*’) to type ‘std::vector<_Tp, _Alloc>::size_type {aka long unsigned int}’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:283:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:283:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   couldn't deduce template parameter ‘_Tp’
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:270:7: note: candidate: template<class _Tp, class _Alloc> vector(const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:270:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   candidate expects 1 argument, 2 provided
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
In file included from /usr/include/c++/7/vector:64:0,
                 from patchelf.cc:32:
/usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: template<class _Tp, class _Alloc> vector()-> std::vector<_Tp, _Alloc>
       vector()
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:259:7: note:   template argument deduction/substitution failed:
patchelf.cc:2072:21: note:   candidate expects 0 arguments, 2 provided
         std::vector tmp(dst.begin(), dst.end());
                     ^~~
patchelf.cc: In instantiation of ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]’:
patchelf.cc:2208:28:   required from ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::renameDynamicSymbols(const std::unordered_map<std::basic_string_view<char>, std::__cxx11::basic_string<char> >&) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]’
patchelf.cc:2442:9:   required from ‘void patchElf2(ElfFile&&, const FileContents&, const string&) [with ElfFile = ElfFile<Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, long unsigned int, long unsigned int, Elf64_Dyn, Elf64_Sym, short unsigned int, Elf64_Verdef, Elf64_Verdaux, Elf64_Verneed, Elf64_Vernaux, Elf64_Rel, Elf64_Rela, 64>; FileContents = std::shared_ptr<std::vector<unsigned char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]’
patchelf.cc:2465:256:   required from here
patchelf.cc:2102:37: error: use of ‘auto span<T>::size() const [with T = long unsigned int]’ before deduction of ‘auto’
         size_t idx = (h / ElfClass) % ght.m_bloomFilters.size();
In file included from patchelf.cc:47:0:
patchelf.h:226:10: error: ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::changeRelocTableSymIds(const Elf_Shdr&, RemapFn&&) [with ElfRelType = Elf32_Rel; RemapFn = ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]::<lambda(auto:7&)>&; Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]’, declared using local type ‘ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]::<lambda(auto:7&)>’, is used but never defined [-fpermissive]
     void changeRelocTableSymIds(const Elf_Shdr& shdr, RemapFn&& old2newSymId)
          ^~~~~~~~~~~~~~~~~~~~~~
patchelf.h:226:10: error: ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::changeRelocTableSymIds(const Elf_Shdr&, RemapFn&&) [with ElfRelType = Elf32_Rela; RemapFn = ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]::<lambda(auto:7&)>&; Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]’, declared using local type ‘ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]::<lambda(auto:7&)>’, is used but never defined [-fpermissive]
patchelf.h:226:10: error: ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::changeRelocTableSymIds(const Elf_Shdr&, RemapFn&&) [with ElfRelType = Elf64_Rel; RemapFn = ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]::<lambda(auto:7&)>&; Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]’, declared using local type ‘ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]::<lambda(auto:7&)>’, is used but never defined [-fpermissive]
patchelf.h:226:10: error: ‘void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::changeRelocTableSymIds(const Elf_Shdr&, RemapFn&&) [with ElfRelType = Elf64_Rela; RemapFn = ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]::<lambda(auto:7&)>&; Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]’, declared using local type ‘ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]::<lambda(auto:7&)>’, is used but never defined [-fpermissive]
make[1]: *** [patchelf.o] Error 1
make[1]: Leaving directory `/root/patchelf-0.18.0/src'
make: *** [all-recursive] Error 1
@yokrysty yokrysty added the bug label Jul 8, 2023
@xpmemeda
Copy link

+1...

@kelark
Copy link

kelark commented Jul 13, 2023

i meet the same problem! then i tried version0.17.2 and the bug alse happened.have you fixed this?

@yokrysty
Copy link
Author

i meet the same problem! then i tried version0.17.2 and the bug alse happened.have you fixed this?

for me it works on older versions

@kelark
Copy link

kelark commented Jul 13, 2023

can you tell me your gcc/g++ version?

@yokrysty
Copy link
Author

can you tell me your gcc/g++ version?

Linux amazonlinux.onprem 4.14.318-241.531.amzn2.x86_64 #1 SMP Tue Jun 27 21:49:00 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-15)
g++ (GCC) 7.3.1 20180712 (Red Hat 7.3.1-15)

@neheb
Copy link
Contributor

neheb commented Aug 12, 2023

Fixed by #513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants