Opened 2 years ago

Closed 2 years ago

#65454 closed defect (fixed)

clang-13 @13.0.1_2+analyzer+libstdcxx+universal no matching function for call to 'min'

Reported by: thetrial (alabay) Owned by: Ken <21211439+kencu@…>
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: elcapitan legacy-os Cc: mascguy (Christopher Nielsen), catap (Kirill A. Korinsky)
Port: clang-13 llvm-13

Description

Ouh, seems exact the same like #65423.

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-13/clang-13/work/llvm-project-13.0.1.src/lld/MachO/SyntheticSections.cpp:1181:21: error: no matching function for call to 'min'
:info:build                     std::min(codeEnd - code, static_cast<ssize_t>(blockSize)));
:info:build                     ^~~~~~~~
:info:build /opt/local/libexec/llvm-11/bin/../include/c++/v1/algorithm:2560:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('int' vs. 'long')
:info:build min(const _Tp& __a, const _Tp& __b)
:info:build ^
:info:build /opt/local/libexec/llvm-11/bin/../include/c++/v1/algorithm:2571:1: note: candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'int'
:info:build min(initializer_list<_Tp> __t, _Compare __comp)
:info:build ^
:info:build /opt/local/libexec/llvm-11/bin/../include/c++/v1/algorithm:2580:1: note: candidate function template not viable: requires single argument '__t', but 2 arguments were provided
:info:build min(initializer_list<_Tp> __t)
:info:build ^
:info:build /opt/local/libexec/llvm-11/bin/../include/c++/v1/algorithm:2551:1: note: candidate function template not viable: requires 3 arguments, but 2 were provided
:info:build min(const _Tp& __a, const _Tp& __b, _Compare __comp)
:info:build ^
:info:build 1 error generated.

I really don’t know why clang-13 now has been targeted to get built … ;-) I got rid of all unrequested clang, maybe that was a mistake. And I’m not sure which port is now responsible for this rat-tail again (it started with clang-11).

Attachments (1)

main.log.7z (257.1 KB) - added by thetrial (alabay) 2 years ago.

Download all attachments as: .zip

Change History (10)

Changed 2 years ago by thetrial (alabay)

Attachment: main.log.7z added

comment:1 Changed 2 years ago by mascguy (Christopher Nielsen)

I really don’t know why clang-13 now has been targeted to get built … ;-) I got rid of all unrequested clang, maybe that was a mistake. And I’m not sure which port is now responsible for this rat-tail again (it started with clang-11).

We reverted back to using clang-13 by default, as we've seen a few crashes with clang-14. The issues are very rare though - and they'll eventually be fixed via upstream releases, and/or patches - but the consensus was that we should switch back for the moment.

See issue:65246

comment:2 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:3 Changed 2 years ago by mascguy (Christopher Nielsen)

As for removing unrequested versions of Clang... it makes sense to keep a few installed, unless you're extremely limited on storage space.

In particular, you'll want the latest default release, which is presently clang-13.

comment:4 Changed 2 years ago by thetrial (alabay)

Yes. But now this is broken, like V14 was before. And yes, I know, it’s a variant thing again. Due to I did not request that variant – I think it is a necessity of some dependencies again. I would appreciate if (all) llvm and clang would be available prebuilt as universal variants :-)

comment:5 Changed 2 years ago by kencu (Ken)

this error also just happened near the end of the clang-13 build on 10.6 i386, but not on 10.6 x86_64.

[ 98%] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO2.dir/SyntheticSections.cpp.o
cd /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-13/clang-13/work/build/tools/lld/MachO && /opt/local/bin/clang++-mp-11 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-13/clang-13/work/build/tools/lld/MachO -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-13/clang-13/work/llvm-project-13.0.1.src/lld/MachO -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-13/clang-13/work/llvm-project-13.0.1.src/lld/include -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-13/clang-13/work/build/tools/lld/include -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-13/clang-13/work/build/include -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-13/clang-13/work/llvm-project-13.0.1.src/llvm/include -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-13/clang-13/work/llvm-project-13.0.1.src/llvm/../libunwind/include -pipe -Os -DNDEBUG -D__DISABLE_MP_LEGACY_SUPPORT_SYSCONF_WRAP__=1 -D__DISABLE_MP_LEGACY_SUPPORT_REALPATH_WRAP__=1 -isystem/opt/local/include/LegacySupport -I/opt/local/include -stdlib=libc++ -isysroot/ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -O3 -DNDEBUG -arch i386 -mmacosx-version-min=10.6  -fno-exceptions -std=c++14 -MD -MT tools/lld/MachO/CMakeFiles/lldMachO2.dir/SyntheticSections.cpp.o -MF CMakeFiles/lldMachO2.dir/SyntheticSections.cpp.o.d -o CMakeFiles/lldMachO2.dir/SyntheticSections.cpp.o -c /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-13/clang-13/work/llvm-project-13.0.1.src/lld/MachO/SyntheticSections.cpp
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-13/clang-13/work/llvm-project-13.0.1.src/lld/MachO/SyntheticSections.cpp:1181:21: error: no matching function for call to 'min'
                    std::min(codeEnd - code, static_cast<ssize_t>(blockSize)));
                    ^~~~~~~~
/opt/local/libexec/llvm-11/bin/../include/c++/v1/algorithm:2560:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('int' vs. 'long')
min(const _Tp& __a, const _Tp& __b)
^
/opt/local/libexec/llvm-11/bin/../include/c++/v1/algorithm:2571:1: note: candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'int'
min(initializer_list<_Tp> __t, _Compare __comp)
^
/opt/local/libexec/llvm-11/bin/../include/c++/v1/algorithm:2580:1: note: candidate function template not viable: requires single argument '__t', but 2 arguments were provided
min(initializer_list<_Tp> __t)
^
/opt/local/libexec/llvm-11/bin/../include/c++/v1/algorithm:2551:1: note: candidate function template not viable: requires 3 arguments, but 2 were provided
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
1 error generated.

comment:6 Changed 2 years ago by kencu (Ken)

I wonder if it is an i386-specific thing... pretty much nobody ever tests i386 clang builds on MacOS any longer upstream.

comment:7 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: catap added

comment:9 Changed 2 years ago by Ken <21211439+kencu@…>

Owner: set to Ken <21211439+kencu@…>
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.