[Openmp-commits] [libcxx] [openmp] [libc++] basic_ios<wchar_t> cannot store fill character WCHAR_MAX (PR #89305)
David Tenty via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jul 19 09:19:24 PDT 2024
daltenty wrote:
@zeroomega we’ve taken a look at the buildbot config and outputs.
>From what we can see your bots stage 1 use a clang with a custom v2 libc++ from cpid:
```
‘-DCMAKE_C_COMPILER=/Volumes/Work/s/w/ir/x/w/cipd/bin/clang’,
‘-DCMAKE_CXX_COMPILER=/Volumes/Work/s/w/ir/x/w/cipd/bin/clang++‘,
‘-DCMAKE_ASM_COMPILER=/Volumes/Work/s/w/ir/x/w/cipd/bin/clang’,
…
‘-DCMAKE_SHARED_LINKER_FLAGS=-nostdlib++ /Volumes/Work/s/w/ir/x/w/cipd/lib/libc++.a’,
‘-DCMAKE_MODULE_LINKER_FLAGS=-nostdlib++ /Volumes/Work/s/w/ir/x/w/cipd/lib/libc++.a’,
‘-DCMAKE_EXE_LINKER_FLAGS=-nostdlib++ /Volumes/Work/s/w/ir/x/w/cipd/lib/libc++.a’,
```
https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8742128214337927377/+/u/clang/configure/execution_details
And then we have some more cmake flags for stage2 which seem to be set to link the cpid library, not the just built one in the build tree:
```
‘-DSTAGE2_CROSS_TOOLCHAIN_FLAGS_NATIVE=-DCMAKE_C_COMPILER=/Volumes/Work/s/w/ir/x/w/cipd/bin/clang;-DCMAKE_CXX_COMPILER=/Volumes/Work/s/w/ir/x/w/cipd/bin/clang++;-DCMAKE_OSX_SYSROOT=/Volumes/Work/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk;-DCMAKE_SHARED_LINKER_FLAGS=-nostdlib++ /Volumes/Work/s/w/ir/x/w/cipd/lib/libc++.a;-DCMAKE_MODULE_LINKER_FLAGS=-nostdlib++ /Volumes/Work/s/w/ir/x/w/cipd/lib/libc++.a;-DCMAKE_EXE_LINKER_FLAGS=-nostdlib++ /Volumes/Work/s/w/ir/x/w/cipd/lib/libc++.a’,
```
Our current theory based on this is your stage2 built clang is loading the cpid shipped libc++ instead of the just-built libc++ from stage 1.
That could explain the problems your are seeing, since we changed the offset of the fill character in the layout of basic_ios in the unstable v2 ABI with this patch.
Are you able to try running the tests with a custom `DYLD_LIBRARY_PATH` pointed at the builds `lib` directory (the one containing the just-built libc++) to verify if that resolves the test failure? It would be good to check the rpath, etc on the stage2 built clang as well to confirm what version of libc++ is actually being loading.
(You can reach me as `daltenty` on LLVM discord if you’d like to discuss further. I've been trying to replicate the full bot config locally on an x64 mac but there's a lot of moving parts in that bot.)
https://github.com/llvm/llvm-project/pull/89305
More information about the Openmp-commits
mailing list