[MacPorts] #72355: sleuthkit does not build: error: no matching function for call to 'std::basic_string<char>::erase(__gnu_cxx::__normal_iterator<char*, std::basic_string<char> >, std::basic_string<char>::const_iterator)'
MacPorts
noreply at macports.org
Thu Apr 17 03:57:30 UTC 2025
#72355: sleuthkit does not build: error: no matching function for call to
'std::basic_string<char>::erase(__gnu_cxx::__normal_iterator<char*,
std::basic_string<char> >, std::basic_string<char>::const_iterator)'
---------------------------+--------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Resolution: | Keywords:
Port: sleuthkit |
---------------------------+--------------------
Description changed by barracuda156:
Old description:
> {{{
> /bin/sh ../../libtool --tag=CXX --mode=compile
> /opt/local/bin/g++-mp-14 -std=c++14 -DHAVE_CONFIG_H -I. -I../../tsk
> -I../.. -I./../.. -isystem/opt/local/include/LegacySupport
> -I/opt/local/include -D_THREAD_SAFE -pthread -Wall -Wextra -Wno-unused-
> parameter -Wmultichar -Wsign-promo -Wno-overloaded-virtual -pipe -Os
> -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -MT is_image_supported.lo -MD -MP
> -MF .deps/is_image_supported.Tpo -c -o is_image_supported.lo
> is_image_supported.cpp
> libtool: compile: /opt/local/bin/g++-mp-14 -std=c++14 -DHAVE_CONFIG_H
> -I. -I../../tsk -I../.. -I./../..
> -isystem/opt/local/include/LegacySupport -I/opt/local/include
> -D_THREAD_SAFE -pthread -Wall -Wextra -Wno-unused-parameter -Wmultichar
> -Wsign-promo -Wno-overloaded-virtual -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0
> -arch ppc -MT is_image_supported.lo -MD -MP -MF
> .deps/is_image_supported.Tpo -c is_image_supported.cpp -fno-common -DPIC
> -o .libs/is_image_supported.o
> libtool: compile: /opt/local/bin/g++-mp-14 -std=c++14 -DHAVE_CONFIG_H
> -I. -I../../tsk -I../.. -I./../..
> -isystem/opt/local/include/LegacySupport -I/opt/local/include
> -D_THREAD_SAFE -pthread -Wall -Wextra -Wno-unused-parameter -Wmultichar
> -Wsign-promo -Wno-overloaded-virtual -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0
> -arch ppc -MT auto_db.lo -MD -MP -MF .deps/auto_db.Tpo -c auto_db.cpp -o
> auto_db.o >/dev/null 2>&1
> mv -f .deps/case_db.Tpo .deps/case_db.Plo
> mv -f .deps/guid.Tpo .deps/guid.Plo
> is_image_supported.cpp: In member function 'std::string
> TskIsImageSupported::getMessageForIsImageSupportedNat()':
> is_image_supported.cpp:223:32: error: no matching function for call to
> 'std::basic_string<char>::erase(__gnu_cxx::__normal_iterator<char*,
> std::basic_string<char> >, std::basic_string<char>::const_iterator)'
> 223 | firstLine.erase(std::remove(firstLine.begin(),
> firstLine.end(), '\n'), firstLine.cend());
> |
> ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from
> /opt/local/include/gcc14/c++/bits/basic_string.h:57,
> from /opt/local/include/gcc14/c++/string:54,
> from ../../tsk/auto/tsk_auto.h:35,
> from ../../tsk/tsk_tools_i.h:22,
> from tsk_is_image_supported.h:24,
> from is_image_supported.cpp:23:
> /opt/local/include/gcc14/c++/bits/cow_string.h:1752:7: note: candidate:
> 'std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT,
> _Traits, _Alloc>::erase(size_type, size_type) [with _CharT = char;
> _Traits = std::char_traits<char>; _Alloc = std::allocator<char>;
> size_type = long unsigned int]'
> 1752 | erase(size_type __pos = 0, size_type __n = npos)
> | ^~~~~
> /opt/local/include/gcc14/c++/bits/cow_string.h:1752:23: note: no known
> conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*,
> std::basic_string<char> >' to 'std::basic_string<char>::size_type' {aka
> 'long unsigned int'}
> 1752 | erase(size_type __pos = 0, size_type __n = npos)
> | ~~~~~~~~~~^~~~~~~~~
> /opt/local/include/gcc14/c++/bits/cow_string.h:1768:7: note: candidate:
> 'std::basic_string<_CharT, _Traits, _Alloc>::iterator
> std::basic_string<_CharT, _Traits, _Alloc>::erase(iterator) [with _CharT
> = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>;
> iterator = std::basic_string<char>::iterator]'
> 1768 | erase(iterator __position)
> | ^~~~~
> /opt/local/include/gcc14/c++/bits/cow_string.h:1768:7: note: candidate
> expects 1 argument, 2 provided
> /opt/local/include/gcc14/c++/bits/cow_string.h:3406:6: note: candidate:
> 'std::basic_string<_CharT, _Traits, _Alloc>::iterator
> std::basic_string<_CharT, _Traits, _Alloc>::erase(iterator, iterator)
> [with _CharT = char; _Traits = std::char_traits<char>; _Alloc =
> std::allocator<char>; iterator = std::basic_string<char>::iterator]'
> 3406 | basic_string<_CharT, _Traits, _Alloc>::
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /opt/local/include/gcc14/c++/bits/cow_string.h:3407:39: note: no known
> conversion for argument 2 from '__normal_iterator<const char*,[...]>' to
> '__normal_iterator<char*,[...]>'
> 3407 | erase(iterator __first, iterator __last)
> | ~~~~~~~~~^~~~~~
> is_image_supported.cpp:224:32: error: no matching function for call to
> 'std::basic_string<char>::erase(__gnu_cxx::__normal_iterator<char*,
> std::basic_string<char> >, std::basic_string<char>::const_iterator)'
> 224 | firstLine.erase(std::remove(firstLine.begin(),
> firstLine.end(), '\r'), firstLine.cend());
> |
> ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /opt/local/include/gcc14/c++/bits/cow_string.h:1752:7: note: candidate:
> 'std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT,
> _Traits, _Alloc>::erase(size_type, size_type) [with _CharT = char;
> _Traits = std::char_traits<char>; _Alloc = std::allocator<char>;
> size_type = long unsigned int]'
> 1752 | erase(size_type __pos = 0, size_type __n = npos)
> | ^~~~~
> /opt/local/include/gcc14/c++/bits/cow_string.h:1752:23: note: no known
> conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*,
> std::basic_string<char> >' to 'std::basic_string<char>::size_type' {aka
> 'long unsigned int'}
> 1752 | erase(size_type __pos = 0, size_type __n = npos)
> | ~~~~~~~~~~^~~~~~~~~
> /opt/local/include/gcc14/c++/bits/cow_string.h:1768:7: note: candidate:
> 'std::basic_string<_CharT, _Traits, _Alloc>::iterator
> std::basic_string<_CharT, _Traits, _Alloc>::erase(iterator) [with _CharT
> = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>;
> iterator = std::basic_string<char>::iterator]'
> 1768 | erase(iterator __position)
> | ^~~~~
> /opt/local/include/gcc14/c++/bits/cow_string.h:1768:7: note: candidate
> expects 1 argument, 2 provided
> /opt/local/include/gcc14/c++/bits/cow_string.h:3406:6: note: candidate:
> 'std::basic_string<_CharT, _Traits, _Alloc>::iterator
> std::basic_string<_CharT, _Traits, _Alloc>::erase(iterator, iterator)
> [with _CharT = char; _Traits = std::char_traits<char>; _Alloc =
> std::allocator<char>; iterator = std::basic_string<char>::iterator]'
> 3406 | basic_string<_CharT, _Traits, _Alloc>::
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /opt/local/include/gcc14/c++/bits/cow_string.h:3407:39: note: no known
> conversion for argument 2 from '__normal_iterator<const char*,[...]>' to
> '__normal_iterator<char*,[...]>'
> 3407 | erase(iterator __first, iterator __last)
> | ~~~~~~~~~^~~~~~
> make[3]: *** [is_image_supported.lo] Error 1
> make[3]: *** Waiting for unfinished jobs....
> }}}
>
> P. S. It also needs `legacysupport` at least for `strnlen`.
New description:
{{{
/bin/sh ../../libtool --tag=CXX --mode=compile /opt/local/bin/g++-mp-14
-std=c++14 -DHAVE_CONFIG_H -I. -I../../tsk -I../.. -I./../..
-isystem/opt/local/include/LegacySupport -I/opt/local/include
-D_THREAD_SAFE -pthread -Wall -Wextra -Wno-unused-parameter -Wmultichar
-Wsign-promo -Wno-overloaded-virtual -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0
-arch ppc -MT is_image_supported.lo -MD -MP -MF
.deps/is_image_supported.Tpo -c -o is_image_supported.lo
is_image_supported.cpp
libtool: compile: /opt/local/bin/g++-mp-14 -std=c++14 -DHAVE_CONFIG_H -I.
-I../../tsk -I../.. -I./../.. -isystem/opt/local/include/LegacySupport
-I/opt/local/include -D_THREAD_SAFE -pthread -Wall -Wextra -Wno-unused-
parameter -Wmultichar -Wsign-promo -Wno-overloaded-virtual -pipe -Os
-D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -MT is_image_supported.lo -MD -MP -MF
.deps/is_image_supported.Tpo -c is_image_supported.cpp -fno-common -DPIC
-o .libs/is_image_supported.o
libtool: compile: /opt/local/bin/g++-mp-14 -std=c++14 -DHAVE_CONFIG_H -I.
-I../../tsk -I../.. -I./../.. -isystem/opt/local/include/LegacySupport
-I/opt/local/include -D_THREAD_SAFE -pthread -Wall -Wextra -Wno-unused-
parameter -Wmultichar -Wsign-promo -Wno-overloaded-virtual -pipe -Os
-D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -MT auto_db.lo -MD -MP -MF
.deps/auto_db.Tpo -c auto_db.cpp -o auto_db.o >/dev/null 2>&1
mv -f .deps/case_db.Tpo .deps/case_db.Plo
mv -f .deps/guid.Tpo .deps/guid.Plo
is_image_supported.cpp: In member function 'std::string
TskIsImageSupported::getMessageForIsImageSupportedNat()':
is_image_supported.cpp:223:32: error: no matching function for call to
'std::basic_string<char>::erase(__gnu_cxx::__normal_iterator<char*,
std::basic_string<char> >, std::basic_string<char>::const_iterator)'
223 | firstLine.erase(std::remove(firstLine.begin(),
firstLine.end(), '\n'), firstLine.cend());
|
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/local/include/gcc14/c++/bits/basic_string.h:57,
from /opt/local/include/gcc14/c++/string:54,
from ../../tsk/auto/tsk_auto.h:35,
from ../../tsk/tsk_tools_i.h:22,
from tsk_is_image_supported.h:24,
from is_image_supported.cpp:23:
/opt/local/include/gcc14/c++/bits/cow_string.h:1752:7: note: candidate:
'std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT,
_Traits, _Alloc>::erase(size_type, size_type) [with _CharT = char; _Traits
= std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long
unsigned int]'
1752 | erase(size_type __pos = 0, size_type __n = npos)
| ^~~~~
/opt/local/include/gcc14/c++/bits/cow_string.h:1752:23: note: no known
conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*,
std::basic_string<char> >' to 'std::basic_string<char>::size_type' {aka
'long unsigned int'}
1752 | erase(size_type __pos = 0, size_type __n = npos)
| ~~~~~~~~~~^~~~~~~~~
/opt/local/include/gcc14/c++/bits/cow_string.h:1768:7: note: candidate:
'std::basic_string<_CharT, _Traits, _Alloc>::iterator
std::basic_string<_CharT, _Traits, _Alloc>::erase(iterator) [with _CharT =
char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>;
iterator = std::basic_string<char>::iterator]'
1768 | erase(iterator __position)
| ^~~~~
/opt/local/include/gcc14/c++/bits/cow_string.h:1768:7: note: candidate
expects 1 argument, 2 provided
/opt/local/include/gcc14/c++/bits/cow_string.h:3406:6: note: candidate:
'std::basic_string<_CharT, _Traits, _Alloc>::iterator
std::basic_string<_CharT, _Traits, _Alloc>::erase(iterator, iterator)
[with _CharT = char; _Traits = std::char_traits<char>; _Alloc =
std::allocator<char>; iterator = std::basic_string<char>::iterator]'
3406 | basic_string<_CharT, _Traits, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/gcc14/c++/bits/cow_string.h:3407:39: note: no known
conversion for argument 2 from '__normal_iterator<const char*,[...]>' to
'__normal_iterator<char*,[...]>'
3407 | erase(iterator __first, iterator __last)
| ~~~~~~~~~^~~~~~
is_image_supported.cpp:224:32: error: no matching function for call to
'std::basic_string<char>::erase(__gnu_cxx::__normal_iterator<char*,
std::basic_string<char> >, std::basic_string<char>::const_iterator)'
224 | firstLine.erase(std::remove(firstLine.begin(),
firstLine.end(), '\r'), firstLine.cend());
|
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/gcc14/c++/bits/cow_string.h:1752:7: note: candidate:
'std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT,
_Traits, _Alloc>::erase(size_type, size_type) [with _CharT = char; _Traits
= std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long
unsigned int]'
1752 | erase(size_type __pos = 0, size_type __n = npos)
| ^~~~~
/opt/local/include/gcc14/c++/bits/cow_string.h:1752:23: note: no known
conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*,
std::basic_string<char> >' to 'std::basic_string<char>::size_type' {aka
'long unsigned int'}
1752 | erase(size_type __pos = 0, size_type __n = npos)
| ~~~~~~~~~~^~~~~~~~~
/opt/local/include/gcc14/c++/bits/cow_string.h:1768:7: note: candidate:
'std::basic_string<_CharT, _Traits, _Alloc>::iterator
std::basic_string<_CharT, _Traits, _Alloc>::erase(iterator) [with _CharT =
char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>;
iterator = std::basic_string<char>::iterator]'
1768 | erase(iterator __position)
| ^~~~~
/opt/local/include/gcc14/c++/bits/cow_string.h:1768:7: note: candidate
expects 1 argument, 2 provided
/opt/local/include/gcc14/c++/bits/cow_string.h:3406:6: note: candidate:
'std::basic_string<_CharT, _Traits, _Alloc>::iterator
std::basic_string<_CharT, _Traits, _Alloc>::erase(iterator, iterator)
[with _CharT = char; _Traits = std::char_traits<char>; _Alloc =
std::allocator<char>; iterator = std::basic_string<char>::iterator]'
3406 | basic_string<_CharT, _Traits, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/gcc14/c++/bits/cow_string.h:3407:39: note: no known
conversion for argument 2 from '__normal_iterator<const char*,[...]>' to
'__normal_iterator<char*,[...]>'
3407 | erase(iterator __first, iterator __last)
| ~~~~~~~~~^~~~~~
make[3]: *** [is_image_supported.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
}}}
Issue with upstream: https://github.com/sleuthkit/sleuthkit/issues/3272
P. S. It also needs `legacysupport` at least for `strnlen`.
--
--
Ticket URL: <https://trac.macports.org/ticket/72355#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list