Questions tagged [libc++]
libc++ is an open C++ Standard Library implementation, and a subproject of LLVM.org. It has been designed for C++11.
1
vote
0answers
20 views
Pip install thrift_sasl on Mac OS 10.14
While I was installing thrift_sasl by pip.
sudo pip install thrift_sasl
I met an error. The error info is below:
Running setup.py install for sasl ... error
Complete output from command /Library/...
0
votes
0answers
24 views
linker command failed with exit code 1 (clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]) [on hold]
I have moved my project to other mac, it's giving me following issues, i tried many solutions but cant solve yet.
Please view the error below
clang: warning: libstdc++ is deprecated; move to libc+...
0
votes
0answers
21 views
Why entry of DT_INIT_ARRAY not relocated
Backgroud
We self implements a runtime linker on android to test loading shared library.
The problem is:
When I load libc++.so, I call DT_INIT_ARRAY functions, I found the entry in DT_INIT_ARRAY is ...
0
votes
0answers
16 views
“Compact unwind” issues integrating IPP library on MacOS
In the process of upgrading a MacOS library I've changed the OS X deployment target version from 10.8 to 10.9. However, one of library dependencies used Intel's IPP (Intel Performance Primitives), ...
0
votes
1answer
27 views
Is the libc++fs.a file corrupt in deb http://llvm.org/apt/stretch/ llvm-toolchain-stretch-7 main
When I do a nm /usr/lib/llvm-7/lib/libc++fs.a I get:
...
nm: /usr/lib/llvm-7/lib/libc++fs.a(operations.cpp.o): SHT_GROUP section [index 46] has no SHF_GROUP sections
nm: operations.cpp.o: File format ...
-1
votes
1answer
39 views
gnustl (libstdc++) to llvm (libc++ ) errors
I am started to get these errors after I have migrated from gnustl to libc++. I could not find anything over internet on this. and do not have any more information.
I am continuing my investigation on ...
0
votes
2answers
14 views
Hashtable class is missing in llvm libc++
I am doing the migration of standard library in my Android projects from gnustl (libstdc++) to llvm-libc++.
and in one of the project, I am getting multiple errors of the missing header file,
...
2
votes
2answers
82 views
How does libc++'s std::is_literal_type work?
This is the same situation for std::is_literal_type and std::is_standard_layout.
The implementation of std::is_literal_type in libc++ is
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS ...
3
votes
1answer
93 views
std::bad_weak_ptr when inheriting std::shared_from_this from base class
First of all this issue seems to be related to using clang (any version) and libstdc++ higher than version 6.5.0 together.
I'm using the following idiom in my codebase to hide the implementation from ...
4
votes
1answer
104 views
What does it mean for a program to link to both libstdc++ and libc++?
Recently, I saw a C++ program list both libstdc++ and libc++ in its dynamic section (readelf -d).
I’m confused because one is from GNU and the other from LLVM and they are both implementations of the ...
1
vote
1answer
50 views
why __dependent_type from libcxx uses a template non-type parameter bool _Dummy?
Here is the definition of __dependent_type:
template <class _Tp, bool>
struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {};
All use cases:
/usr/.../c++/v1 >>> rg "...
0
votes
1answer
154 views
Static linking libc++ clang
I trying to link statically the standard library libc++ (https://libcxx.llvm.org/) in Linux (Arch using this AUR https://aur.archlinux.org/packages/libc%2B%2B/) using Clang.
I get the error /usr/bin/...
0
votes
0answers
34 views
gomobile bind -target=ios golang.org/x/mobile/example/bind/… libc++ error
warning: include path for stdlibc++ headers not found; pass
'-std=libc++' on the command line to use the libc++ standard library
instead [-Wstdlibcxx-not-found] In file included from calib3d.cpp:1:...
0
votes
1answer
351 views
Linux libc++ seems to be broken [closed]
Hay all!
Today, i installed the deepin distro (based on debian) on my laptop.
When trying to install Discord, it mentioned that the dependency libc++ was broken or impossible.
When trying to install,...
12
votes
1answer
348 views
Why is sizeof( std::variant< char > ) == 8 when using libc++ and not 2 (like with MSVC's STL and libstdc++)?
Consider this example on Compiler explorer.
Basically, we have this code snippet:
#include <cstdint>
#include <variant>
enum class Enum1 : std::uint8_t { A, B };
enum class Enum2 : std:...
0
votes
0answers
26 views
What's polluting the global namespace here? [duplicate]
This code compiles on recent gcc and clang:
#include <iterator>
#include <vector>
int main(int argc, char** argv)
{
std::vector<int> v(20);
fill(begin(v), end(v), 0);
...
0
votes
1answer
29 views
What does LIBCXX_LIBCPPABI_VERSION get set to when building libcxx?
I'm working on a build script to build LLVM 7.0 release tarballs from sources. Most of my attempts to build libcxx and libcxxabi have failed. Someone suggested I should set LIBCXX_LIBCPPABI_VERSION.
...
-1
votes
1answer
68 views
When/why are libstdc++ and libc++ symbols incompatible?
Setup:
test.cpp
#include <set>
#include <string>
void common_config_file_iterator(const std::set<std::string>& allowed_options) {}
include.cpp
#include <set>
#include &...
2
votes
0answers
127 views
After Xcode Update, “python3 setup.py build_ext --inplace” breaks because it uses libstdc++ instead of libc++
I updated xcode-select install to the latest version, which doesn't support libstdc++ anymore, therefore libraries such as 'iostream' can't be found when I run:
$ python3 setup.py build_ext --inline
...
0
votes
0answers
21 views
Problem when building libcxx on windows, “error: redeclaration of 'operator delete' cannot add 'dllexport' attribute”
Previously I already built llvm, clang, lld against msvc build tools 2017.
I'm now trying to build libcxx against newly built clang-cl using cmake/ninja. Then I got this error.
In file included from ...
0
votes
0answers
39 views
While building libcxx using clang-cl, I get CMake error “include could not find load file: AddLLVM”?
I have just successfully built llvm, clang and lld on msvc build tool 2017 with windows 10 sdk.
I tried to build libcxx next.
While I was doing cmake/ninja (with clang-cl of newly built clang), I ...
0
votes
0answers
93 views
V8 linker errors when building project on Ubuntu (c++)
I have been trying to build V8 and link even the simplest project to it in c++ but I keep getting mass linker errors regarding libc++ but i'm unsure how to resolve it. (most of my c++ experience is ...
5
votes
3answers
509 views
cvxpy stlibc++ Installation error on MacOS Mojave
While trying to install cvxpy package using pip install on Mac, I get the following error message:
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use ...
5
votes
1answer
143 views
Why does this stringstream fail when parsing into double?
I have the following code:
#include <string>
#include <iostream>
#include <sstream>
int main()
{
size_t x, y;
double a = std::stod("1_", &x);
double b = ...
0
votes
0answers
13 views
Implementation of __cxa_exception_type in llvm-libc++
My application is using __cxa_exception_type() to get the exception type_info from exception_ptr class in excpetion_ptr.h in gnustl lib.
const class type_info*
__cxa_exception_type() const ...
0
votes
1answer
147 views
Xcode 10 Removing lstdc++
lstdc++ is removed from Xcode 10 so I removed this lib from "Link Binary With Libraries" and I added libc++.tbd but I got something like that in linker
Undefined symbols for architecture x86_64:
"...
0
votes
0answers
20 views
Is it a good idea to run a linux VM in order to compile software that uses libstdc++?
I need to compile and run software called Indri
http://www.lemurproject.org/indri.php
However, when I try to run the buildindex application I get a segmentation default, which according to this ...
0
votes
1answer
37 views
invalid template compilation
I am including CGAL headers in my android library and I am getting this error. I am not using CGAL::Epick myself, and it is a type that is templatized in CGAL. This does not appear to be a CGAL ...
0
votes
1answer
46 views
Clang: Copy assignment operator is getting deleted while using std::Map in libc++
I am facing some build errors while building PROJ_XXX. I am making changes to migrate from gnustl lib to libc++.
Build errors
f:\office\build\droidx86\debug\proj_xxxx\test\android\objd\droidx86\...
1
vote
1answer
5k views
stdlibc++ headers not found error on xcode 10 [duplicate]
We have some c libraries written for our iOS project and after upgrading to Xcode 10, when compiling we get the error:
error: include path for stdlibc++ headers not found; pass ‘-std=libc++’
on the ...
0
votes
0answers
33 views
Adding library to LLVM 6.0.1's libc++
I have a 3rd party static library along with its source, which supersedes part of libc++ functionality; mainly memory allocations.
How can I add it to libc++ so it overrides those parts of it? I've ...
8
votes
1answer
201 views
How to understand the source code of 'nullptr' in LLVM?
Recently, I want to know how nullptr works. In http://www.stroustrup.com/N1488-nullptr.pdf , I found the code.(Sorry, I don't have 10 reputations, so I can't post images here, you can follow the link ...
1
vote
1answer
45 views
Linking two libraries built with c++_static
In the following webpage,
https://developer.android.com/ndk/guides/cpp-support
it states that having two libraries (libA.so, libB.so) compiled with c++_static breaks the one-definition rule, in ...
1
vote
1answer
130 views
How to specify custom libc++
I have built libc++ and want to use it when compiling my program ?
so I have something like
clang++ -stdlib=~/libc++/libc++.so main.cpp
but this does not work. How can use my custom built libc++ ...
1
vote
1answer
383 views
How to build clang with libc++ as default via LLVMs build_docker_image.sh?
I want to build a docker container with clang 6 and libc++ as default C++ standard library. I want to include (and use) the LLVM project clang, libcxx, libcxxabi, lld and compiler-rt.
To set libc++ ...
0
votes
1answer
242 views
libc++abi undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
I'm running Ubuntu 18.04.1 LTS and I'm attempting to get Half Life's game libraries to run within the Xash3D engine. They build OK, but when I attempt to run the engine I get the following confusing ...
0
votes
1answer
28 views
stl(libcxx) renderers in Xcode debug
The test case is simple: just std::vector with some elements. During debug session I do not see even the size of the vector, which according to lldb is 0.
I have googled a lot and what I only found ...
5
votes
1answer
347 views
Clang with libc++ exceptions
I've been experimenting with different c++ libs, and found out the following:
The simple application:
#include <iostream>
int main(int argc, char* argv[])
{
try
{
throw 1;
}...
-1
votes
1answer
678 views
Can't install libc++ on Arch Linux
I'm trying to install Discord which requires libc++.
AUR helpers just exit the installation and don't want to install this dependency.
If I do this manually I receive errors like this (via yaourt):
...
0
votes
1answer
107 views
What is std::vector::_emplace_back_slow_path / std::vector::_push_back_slow_path?
When using a call profiler, I noticed a high runtime cost and a high number of allocations in std::vector::_emplace_back_slow_path. Because I am concerned about performance, I want this to say "fast ...
6
votes
1answer
255 views
libc++: Why is the stream still good after closing
I have a very simple program
#include <iostream>
#include <fstream>
void CHECK(std::iostream& s)
{
std::cout << "good(): " << s.good()
<< " fail()...
1
vote
1answer
199 views
When was libc++ introduced in iOS?
The release notes for Xcode 10 beta 2 say:
Building with libstdc++ was deprecated with Xcode 8 and is not supported in Xcode 10 when targeting iOS. C++ projects must now migrate to libc++ and are ...
0
votes
0answers
45 views
Number Theory Library (NTL) on Mac Xcode - c++ - (Undefined symbols for architecture x86_64) Linker error - Apple Mach-O Linker (ld) Error Group
I have used "brew install ntl" on mac.
If I use libc++ in Xcode I get the following linking errors:
Undefined symbols for architecture x86_64: "_ntl_gcopy(_ntl_gbigint_body*, _ntl_gbigint_body**)", ...
0
votes
1answer
50 views
Is libunwind implementation of abi in libcxxabi?
I was trying to build libcxx/libcxxabi/libunwind when I realized that I didn't actually understand what role they play.
I checked libcxxabi spci, and found that it defines API used in C++ exception. ...
0
votes
0answers
19 views
Python binding for a cpp project having boostC++ library dependency for compilation
I am currently working on framing a python wrapper for a cpp project that has boost c++ library dependency for compilation and requires compiler with c++11 support. i use macOS High Sierra 10.13.2..On ...
0
votes
0answers
42 views
How can I get libc++ STL visualizers in lldb on Linux?
On Linux, when I am debugging a C++ program compiled using clang and libc++, I cannot see the value of a string. This is especially try in CLion, but even from the console I don't get any thing useful....
7
votes
1answer
142 views
What is the reasoning behind libc++'s 16-byte alignment pattern for std::basic_string?
While looking at the libc++ implementation of std::basic_string, I came across this in line 1374 (at the time of writing):
enum {__alignment = 16};
This value is used in subsequent alignment ...
0
votes
0answers
26 views
Clang stdlib heades and cmake [duplicate]
I am trying to build my C++17 project on Ubuntu using clang 7.0.
I have build and installed llvm, clang, it's libcxx and libcxxabi.
When I try to compile the code I see in log files that it still uses ...
2
votes
0answers
236 views
What's the status of the libc++ port to windows?
I've read that you can use Clang on Windows for C++ apps while using the MS implementation of the C++ standard library. But if you want to use libc++ on Windows, you currently need to use something ...
0
votes
1answer
449 views
Error while installing libc++
I am a manjaro user. I wanted to install discord with AUR but I needed to install libc++... But there is an error while installing this package.
Command: ['/tmp/yaourt-tmp-lulz/aur-libc++/src/build/...