Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#65423 closed defect (fixed)

clang-14 @14.0.6_0+analyzer+libstdcxx+universal: no matching function for call to 'min'

Reported by: thetrial (alabay) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: elcapitan legacy-os Cc:
Port: clang-14 llvm-14

Description

After a very, very long building time, it ends with an error – and again, my build-chain is broken. After mlir-14 now clang-14. Due to it says that clang-14 builds under El Capitan, maybe it’s an issue of a variant. Universal?

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-14/clang-14/work/llvm-project-14.0.6.src/lld/MachO/SyntheticSections.cpp:1193: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.

Log is attached.

Attachments (1)

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

Download all attachments as: .zip

Change History (13)

Changed 2 years ago by thetrial (alabay)

Attachment: main.log.7z added

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

Port: llvm-14 added

comment:2 Changed 2 years ago by jmroot (Joshua Root)

Yes, it's the i386 build that's broken.

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

I’d say I wouldn’t need i386, but I guess it’s up to the dependances. And all the wine stuff is i386 it seems. Though I’m on 64er machines.

comment:4 Changed 2 years ago by jmroot (Joshua Root)

In 2fda12633ba31941b1d1f44210b525de2c135d9e/macports-ports (master):

clang-14: attempt to fix i386 build

See: #65423

comment:5 in reply to:  3 Changed 2 years ago by jmroot (Joshua Root)

Replying to thetrial:

I’d say I wouldn’t need i386, but I guess it’s up to the dependances. And all the wine stuff is i386 it seems. Though I’m on 64er machines.

Using +universal when you don't need it is certainly going to make your life more difficult. Try without it and see what happens I guess?

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

I tried that several times before. Then the universal version gets loaded, when needed. That’s the problem. I did not call for clang-14, that’s automatically done due to need (by some port(s)). I’ll try again.

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

Hm … this time it worked. I simply installed clang-14, it turned out +analyzer +libstdcxx, and openal-soft did not kick off +universal. Interesting. Now is the question … why was +universal called before?

comment:8 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

When a port (like wine) needs its library dependencies built universal, MacPorts builds all of the dependencies universal, even build dependencies (like clang) which may not need to be universal.

comment:9 Changed 2 years ago by jmroot (Joshua Root)

If you explicitly ask for +universal on the command line, that will be passed on to all dependencies, some of which you may not intend. But +universal is only added automatically in response to arch checking finding that a dependency has incompatible archs, and that is prevented by depends_skip_archcheck, which is used for all compilers that support the -arch flag: https://github.com/macports/macports-base/blob/master/src/port1.0/portconfigure.tcl#L1670

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

The problems are wine – depending on clang-14 and winetricks – depending on clang-13. For normal use I don’t hold up any clang. Maybe I should? But if, thet would be non-universal, and these would require universal, I guess. And building those universal types – if they go through – takes very, very long time.

comment:11 Changed 2 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Well, in any case, the universal build of clang-14 succeeded now.

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

Well, segues into Ticket #65454.

Note: See TracTickets for help on using tickets.