GLIBCXX_3.4.26 not found on centos - libstdc++

I am facing this issue on centos:-
/lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found
Gcc version i have is :- gcc version 7.2.0 (GCC)
How can i install GLIBCXX_3.4.26 on centos 7.8?

You need to build your application using the system compiler or GCC from Developer Toolset. Developer Toolset uses a hybrid linkage model which avoids these errors. This functionality is likely missing from your custom build of GCC.

Related

How to install older version of GCC on Windows 10

I need to install MinGW GCC 7.3 on my computer for a project. Downloaded and installed: C:\MinGW\bin\MingGW-get.exe. But when I run it, it only gives me the option to install the latest GCC v9.2.0. How do I download and install GCC v7.3 on my computer? Step-by-step directions appreciated.
Unless you specifically want the mingw.org toolchain, check out https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/. Currently there's v8.1.0, v7.3.0, v6.4.0 and v5.4.0. Other versions are available elsewhere.
Of you need to support an older C/C++ standard the -std= compiler flag may already help (e.g. -std=c99 for ISO 1999 C or -std=c++98 for ISO 1998 C++).
Note that GCC 7.3 is not the latest version of GCC 7. The latest GCC 7 release is version 7.5.0.
You can the Windows (MinGW-w64) version from: http://winlibs.com/
The online installer tool (first option on the page) allows you to do so.
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe

How to install two GCC versions for cuda 5.0 on centos7

I need to install cuda 5.0 in centos7 x64. But, I have a problem with GCC, as the current version installed is (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11).
What is the supported version of GCC for Cuda 5.0 and how to install this older GCC version with my actual compiler ((GCC) 4.8.5).
Thanks in advance
#talonmies has provided a list of maximum GCC version supported by different versions of CUDA. Specifically: CUDA 5.0 supports GCC up to 4.6 - and that's what you should install.
There's an answer here on SO which explains how to get GCC 4.6(.3) installed by building from sources. Essentially you need to build some libraries with any C compiler before you can build GCC itself.
Good luck.

Upgrading from GCC 4.8.2 to GCC 4.9.0 without a complete rebuild

I installed the GCC 4.8.2 a couple of weeks ago. The installation process went well and I have GCC 4.8.2 at my Ubuntu system (12.04 64 bits). Now GNU just released the newer version 4.9.0.
My question is: Is there any way to upgrade my GCC to 4.9.0 without doing all process: configuration, building, checking and installation from scratch?
Also, please tell me what is the benefit/purpose of gcc-4.8.2-4.9.0.diff.gz file?
Is it like script/patch file to upgrade my compiler?
FYI, I don't have any plan to have two different versions of GCC at my system.
My question is: Is there any way to upgrade my GCC to 4.9.0 without doing all process: configuration, building, checking and installation from scratch?
Yes, if you have it already built. No, if you have only sources.
Also, please tell me what is the benefit/purpose of gcc-4.8.2-4.9.0.diff.gz file?
Read manual for patch utility how to apply it. You can convert 4.8.2 sources to 4.9.0 ones with this diff.
Is it like script/patch file to upgrade my compiler?
Yes, but for its sources. So building is still required.
Do you really need new features of 4.9 for your projects?

Compiling with different GCC versions

This is a follow up Q to CUDA incompatible with my gcc version.
I've recently updated to Ubuntu 12.04 as well as grabbing the latest CUDA toolkit. My nvcc --version is showing: Cuda compilation tools, release 5.0 (My driver ver is 304.43.)
I'm trying to fix my build environment. I get errs about using GCC 4.6. I can probably fix this w/ the help of the above link. I'm wondering about the other 8 packages in this large project. Should I be concerned with building other pieces with one version of GCC-4.6 and my cuda stuff with GCC-4.5? I figure they should all be compatible, but I've never run into this before. Is this anything I need to be concerned with?
I have run into incompatibility issues with different versions of GCC.
Specifically, GCC 4.7 and 4.6. My Qt applications wouldn't compile for me, because I was using GCC 4.7, and the library was compiled against GCC 4.6. They compiled fine, and there seemed to be no problem at first. But then I ran into trouble actually running them.
I would recommend against using different versions of GCC in the same project.

Building Qt 4.8.1 from src on MacOS using gcc 4.5

I have a question about building Qt SDK 4.8.1 using gcc on Mac. I need to use gcc 4.5 or higher, so I installed mp-gcc45 package using macports (so tried with mp-gcc47), selected this version of gcc, so
gcc -v
Says me that gcc version 4.5.4 (MacPorts gcc45 4.5.4_6)
So I downloaded QtSDK src from official site, configure it and there is an error at first step:
cc1plus: error: unrecognized command line option "-fconstant-cfstrings"
Maybe its stupid solution, but I remove this flags from configure file, so I get a error after make call:
g++: unrecognized option '-Xarch_x86_64'
Can you give me an advice, how to build Qt using this version of gcc?
Non-Apple gcc will never work with Qt of any version. Only Apple gcc recognizes those Apple flavored compiler options.
You are stuck with gcc 4.2 on Mac. There's no way around it.

Resources