libstdc++

Getting ImportError /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'CXXABI_1.3.11' not found

梦想与她 提交于 2020-01-06 04:37:09
问题 I'm currently trying to run a Python program that uses RDKit and am facing an error. The get straight to the point, the complete traceback is: Traceback (most recent call last): File "./main.py", line 4, in <module> from train import Trainer File "/home/user1/repo1/train.py", line 12, in <module> from utils import make_batches File "/home/user1/repo1/utils.py", line 9, in <module> from rdkit import Chem, DataStructs File "/home/user1/anaconda3/envs/user1conda/lib/python3.7/site-packages/rdkit

How do I tell a native node.js extension where to find (the right) libstdc++?

十年热恋 提交于 2020-01-05 14:23:01
问题 I’m installing scrypt (https://www.npmjs.com/package/scrypt) from npm. The installation involves a node-gyp build step that builds a native node.js extension. When I then start my app, it fails with the following error: node index.js module.js:568 return process.dlopen(module, path._makeLong(filename)); ^ Error: /package/host/localhost/gcc-4/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/xxxx/xxxx/node_modules/scrypt/build/Release/scrypt.node) at Error (native) at

GCC 4.7.2: std::thread with pointer to member function

和自甴很熟 提交于 2020-01-03 18:32:14
问题 In writing test code for this question I found that the commented line below does not compile on GCC 4.7.2: #include <thread> #include <iostream> struct S { void f() { std::cout << "Calling f()" << std::endl; } }; int main() { S s; // std::thread t(&S::f, s); // does not compile? std::thread t(&S::f, &s); t.join(); } But cppreference seems to claim that the "this" argument can be passed equivalently as an object, reference to object, or pointer to object: If f is pointer to a member function

linker problem with libstdc++.so.6 in connection with cuda

岁酱吖の 提交于 2020-01-02 05:23:15
问题 today i encountered a problem with linking my compiled cuda stuff. i have a uptodate debian testing w/ 2.6.32-3-amd64. i worked all day on my code. compiling from time to time. had no problem. but then after a minor code change i got following error: gcc -o pa CUDA.o histogram256.o histogram64.o main.o -lrt -lm -lcudart -I. -I/data/cuda/include -I/data/cuda/C/common/inc -L/data/cuda/lib64 /usr/bin/ld: main.o: undefined reference to symbol 'std::basic_ifstream<char, std::char_traits<char> >:

Checking for C++11 library features

有些话、适合烂在心里 提交于 2020-01-02 01:25:08
问题 What is a good way of checking for the presence of specific C++11 features of the standard library . For compiler features I just went by the way of checking the compiler version for the (IMHO) major compilers ( VC++ , gcc , clang at the moment, maybe Intel ) Although this is not the best and most flexible approach, I don't know of anything better yet, except for clang which has the really nice __has_feature macros. But it's even worse for library features, which are not coupled that rigidly

C++ Error “failure: locale::facet::_S_create_c_locale name not valid” when running program from command line

帅比萌擦擦* 提交于 2020-01-01 11:52:08
问题 I seem to have a problem with locales in C++. When I run my programm from within Eclipse, it all works fine. However, when I try to run from the command line, I keep getting this error: failure: locale::facet::_S_create_c_locale name not valid This is the code that triggers the error: // Set up UTF8 file stream string fileName = "./sz.txt"; wifstream inFileStream; try { setlocale(LC_ALL, ""); inFileStream.open(fileName.c_str()); inFileStream.imbue(locale("")); if(!inFileStream) { return EXIT

g++ without libstdc++ - can it be done? - a very configurable lightweight libstdc++ where I can take stuff out easily would also do the trick

喜夏-厌秋 提交于 2020-01-01 08:33:30
问题 I'm trying something spooky here. I'm trying to write C++ programs, compiled with GNU's g++, but without a dependency on libstdc++ :) but it seems that I need that for even the most basic things need it. A libstdc++ with a configurable feature set would be acceptable. The command I use is g++ -nodefaultlibs -fno-rtti -fno-exceptions -lc Without libstdc++, I get: undefined reference to `operator delete(void*)' undefined reference to `operator new(unsigned int)' undefined reference to `vtable

SIGFPE when accessing unordered_map

本秂侑毒 提交于 2020-01-01 04:49:08
问题 I have an unordered_map<Block, int> with Block being a simple struct defined as follows: struct Block { size_t start; size_t end; bool operator==(const Block& b) const { return start == b.start && end == b.end; } }; namespace std { template<> struct hash<Block> { size_t operator()(const Block& b) const { return b.start; } }; } When trying to access the map, I do get the following error message in gdb (same for both g++ 4.7.1 as well as clang++ 3.1): Program received signal SIGFPE, Arithmetic

Why don't memory allocators actively return freed memory to the OS?

耗尽温柔 提交于 2019-12-31 23:12:06
问题 Yes, this might be the third time you see this code, because I asked two other questions about it (this and this).. The code is fairly simple: #include <vector> int main() { std::vector<int> v; } Then I build and run it with Valgrind on Linux: g++ test.cc && valgrind ./a.out ==8511== Memcheck, a memory error detector ... ==8511== HEAP SUMMARY: ==8511== in use at exit: 72,704 bytes in 1 blocks ==8511== total heap usage: 1 allocs, 0 frees, 72,704 bytes allocated ==8511== ==8511== LEAK SUMMARY:

Why does this file stream, with no error flags set, fail to read unless I do tellg()?

半世苍凉 提交于 2019-12-25 09:09:58
问题 I have a fstream that seems to get into a phantom failure state, even though examining it (via conversion to bool ) reveals no error flags. Subsequent reads fail, which is unexpected. #include <fstream> #include <iostream> #include <cassert> int main() { const unsigned int SAMPLE_COUNT = 2; // Setup - create file with two "samples"; each sample has a double and a float { std::ofstream ofs("/tmp/ffs", std::ios::binary); const double colA[SAMPLE_COUNT] = { 1.0, 2.0 }; const float colB[SAMPLE