-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with libstdc++13 std::format (and, related, unable to locate LLVM libcxx headers) #188
Comments
Also, the " $ circle --std=c++20 --stdlib=libstdc++ --print-paths /dev/null
stdlib version:
13
-isystem:
/usr/include/c++/13
/usr/include/c++/13/backward
/usr/lib/gcc/x86_64-redhat-linux/13
/usr/include/c++/13/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux/13/include
/usr/local/include
/usr/include
/usr/include/linux
-iquote:
-I:
-ML:
/usr/lib64/libc.so.6
/usr/lib64/libm.so.6
/usr/lib64/libutil.so.1
/usr/lib64/libpthread.so.0
/usr/lib64/libstdc++.so.6
/usr/lib64/libc++.so.1
-L:
/usr/local/lib64/
/usr/local/lib/
/usr/lib64/
/usr/lib/
/usr/lib/gcc/x86_64-redhat-linux/13
-rpath:
$ circle --std=c++20 --stdlib=libc++ --print-paths /dev/null
error: could not find clang-headers Even trying to look at things with |
A little more on this ... On a Ubuntu 20.04 container with appropriate packages installed, it all almost works: $ circle --stdlib=libc++ --print-paths /dev/null
stdlib version:
9
-isystem:
/usr/lib/llvm-10/lib/clang/10.0.0/include
/usr/local/include
/usr/include/x86_64-linux-gnu
/usr/include
/usr/include/linux
-iquote:
-I:
-ML:
/usr/lib/x86_64-linux-gnu/libc.so.6
/usr/lib/x86_64-linux-gnu/libm.so.6
/usr/lib/x86_64-linux-gnu/libutil.so.1
/usr/lib/x86_64-linux-gnu/libpthread.so.0
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/usr/lib/x86_64-linux-gnu/libc++.so.1
-L:
/usr/local/lib/
/usr/lib64/
/usr/lib/
/usr/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/gcc/x86_64-linux-gnu/9
-rpath: preprocessor: include/sir.hh:33:11
... included from tests/tests++.hh:29:11
... included from tests/tests++.cc:26:10
cannot find header type_traits Seems the logic for finding the correct paths is a somewhat lacking - it's missing the include path I confirm that specifying |
And, also, trying to use LLVM-12 with Boost format in this application gives me a bizarre error, where llvm-10 works fine: ODR used by: bool sir::tests::boost_format()
tests/tests++.cc:198:5
_sir_eqland(pass, log.debug_boost(bf("Testing %1% %2%") % "boost" % "Howdy"));
^
ODR used by: boost::basic_format<char, std::char_traits<char>, std::allocator<char>>::basic_format(const char*)
/usr/include/boost/format/format_class.hpp:173:32
internal_streambuf_t buf_; // the internal stream buffer.
^
ODR used by: boost::io::basic_altstringbuf<char, std::char_traits<char>, std::allocator<char>>::basic_altstringbuf(unsigned)
/usr/include/boost/format/alt_sstream.hpp:57:40
explicit basic_altstringbuf(std::ios_base::openmode mode
^
instantiation: /usr/include/boost/format/alt_sstream_impl.hpp:227:9
during instantiation of function int boost::io::basic_altstringbuf<char, std::char_traits<char>, std::allocator<char>>::overflow(int)
template arguments: [
'Ch' = char
'Tr' = std::char_traits<char>
class 'char_traits' declared at /usr/lib/llvm-12/include/c++/v1/__string:354:1
'Alloc' = std::allocator<char>
class 'allocator' declared at /usr/lib/llvm-12/include/c++/v1/iosfwd:114:25
]
basic_altstringbuf<Ch, Tr, Alloc>::
^
error: /usr/include/boost/format/alt_sstream_impl.hpp:261:45
no viable candidates in call to 'allocate'
object is lvalue std::allocator<char>
argument 0 is lvalue unsigned long
argument 1 is prvalue char*
newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
^
candidate: char* std::allocator<char>::allocate(unsigned long)
/usr/lib/llvm-12/include/c++/v1/memory:833:10
_Tp* allocate(size_t __n) {
^
error: invalid argument count
function expects 1 argument, 1 provided |
Hi @seanbaxter
Related to Circle is incompatible with GCC's stdatomic.h #183 ... I can't seem to get std::format to work (with libstdc++13) ...
![Screenshot from 2023-09-13 15-34-53](https://private-user-images.githubusercontent.com/61629094/267769623-28346671-b48c-499b-b292-3e31bbe0ba96.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODk4MDgsIm5iZiI6MTczOTE4OTUwOCwicGF0aCI6Ii82MTYyOTA5NC8yNjc3Njk2MjMtMjgzNDY2NzEtYjQ4Yy00OTliLWIyOTItM2UzMWJiZTBiYTk2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDEyMTE0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI0Yzk0OThmZjk5MzFmOTVlMTg2ODlhYTEyYzA1MjhhNjZhYjg1N2JhNGY4YjM2NDIyZDViOWU2ZDRlZWI0Y2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ggnk4iCYvfG9JaqUWIb_lc_S9luDUOXA-3Ux_BdzPxE)
... and I cannot use LLVM's libcxx instead of libstdc++ (which I expect would work), because Circle cannot locate the headers, and I can't seem to discern where it would be looking for them.
FWIW, the location of the headers has changed recently - they now reside in ...
/usr/lib/clang/${VER_MAJOR}/include
... where
${VER_MAJOR}
is the LLVM major version only.Previously, these headers were located in directories with the pattern of ...
/usr/lib64/llvm${VER_MAJOR}/lib/clang/${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}/share
... i.e.
/usr/lib64/llvm12/lib/clang/12.0.1/share
The text was updated successfully, but these errors were encountered: