当前位置:网站首页>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 .
边栏推荐
- Data config problem: the reference to entity 'useunicode' must end with ';' delimiter.
- ~77 linear gradient
- LeetCode 1551. Minimum operand to make all elements in the array equal
- Shell_ 07_ Functions and regular expressions
- ~75 background
- Solve the problem of intel12 generation core CPU [small core full, large core onlookers] (win11)
- LeetCode 1447. Simplest fraction
- 视频压缩编码和音频压缩编码基本原理
- Solve the problem that intel12 generation core CPU single thread only runs on small cores
- Use JQ to realize the reverse selection of all and no selection at all - Feng Hao's blog
猜你喜欢
I'm "fixing movies" in ByteDance
Fdog series (I): think about it. It's better to write a chat software. Then start with the imitation QQ registration page.
Solve the single thread scheduling problem of intel12 generation core CPU (II)
Data config problem: the reference to entity 'useunicode' must end with ';' delimiter.
Cmake Express
~87 animation
~74 JD top navigation bar exercise
我在字节跳动「修电影」
Fdog series (III): use Tencent cloud SMS interface to send SMS, write database, deploy to server, web finale.
这116名学生,用3天时间复刻了字节跳动内部真实技术项目
随机推荐
~86m rabbit practice
搭建flutter环境入坑集合
Gridhome, a static site generator that novices must know
字节跳动新程序员成长秘诀:那些闪闪发光的宝藏mentor们
redux使用说明
LeetCode 1561. The maximum number of coins you can get
Eureka single machine construction
LeetCode 1637. The widest vertical area between two points without any point
Spark independent cluster dynamic online and offline worker node
Solve the problem of intel12 generation core CPU [small core full, large core onlookers] (win11)
Hbuilder x format shortcut key settings
Native JS realizes the functions of all selection and inverse selection -- Feng Hao's blog
Fdog series (I): think about it. It's better to write a chat software. Then start with the imitation QQ registration page.
Chapter 5 yarn resource scheduler
Restful style interface design
One hundred questions of image processing (1-10)
Submit several problem records of spark application (sparklauncher with cluster deploy mode)
7-5 blessing arrived
LeetCode 1584. Minimum cost of connecting all points
SQL quick start