Questions tagged [libstdc++]
Libstdc++ is the GNU implementation of the C++ standard library and is provided as part of GCC
766
questions
0
votes
1
answer
68
views
Unable to find uint8_t despite having build the freestanding libs for C++
Edit: Is this related to this bug report?
Unable to find uint8_t despite having build the freestanding libs for C++
The error I get is:
FAILED: CMakeFiles/nak.dir/Kernel/src/kernel.cpp.o
/home/jared/...
1
vote
0
answers
35
views
How to link libcxx application to a C++ library compiled with gcc
I am trying to link an application that is compiled with clang/libc++ to the v8-devel system library on Fedora. However the latter is compiled with gcc/libstdc++ which leads to a linking error for std:...
1
vote
1
answer
28
views
/opt/cpanel/ea-php74/root/usr/lib64/php/modules/chilkat_9_5_0.so (/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found
I am trying to use a PHP extension (chilkat_9_5_0) on VPS server. after adding it, it gives below error message:
PHP Startup: Unable to load dynamic library 'chilkat_9_5_0.so' (tried: /opt/cpanel/ea-...
0
votes
0
answers
32
views
How to install libstdc++-static on RHEL-8?
I can't install libstdc++-static (or glibc-static for that matter).
When I do sudo yum install -y libstdc++-static
It returns with:
No package libstdc++-static available.
I do have libstdc++-devel....
0
votes
0
answers
17
views
Why libstdc++-6.dll is so big in gstreamer 1.20.5 MinGW 64-bit installer?
OS: Windows 10
I have QT application ( Qt 5.14.0 ), that uses Gstreamer ( 1.16.2 ). Everything works ok. Now, I would like to change Gst 1.16.2 to 1.20.5.
When I build app, I get an error - I have two ...
0
votes
0
answers
20
views
Fail to install RPM package due to libstdc++ version
When I install an RPM package, it prompted wrong message that was dependencies problem of libstdc++.so.6. My OS is CentOS 7.9 and gcc version is 11.
[root@dist]# rpm -hiv TCGstorageAPI-1.0-1.x86_64....
0
votes
0
answers
33
views
While trying to encode a pointcloud I keep getting the same errors. I have tried to changing my environment and updating Glibcxx version and yet
$ python vmuc.py compress /home2/kubra/JPEG/Stanford_Area_2.ply ../models/Geometry-only/Codec/0.00025/checkpoint_best_loss.pth.tar ../results/G0.00025
Traceback (most recent call last):
File "/...
0
votes
1
answer
79
views
Linking error when using NVIDIA's static PTX compiler library & -lpthreads [duplicate]
I'm linking a program using NVIDIA's PTX compiler library, with a link command generated CMake, like so:
usr/bin/c++ -O3 -DNDEBUG \
CMakeFiles/vectorAdd_ptx.dir/modified_cuda_samples/vectorAdd_ptx/...
0
votes
0
answers
123
views
Fatal Error: Cannot read module file ‘mod_input.mod’ opened at (1), because it was created by a different version of GNU Fortran
I am getting following error in compiling CaMa-Flood model on Ubuntu 20.04 version.
sh compile.sh
compile.sh: 13: [: =: unexpected operator
*********** mod **********
ar -rv mods.a parkind1.o ...
0
votes
1
answer
69
views
Why does `monotonic_buffer_resource` appear in the assembly when it doesn't seem to be used?
This is a follow-up from another question.
I think the following code should not use monotonic_buffer_resource, but in the generated assembly there are references to it.
void default_pmr_alloc(std::...
0
votes
0
answers
32
views
Where is the implementation of abi::__cxa_demangle in libstdc++
GNU's libstdc++ provides the function abi::__cxa_demangle. The declaration of this function can be found in gcc / libstdc++-v3 / libsupc++ / cxxabi.h (code repository here)
I am interested in ...
0
votes
0
answers
1k
views
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found
I'm using Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-194-generic x86_64)
Everything worked fine and don't know what happened this error started to pop out.
$ python3 train.py
Traceback (most recent call ...
30
votes
1
answer
1k
views
Double free in the C++ standard library using only std::function and std::shared_pointer
I recently came across a weird double-free bug in a program when capturing a shared_ptr in a lambda. I was able to reduce it this the following minimal example:
#include <memory>
#include <...
2
votes
0
answers
230
views
Relocation error after 'export LD_LIBRARY_PATH'
Running a python file threw the following error:
File "/home/<username>/miniconda3/<gitrepo>/eval.py", line 13, in <module> from dataset import dtu_jiayu
File "/home/&...
2
votes
0
answers
57
views
Comparing two void* vs. two uintptr_t
In the following piece of code (implementation of std::compare_three_way in libstc++), what is the rationale behind the two reinterpret_cast<__UINTPTR_TYPE__>?
if constexpr (__detail::...
1
vote
1
answer
146
views
Missing libstdc++ headers for arm-none-eabi on Fedora Linux
I am programming the Raspberry Pi Pico-W and I would like to link against the C++ STL, in order to use some of the Standard Library functionalities and containers.
I have found the package on Ubuntu, ...
0
votes
0
answers
93
views
Linux Ubuntu error concerning libstdc++.so.6 during Gromacs make
I'm trying to install Gromacs on an Ubuntu 20.04 build. The machine is about 8 hours old, so I shouldn't be fighting too much legacy software or dependencies. However, I have been struggling with ...
0
votes
2
answers
50
views
Why does " error: no match for 'operator<<' " occur when searching for the iterator?
I am looking for the positions of an element using find(); method, but for some reason it conflicts whit the cout<< and I don't understand why.
#include <bits/stdc++.h>
using namespace ...
1
vote
1
answer
112
views
How Did the GNU libstdc++ Library Find Its Way into Our App?
The Question
This is not about legal advice. We are asking why/how the GNU libstdc++ library seemingly found its way into our app, when to the best of our knowledge it should not be part of our app, ...
0
votes
0
answers
27
views
Error in installing gcc - 11.0. 1 on RISC-V Linux OS
I am trying to installing gcc-11.2.0 on my RISC-V Linux OS but I am getting errors.
Error:
build/gencfn-macros.o build/errors.o build/hash-table.o build/vec.o build/ggc-none.o build/sort.o .././...
0
votes
0
answers
85
views
Is there any convenient way to disable clang's undefined sanitizer for system directories?
It was well established in this question that many errors thrown by UBSAN on clang are not undefined behavior but just warnings.
Although not technically UB, I want to turn them on because most often ...
0
votes
0
answers
68
views
g++ not showing correct line number in error output
Consider this code
#include <map>
#include <memory>
using int_map = std::map<int, std::unique_ptr<int>>;
void f(int_map cl);
void f2() {
int_map cl;
f(cl);
}
...
25
votes
3
answers
3k
views
Undefined behavior (according to clang -fsanitize=integer) on libstdc++ std::random due to negative index on Mersenne Twister engine
I'm using clang++ 10 on Ubuntu 20.04 LTS, with -fsanitize-undefined-trap-on-error -fsanitize=address,undefined,nullability,implicit-integer-truncation,implicit-integer-arithmetic-value-change,implicit-...
0
votes
0
answers
170
views
C++ executable fail to look up LD_LIBRARY_PATH
I am building a simple C++ benchmark using a custom compilation tool (which has in-built clang plugin) and it simply is another regular C++ compiler. However whenever I try to run the compiled (and ...
2
votes
1
answer
146
views
Why doesn't std::istream_iterator< std::string_view > compile?
Why can't GCC and Clang compile the code snippet below (link)? I want to return a vector of std::string_views but apparently there is no way of extracting string_views from the stringstream.
#include &...
0
votes
0
answers
42
views
cannot find -lstdc++ in ubuntu 14.04
I am using ubuntu 14.04 64 bit OS
when i am running my verilog code in synopsys vcs it shows me the following error, i think there might some missing packages in ubuntu, i search through but i didn't ...
1
vote
0
answers
57
views
Why do STL function calls are done via PLT and not directly?
I find it odd, that whole of STL is marked with visibility default and as a result is exported as weak symbols and calls to it go via PLT or GOT if compiled with -no-flt
In example below I'd expect ...
0
votes
0
answers
175
views
Why the `libstdc++.so` compiled from source seems to be incorrect?
I try to compile gcc and libstdc++(as a part of gcc) from the source code.
With:
$ git clone https://github.com/gcc-mirror/gcc.git # mirror repo
$ cd gcc && md build && cd build
$ ../...
1
vote
0
answers
45
views
How to link GCC for GROMACS on cluster?
Recently I have installed gromacs on the master node of my newly installed cluster. As the major requirement of the gromacs is GCC, OpenMPI and gmx_mpi, after compiling everything on the master node, ...
0
votes
1
answer
269
views
Using Clang with built libstdc++ produces undefined symbol _ZSt15__once_callable
I have built libstdc++ with no modifications yet:
cd gccsrcdir/libstdc++-v3/build
../configure --prefix=$PWD/../install
make && make install
I am using Ubuntu 21.10 and I set the following ...
0
votes
1
answer
300
views
Error when compiling a CUDA program: invalid type argument of unary ‘*’ (have ‘int’)
I (or somebody else) is compiling a CUDA program (e.g. vectorAdd from the cuda-api-wrappers library) using CUDA 11.6 and GCC 12.1, with C++17 set as the language standard. I get the following error:
/...
1
vote
2
answers
154
views
Moving functors into std::function's while avoiding copies
I am trying to move a functor into a lambda inside an object, like this:
#include <functional>
#include <iostream>
#include "boost/stacktrace.hpp"
#define fwd(o) std::forward&...
4
votes
2
answers
230
views
Why do libstdc++ headers contain a mix of tabs and spaces? [closed]
I've been looking at libstdc++ headers for a few years now, and I was always surprised about how weirdly it mixes tabs and spaces, e.g. something like:
template<typename _Up, typename... ...
3
votes
1
answer
4k
views
GLIBCXX_3.4.29 not found
I am trying to install mujuco onto my linux laptop and everything works until I try to import it into a python file. When I try to import it/run a python script that already has mujuco in it I get the ...
8
votes
1
answer
309
views
Is std::from_chars supposed to handle uppercase hexadecimal exponents?
On upgrading to Ubuntu 22.04 (amd64), I have noticed that the following code has started to give the result 1.4375 instead of the expected value 1472:
#include <charconv>
#include <iostream&...
2
votes
0
answers
659
views
clang -static-libstdc++ equivalent for libc++?
I'm using clang 10 and gcc 9 on Ubuntu 20.04.
Taking this following sample program:
#include <cstdio>
#include <any>
int main(int argc, char* argv[])
{
std::any v = argc;
printf(&...
6
votes
1
answer
321
views
With clang and libstdc++ on Linux, is it currently feasible to use any standard library types in a module interface?
So far it seems to me that including almost any libstdc++ header in a C++ module interface causes compile errors on clang 14.0.0 and the libstdc++ that comes bundled with GCC 11.2.0. I wonder if I am ...
1
vote
0
answers
356
views
Difference between -static and -static-libstdc++ in GCC
What other stuff does -static add to the final binary output that -static-libstdc++ does not add?
I checked the excellent answer for this question but it doesn't address this particular question that ...
0
votes
0
answers
11
views
Difference b/w package vs package-devel [duplicate]
Hi I wanted to install some packages in my machine. However they are only available as *-devel packages for my distro.
Ex: libcurl-devel, libstdc++-devel is available for suse, but libcurl, libstdc++ ...
1
vote
0
answers
2k
views
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found
I'm getting this error while running my python script on a Linux virtual machine.
Traceback (most recent call last): File "model.py",
line 7, in <module> from data_load import * ...
0
votes
0
answers
45
views
MySQL Client library and static stdc++
We are creating an app which can works on multiple Linux distributions. To achieve it, we are trying to use static libraries instead of shared libraries.
Two major dependencies for our apps that are ...
0
votes
1
answer
107
views
libgcc and libstdcplusplus rpms version supported by node 14 LTC (v14.15.4)
I have a query regarding which gcc versions are supported by node js 14 LTC as in my project we recently upgraded to node js 14 LTC and the libgcc and libstdcplusplus rpms version that were used ...
0
votes
0
answers
176
views
Can't build old libstdc++.so.6 (gcc-5 on arm-glibc-2.13) with version symbols included (leading to libstdc++.so.6: no version information available)
I need to run a dotnet5 app (or build dotnet5 from source) to be compatible with arm machines with very old glibc (as low as glibc-2.13, cannot be upgraded because these are semi-embedded systems).
...
2
votes
1
answer
512
views
Producing a library with a recent gcc and consuming it with an older gcc - Why are there issues despite the same C++ version?
Don't ask me why I am doing what I am doing... that would be a long story.
For now, the purpose of this post is to learn and to understand why things don't work the way I expect. Possibly my ...
1
vote
1
answer
134
views
Compiler generates call to memcpy from std::copy when pointers are of __restrict type?
The gcc compiler generates call to memcpy when i add __restrict to function parameters.
How does compiler/standard library figure out that it can generate calls to memcpy when appropriate?
void ...
0
votes
0
answers
33
views
how to make library from c++ class files (.cpp/.h) so that this can be included in other programs as #include <cplong>?
for cplong class files are cplong.cpp/cplong.h in github.com/zava8/plong --- src/
i have tested these classes in main.cpp . it is working fine?
now i am trying for including cplong as library in other ...
0
votes
1
answer
333
views
compile gcc4.9.2 from source on centos7
I want to use densepose, and according to the installation I need to install gcc4.9.2.
I have downloaded the gcc-4.9.2.tar.gz and prerequisites.
And then run configure
../gcc-4.9.2/configure --enable-...
2
votes
1
answer
2k
views
Missing C++20 headers on Ubuntu 20.04 with Clang 13
I have installed clang-13, but when I try to compile a program that uses C++20 headers, I get missing header errors.
#include <numeric>
#include <numbers> // missing
It seems that CMake ...
3
votes
0
answers
147
views
Convert iterator-sentinel pair to range in clang
I'd like to call a function that takes a single range parameter, using an iterator-sentinel pair. The recommended method seems to be to call std::ranges::subrange(begin, end). For example, I would use ...
3
votes
1
answer
452
views
How to use <stacktrace> in GCC trunk?
From https://github.com/gcc-mirror/gcc/commit/3acb929cc0beb79e6f4005eb22ee88b45e1cbc1d commit, C++ standard header <stacktrace> exists things such as std::stacktrace_entry but is not declared ...