当前位置:网站首页>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 .
边栏推荐
猜你喜欢
SQL quick start
TCP的三次握手和四次挥手
The QT program compiled on CentOS lacks a MySQL driven solution
J'ai traversé le chemin le plus fou, le circuit cérébral d'un programmeur de saut d'octets
Chapter 5 yarn resource scheduler
Mp4 format details
「博士毕业一年,我拿下 ACL Best Paper」
谢邀,人在工区,刚交代码,在下字节跳动实习生
Two weeks' experience of intermediate software designer in the crash soft exam
Chapter 1 overview of MapReduce
随机推荐
LeetCode 1558. Get the minimum number of function calls of the target array
Eureka high availability
Fdog series (I): think about it. It's better to write a chat software. Then start with the imitation QQ registration page.
Error: case label `15 'not within a switch statement
LeetCode 1557. The minimum number of points that can reach all points
我在字节跳动「修电影」
Shell_ 04_ Shell script
~81 long table
Cmake error: could not create named generator visual studio 16 2019 solution
字节跳动海外技术团队再夺冠:高清视频编码已获17项第一
~77 linear gradient
Data config problem: the reference to entity 'useunicode' must end with ';' delimiter.
Solve the problem of intel12 generation core CPU [small core full, large core onlookers] (win11)
Solve the single thread scheduling problem of intel12 generation core CPU (II)
js垃圾回收机制和内存泄漏
[graduation project] QT from introduction to practice: realize imitation of QQ communication, which is also the last blog post in school.
我走過最迷的路,是字節跳動程序員的腦回路
~83 form introduction
这群程序员中的「广告狂人」,把抖音广告做成了AR游戏
7-12 inventory code base