当前位置:网站首页>GCC error: terminate called after throwing an instance of 'std:: regex_ error‘ what(): regex
GCC error: terminate called after throwing an instance of 'std:: regex_ error‘ what(): regex
2022-07-06 16:55:00 【Flower dog fdog】
The reason for this error should be gcc Version problem .
View version commands :
gcc --version
If there is no accident, it should be 4.8.x Version of
Inquiry gcc4.9 To support c++ Regular expression of , So we need to put gcc upgrade .
Find one first gcc4.9 Install the source package of ( Find one for yourself )
mkdir build
…/./configure
make & make install
perform configure There may be a mistake :
linux : error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
It indicates that these three libraries need to be installed :
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz
tar.bz2 Unpack the command tar -jxvf
tar.gz Unpack the command tar -zxvf
./configure
make & make install
perform gmp Of configure There may be a mistake :
error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons)
Explain the lack of m4 This library
wget http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.bz2
perform ./configure There may be a mistake :
./stdio.h:477:1: error: ‘gets’ undeclared here (not in a function)
_GL_WARN_ON_USE (gets, “gets is a security hole - use fgets instead”);
Get into m4/lib Find one stdio.in.h The problem of , If you can't find it, try it find -name stdio.in.h
Comment out the first line
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
Add the following
#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
Then compile these libraries all the way
It's time to compile gcc When
configure Wrong again.
I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.
perform
sudo yum install glibc-devel.i686
sudo yum install libgcc.i686
Oh, finally
perform make
make install Walk up
Oh, I forgot to say , If your machine is multi-core, you can perform parallel compilation make -j8 The following numbers represent the audit
You can watch a movie during this period , Not surprisingly, I've finished reading make We're not done yet .....
I feel that it is not the language itself that persuades people to retreat , indicating contrast linux Environment configuration .
边栏推荐
- How to configure hosts when setting up Eureka
- 100张图训练1小时,照片风格随意变,文末有Demo试玩|SIGGRAPH 2021
- JS time function Daquan detailed explanation ----- AHAO blog
- Li Kou leetcode 280 weekly match
- QT system learning series: 1.2 style sheet sub control lookup
- [unsolved]7-14 calculation diagram
- 登陆验证koa-passport中间件的简单使用
- @RequestMapping、@GetMapping
- 7-8 likes (need to continue to improve)
- J'ai traversé le chemin le plus fou, le circuit cérébral d'un programmeur de saut d'octets
猜你喜欢
Solr word segmentation analysis
Detailed explanation of FLV format
TCP的三次握手和四次挥手
~81 long table
7-4 harmonic average
LeetCode 1637. The widest vertical area between two points without any point
字节跳动2022校招研发提前批宣讲会,同学们最关心的10个问题
Cmake Express
Shell_ 04_ Shell script
The 116 students spent three days reproducing the ByteDance internal real technology project
随机推荐
字节跳动2022校招研发提前批宣讲会,同学们最关心的10个问题
Eureka high availability
After the subscript is used to assign a value to the string type, the cout output variable is empty.
LeetCode 1558. Get the minimum number of function calls of the target array
Erlang installation
Chapter 6 datanode
Error: case label `15 'not within a switch statement
图像处理一百题(11-20)
Spark independent cluster dynamic online and offline worker node
Detailed explanation of FLV format
Eureka single machine construction
Basic principles of video compression coding and audio compression coding
Audio and video development interview questions
100张图训练1小时,照片风格随意变,文末有Demo试玩|SIGGRAPH 2021
~72 horizontal and vertical alignment of text
~70 row high
LeetCode 1551. Minimum operand to make all elements in the array equal
Shell_ 07_ Functions and regular expressions
[unsolved] 7-15 shout mountain
Simple records of business system migration from Oracle to opengauss database