Tag Archives: linux

error: inlining failed in call to always_inline [How to Solve]

When compiling an open source project DB engine paradigms,

The project GitHub address reported an error as follows

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h:10325:1: error: inlining failed in call to always_inline '__m256i _mm256_mmask_i32gather_epi32(__m256i, __mmask8, __m256i, const int*, int)': target specific option mismatch
 _mm256_mmask_i32gather_epi32 (__m256i __v1_old, __mmask8 __mask,

As soon as I see it, I’ll put cmakelists under the root directory of this project.txt

Add -mavx512vl! it’s awesome!

# Compiler flags for the different targets
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native -std=c++14 -fPIC -Wall -Wextra -Wno-psabi -fno-omit-frame-pointer -Wno-unknown-pragmas -mavx512vl")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -Wextra -fno-omit-frame-pointer -march=native -fdiagnostics-color -mavx512vl")

cstdio [Error] ‘::fpos_t‘ has not been declared [How to Solve]

2	0	C:\Users\Administrator\Desktop\abcd\main.cpp	In file included from main.cpp
99	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fpos_t' has not been declared
101	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::clearerr' has not been declared
102	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fclose' has not been declared
103	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::feof' has not been declared
104	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::ferror' has not been declared
105	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fflush' has not been declared
106	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fgetc' has not been declared
107	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fgetpos' has not been declared
108	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fgets' has not been declared
109	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fopen' has not been declared
110	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fprintf' has not been declared
111	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fputc' has not been declared
112	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fputs' has not been declared
113	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fread' has not been declared
114	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::freopen' has not been declared
115	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fscanf' has not been declared
116	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fseek' has not been declared
117	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fsetpos' has not been declared
118	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::ftell' has not been declared
119	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::fwrite' has not been declared
120	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::getc' has not been declared
121	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::getchar' has not been declared
124	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::gets' has not been declared
126	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::perror' has not been declared
127	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::printf' has not been declared
128	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::putc' has not been declared
129	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::putchar' has not been declared
130	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::puts' has not been declared
131	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::remove' has not been declared
132	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::rename' has not been declared
133	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::rewind' has not been declared
134	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::scanf' has not been declared
135	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::setbuf' has not been declared
136	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::setvbuf' has not been declared
137	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::sprintf' has not been declared
138	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::sscanf' has not been declared
139	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::tmpfile' has not been declared
141	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::tmpnam' has not been declared
143	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::ungetc' has not been declared
144	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vfprintf' has not been declared
145	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vprintf' has not been declared
146	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vsprintf' has not been declared
175	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::snprintf' has not been declared
176	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vfscanf' has not been declared
177	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vscanf' has not been declared
178	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vsnprintf' has not been declared
179	11	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '::vsscanf' has not been declared
185	22	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '__gnu_cxx::snprintf' has not been declared
186	22	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '__gnu_cxx::vfscanf' has not been declared
187	22	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '__gnu_cxx::vscanf' has not been declared
188	22	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '__gnu_cxx::vsnprintf' has not been declared
189	22	C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\cstdio	[Error] '__gnu_cxx::vsscanf' has not been declared
C:\Users\Administrator\Desktop\abcd\main.cpp	In function 'int main()':
5	30	C:\Users\Administrator\Desktop\abcd\main.cpp	[Error] 'freopen' was not declared in this scope
29		C:\Users\Administrator\Desktop\abcd\Makefile.win	recipe for target 'main.o' failed

The above problem is that there is a problem with the dev environment. After closing dev, open it again and you will be prompted

Solution, reinstall dev

[Solved] CentOS Network Card startup error: RTNETLINK answers: File exist

Error Messages:

Dec 09 15:26:16 test01 network[7599]: Bringing up loopback interface:  [  OK  ]
Dec 09 15:26:16 test01 network[7599]: Bringing up interface ens33:  Error: Connection activation failed: No suitable device found for this connection.
Dec 09 15:26:16 test01 network[7599]: [FAILED]
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 network[7599]: RTNETLINK answers: File exists
Dec 09 15:26:16 test01 systemd[1]: network.service: control process exited, code=exited status=1
Dec 09 15:26:16 test01 systemd[1]: Failed to start LSB: Bring up/down networking.
Dec 09 15:26:16 test01 systemd[1]: Unit network.service entered failed state.
Dec 09 15:26:16 test01 systemd[1]: network.service failed.

 

Solution:
Stop NetworkManager service
systemctl stop NetworkManager
systemctl disable NetworkManager
restart network
systemctl restart network

Reason:
The reason for this failure under centos is that there is a conflict between the two services that start the network: network and NetworkManager, I think.
Fundamentally, the conflict is caused by NetworkMaganager (NM), so disable NetworkManager to solve it. Just restart it.

Error: Too many open files in system error [How to Solve]

Too many open files in system error handling scheme

Such system problems can be solved at the terminal as follows:
view file limits>

// Check the limit of files
launchctl limit maxfiles  // maxfiles  256   unlimited

