Skip to content

clang++ -print-file-name=libc++.modules.json does not print the full path to the file #226050

Open
@ClausKlein

Description

@ClausKlein

brew gist-logs <formula> link OR brew config AND brew doctor output

bash-5.2$ brew config
HOMEBREW_VERSION: 4.5.4-39-g1f37a11
ORIGIN: https://github.com/Homebrew/brew
HEAD: 1f37a11b7946b6d770ecba66a487ba325b58e49c
Last commit: 20 hours ago
Branch: master
Core tap HEAD: 5e2f9e5eaa0fbcf623256a22665286b5ca0f6580
Core tap last commit: 3 months ago
Core tap JSON: 07 Jun 12:40 UTC
Core cask tap HEAD: 6e00a8f99b1af42e27d6ea0a0cc337b9bde51831
Core cask tap last commit: 3 months ago
Core cask tap JSON: 07 Jun 12:40 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.TAnXVhBU10/org.macosforge.xquartz:0
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.4.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.4.4/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 16.0.0 build 1600
Git: 2.49.0 => /usr/local/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 14.7.4-x86_64
CLT: 16.2.0.0.1.1733547573
Xcode: 16.2
bash-5.2$ 

bash-5.2$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  icu4c@76

Warning: Putting non-prefixed coreutils in your path can cause GMP builds to fail.

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libnetconf2.3.5.6.dylib
  /usr/local/lib/libyang.2.41.0.dylib

Warning: Unbrewed '.pc' files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected '.pc' files:
  /usr/local/lib/pkgconfig/docopt.pc
  /usr/local/lib/pkgconfig/libnetconf2.pc
  /usr/local/lib/pkgconfig/libyang.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libdocopt.a
bash-5.2$

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

I want to use import std; with C++23 and cmake v4.0.x

see https://gitlab.kitware.com/cmake/cmake/-/issues/25965#note_1645918

What happened (include all command output)?

bash-5.2$ clang++ -print-file-name=c++
/usr/local/Cellar/llvm/20.1.6/lib/clang/20/../../c++
bash-5.2$ clang++ -print-file-name=c++/libc++.modules.json
/usr/local/Cellar/llvm/20.1.6/lib/clang/20/../../c++/libc++.modules.json
bash-5.2$ clang++ -print-file-name=libc++.modules.json
libc++.modules.json
bash-5.2$ clang++ --version
Homebrew clang version 20.1.6
Target: x86_64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /usr/local/Cellar/llvm/20.1.6/bin
Configuration file: /usr/local/etc/clang/x86_64-apple-darwin23.cfg
bash-5.2$ 

What did you expect to happen?

Print the full library path of file /usr/local/Cellar/llvm/20.1.6/lib/clang/20/../../c++/libc++.modules.json

Step-by-step reproduction instructions (by running brew commands)

brew upgrade llvm@20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions