#71841 closed defect (worksforme)

btop fails to build on Sequioa arm64: source_location not found

Reported by: ednl (Ewoud Dronkert) Owned by: Samasaur1 (Sam)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: btop

Description

In file included from src/btop_theme.cpp:23:
:info:build src/btop_tools.hpp:40:10: fatal error: 'source_location' file not found
:info:build    40 | #include <source_location>
:info:build       |          ^~~~~~~~~~~~~~~~~

It seems to be part of the C++20 standard: https://en.cppreference.com/w/cpp/utility/source_location but does have a feature-test macro (mentioned on that page). Either it's not available in Apple clang 16 arm64, or the compilation command is wonky; there were a lot of "warning: argument unused/unknown". See attached main.log.

Attachments (1)

main.log (34.6 KB) - added by ednl (Ewoud Dronkert) 14 months ago.

Download all attachments as: .zip

Change History (5)

Changed 14 months ago by ednl (Ewoud Dronkert)

Attachment: main.log added

comment:1 Changed 14 months ago by jmroot (Joshua Root)

Owner: set to Samasaur1
Status: newassigned

comment:2 Changed 14 months ago by jmroot (Joshua Root)

source_location should be available in the macOS 15 SDK:

% find /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include -name source_location 
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/source_location

This could be #70750 / ProblemHotlist#clts16.

comment:3 in reply to:  2 ; Changed 14 months ago by ednl (Ewoud Dronkert)

Replying to jmroot:

This could be #70750 / ProblemHotlist#clts16.

Yes! sudo rm -fr /Library/Developer/CommandLineTools/usr/include/c++ resolved it, installed with no errors. Thanks. Hopefully there's a way to check for this in general to help other users, or would that be too invasive?

I guess this ticket may be closed.

comment:4 in reply to:  3 Changed 13 months ago by mascguy (Christopher Nielsen)

Resolution: worksforme
Status: assignedclosed

Replying to ednl:

Replying to jmroot:

This could be #70750 / ProblemHotlist#clts16.

Yes! sudo rm -fr /Library/Developer/CommandLineTools/usr/include/c++ resolved it, installed with no errors. Thanks. Hopefully there's a way to check for this in general to help other users, or would that be too invasive?

I guess this ticket may be closed.

Great, glad it's fixed!

Note: See TracTickets for help on using tickets.