Open administrator privileges with sudo

// use sudo to open the administator
sudo vim /etc/sysctl.conf

after entering the editing mode, paste and copy the following code, and then ESC exits the editing mode

// increase the limit
kern.maxfiles=65536
kern.maxfilesperproc=65536

input: WQ exit, and then restart the computer

[Solved] jedis Error: Could not get a resource from the pool

The local Java program operates the redis service in the virtual machine and reports an error.

Solution:
1. check whether Linux in the local and VMware virtual machines can ping each otherwhen the Ping fails, it is usually the problem of setting the network adapter of the virtual machine. Refer to the correct configuration: 1) right click virtual machine -> Settings -> network adapter -> bridge mode. 2) Set IP4 in VMnet1 in the local network connection to automatic acquisition. 3) Set the network card of the virtual machine to get automatically. 4) Turn off the firewall of the local and virtual machines,

2. check whether redis can start normally, if it does not start normally, check the cause of the error through the log,

3. check whether the Java program reads the redis related configuration correctly, when reading the configuration, the field spelling error may cause the connection to redis to fail.

For example, @Value ("${spring.redis.host}")
host is written as port

[Solved] Gbase Install Error: service cgconfig is not exist on hosts

Gbase8a install Error:

Environmental Checking on gcluster nodes.
Cgconfig service is not exist on host [‘192.168.48.18’, ‘192.168.48.19’, ‘192.168.48.20’], resource manangement can not be used, continue ([Y,y]/[N,n])?

Check whether the following installation packages are installed, if they are missing, please install

yum list installed | grep libcgroup
yum list installed | grep libcgroup-tools

Install if missing

yum -y install libcgroup
yum -y install libcgroup-tools

Set CGroup service startup after installation

systemctl enable cgconfig.service

Start cgconfig service

systemctl start cgconfig.service 

Here if the execution reports an error.

Job for cgconfig.service failed because the control process exited with error code. See “systemctl status cgconfig.service” and “journalctl -xe” for details.

Then use the command to check the cause of the error

systemctl status cgconfig.service

If the reasons are as follows.

Error: cannot mount cpu to /cgroup/cpu: Device or resource busy
or
Failed to start Control Group configuration service.

then execute

cgclear - unload the cgroup filesystem
systemctl start cgconfig.service

Then restart the installer.

[Solved] Error in invoking target ‘agent nmhs‘ of makefile

Error in invoking target ‘agent nmhs’ of makefile when installing Oracle 11g in Linux 7

Solution
add parameters linking libnnz11 Library in makefile
Modify $Oracle_HOME/sysman/lib/ins_ emagent. MK, modify
$(mk_event_nmectl) to $(mk_event_nmectl) – lnnz11
it is recommended to back up the original file before modification
[ oracle@ysserver ~]$ cd $ORACLE_ HOME/sysman/lib
[ oracle@ysserver lib]$ cp ins_emagent.mk ins_emagent.mk.bak
[ oracle@ysserver lib]$ vi ins_emagent. mk

After entering the VI editor, enter/nmectl in the command mode to quickly locate the line to be modified
append parameters -lnnz11 þ the first is the letter L þ the last two are the numbers 1

Save and exit retry

EasyConnect linux (ubuntu 20.04) Run Error [How to Solve]

(EasyConnect:67186): Pango-ERROR **: 10:01:20.576: Harfbuzz version too old (1.3.1)

Error reason: the version of the dependent package is higher than that required by easyconnect due to the local system update.

Solution: download the low version dependency package and rebuild an easyconnect operation dependency environment

libpango-1.0-0_1.42.4-7_amd64.deb
libpangocairo-1.0-0_1.42.4-7_amd64.deb
libpangoft2-1.0-0_1.42.4-7_amd64.deb

It is decompression rather than installation. If the installation will overwrite the original high-level dependent library, the system will have unknown errors, and the system will not start seriously.

Execute the dpkg unzip command to unzip the library and put it into the installation directory of easyconnect (/usr/share/sangfor/easyconnect),

sudo dpkg -X libpango-1.0-0_ 1.42. 4-7_ amd64. deb  /usr/share/sangfor/EasyConnect
sudo dpkg -X libpangoft2-1.0-0_ 1.42. 4-7_ amd64. deb  /usr/share/sangfor/EasyConnect
sudo dpkg -X libpangocairo-1.0-0_ 1.42. 4-7_ amd64. deb  /usr/share/sangfor/EasyConnect

Then mv the library files in the /usr/share/sangfor/EasyConnect/usr/lib/x86_64- linux- gnu directory with the link directly to the directory /usr/share/sangfor/EasyConnect/, and then start EasyConnect Normal start.

linux use sh execute source error [How to Solve]

Error: In the shell script, execute the file with sh and report source: not found

Reason: sh and bash are different shells, there is no source command in sh. So when running with sh or ./, this error will be prompted.

Solution: replace sh with bash, eg. bash test.sh
is to use bash to execute it.