Opened 2 years ago

Last modified 20 months ago

#65895 assigned defect

clang-15: failure tracking, for potential compiler bugs/reversions

Reported by: mascguy (Christopher Nielsen) Owned by: cjones051073 (Chris Jones)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: clang-15 Cc: cooljeanius (Eric Gallager)
Port: inkscape

Description (last modified by mascguy (Christopher Nielsen))

Tracking ticket for build failures, when clang-15 is in play. The vast majority of these are likely to be legitimate code issues, caught by stricter validation checks, and/or standards evolution.

However, we may occasionally encounter a legitimate compiler bug. And we'll want to report those to upstream.

Port Issue Upstream Status
InkscapeUse of unary_function, no longer available in C++17 and C++20Fixed in master

Change History (12)

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

Edit: comment not relevant

Last edited 2 years ago by mascguy (Christopher Nielsen) (previous) (diff)

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

inkscape is actually wrong here, and clang-15 is right. gcc-12 currently still allows std::unary_function, but not for long, as it’s announcing it deprecated

https://github.com/llvm/llvm-project/commit/681cde7dd8b5613dbafc9ca54e0288477f946be3

I have been going through this for many years, as 10.6.8 has traditionally always used the newest clang, and with every new compiler release, things get tighter and codebase errors show up. I also asked a few years ago if we could hang back a few cycles on updating compilers, and leave the work to others — I don’t have to tell you what the response to that request was :)

NO.

So for many years I found and fixed these nearly daily as those on newer systems using older clangs cruised merrily by.

We can use this (defaulting to clang-15 on some systems) as a good method to help upstream keep their codebase correct… macports has traditionally done that frequently.

If you’re taking on too many ports as maintainer, just ease off a bit. You went from zero to about 1000 in six months :)

The crash with darktable now is something different… but I don’t think anyone ever opened up an issue with llvm, so it will not be fixed until they know about it.

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

Edit: comment not relevant

Last edited 2 years ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:4 Changed 2 years ago by Christopher Nielsen <mascguy@…>

In a66c19532113565c4a73700b3888fa14823c3fc7/macports-ports (master):

inkscape*: blacklist mp-clang-15, until upstream cleanup
See: #65895

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

First off, I sincerely apologize for the negativity, and pessimistic tone. Ditto for any suggestion that our organization's approach isn't good, as I don't believe that whatsoever. The last thing I want to do is alienate any of you folks, and/or contribute to negativity!

MacPorts has been - and continues to be - an incredibly awesome resource for the community. And I fully support the approach we're taking, as it does benefit upstream projects: By moving forward, we help pay it forward, and assist them with identifying and tackling code issues.

My only thought/suggestion - in the interest of balancing all of that, with the limited time of our maintainers - is this: If there's a way that we can gradually migrate to the latest Clang version - maybe by starting with ports that declare a need for the latest C++ standards (2017+ for example) - that might be something to consider.

After that's been in play for at least a few weeks - or a month - then expand that to C++ 2014 and later. And so on.

Is that a potential compromise that might be worth trying?

Last edited 2 years ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:6 Changed 2 years ago by cjones051073 (Chris Jones)

The list is defined by

https://github.com/macports/macports-ports/blob/master/_resources/port1.0/compilers/clang_compilers.tcl

So far we have only had this list change depending on os.major, so by OS. I've no idea if given the way this file is used it would be able to read and react to compiler.cxx_standard or compiler.c_standard, but its an interesting idea to try..

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

Description: modified (diff)
Summary: clang-15: port compilation failure trackingclang-15: failure tracking, for potential compiler bugs/reversions

comment:8 Changed 2 years ago by Chris Jones <jonesc@…>

In 6a9f7c4baf62119470985139f917edf434eb42c6/macports-ports (master):

clang_compilers: Temporarily limit exposure of clang-15 to builds requiring c++17 or newer
See: #65895

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

Description: modified (diff)

comment:10 in reply to:  8 Changed 2 years ago by mascguy (Christopher Nielsen)

Replying to Chris Jones <jonesc@…>:

In 6a9f7c4baf62119470985139f917edf434eb42c6/macports-ports (master):

clang_compilers: Temporarily limit exposure of clang-15 to builds requiring c++17 or newer
See: #65895

Love it, thanks Chris!

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

being clear, if I ran MacPorts, I would certainly hang back the primary default fallback compiler by at least a year or two, to let code bases catch up, given macports very modest manpower.

Ubuntu 22.04 uses gcc11, for example. Homebrew uses the system clang only, which is always a year or so behind (and has many Apple patches to improve compatibilty).

macports developers could set their own cutting edge compiler spec and always build from source to fix these build errors.

but others prefer the code advances and bugfixes new compilers bring, and having the buildbots find these issues, and I understand that. (Even if none of the current systems ever actually see these, because they use the system clang).

comment:12 Changed 20 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.