当前位置:网站首页>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 .
边栏推荐
- LeetCode 1640. Can I connect to form an array
- js垃圾回收机制和内存泄漏
- Full record of ByteDance technology newcomer training: a guide to the new growth of school recruitment
- 姚班智班齐上阵,竞赛高手聚一堂,这是什么神仙编程大赛?
- ByteDance 2022 school recruitment R & D advance approval publicity meeting, students' top 10 issues
- 字节跳动多篇论文入选 CVPR 2021,精选干货都在这里了
- ByteDance new programmer's growth secret: those glittering treasures mentors
- Codeforces Global Round 19
- CMake速成
- Go language uses the thrift protocol to realize the client and service end reports not enough arguments in call to oprot Writemessagebegin error resolution
猜你喜欢

Chapter 6 datanode

~87 animation

Fdog series (I): think about it. It's better to write a chat software. Then start with the imitation QQ registration page.

Fdog series (4): use the QT framework to imitate QQ to realize the login interface, interface chapter.

Simple records of business system migration from Oracle to opengauss database

ByteDance open source Gan model compression framework, saving up to 97.8% of computing power - iccv 2021

Record the error reason: terminate called after throwing an instance

Eureka single machine construction

LeetCode 1560. The sector with the most passes on the circular track

原型链继承
随机推荐
~81 long table
TCP的三次握手和四次挥手
~79 Movie card exercise
DS18B20数字温度计系统设计
搭建flutter环境入坑集合
The QT program compiled on CentOS lacks a MySQL driven solution
Tencent interview algorithm question
LeetCode 1557. The minimum number of points that can reach all points
redux使用说明
Codeforces Global Round 19
The most lost road I have ever walked through is the brain circuit of ByteDance programmers
Solve the single thread scheduling problem of intel12 generation core CPU (II)
Redis standalone startup
LeetCode 1638. Count the number of substrings with only one character difference
Saw local status change event StatusChangeEvent [timestamp=1644048792587, current=DOWN, previous=UP]
~86m rabbit practice
Solve the problem of intel12 generation core CPU [small core full, large core onlookers] (win11)
CMake速成
Codeforces Round #771 (Div. 2)
姚班智班齐上阵,竞赛高手聚一堂,这是什么神仙编程大赛?