Got it

"expected specifier-qualifier-list before '_Static_assert'" Occurs During Compilation

Created: Mar 24, 2022 06:06:03Latest reply: Mar 25, 2022 04:17:01 470 7 2 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hello!


This post enquires about the issue that the error message "expected specifier-qualifier-list before '_Static_assert'" occurs during compilation. Please see more details below.


ISSUE DESCRIPTION


I have an issue with an Nvidia installation. What should I do if the error "expected specifier-qualifier-list before '_Static_assert'" occurs during compilation?


Thanks in advance for assisting me in this manner!

  • x
  • convention:

Featured Answers
olive.zhao
Admin Created Mar 24, 2022 06:10:28

Hello, friend!

You can install the repository.

1. Run the following commands to install gcc:

yum install centos-release-scl

yum install devtoolset-3-gcc

2. Run the following command to compile the kernel module:

scl enable devtoolset-3 bash

3. Run the NVDIA installation script again.

bash /opt/NVIDIA-Linux-x86_64-375.66.run

Hope this helps!


View more
  • x
  • convention:

Saqibaz
Saqibaz Created Mar 24, 2022 06:19:28 (0) (0)
 
hpl_Panda
hpl_Panda Created Mar 24, 2022 13:03:41 (0) (0)
 
All Answers
olive.zhao
olive.zhao Admin Created Mar 24, 2022 06:10:28

Hello, friend!

You can install the repository.

1. Run the following commands to install gcc:

yum install centos-release-scl

yum install devtoolset-3-gcc

2. Run the following command to compile the kernel module:

scl enable devtoolset-3 bash

3. Run the NVDIA installation script again.

bash /opt/NVIDIA-Linux-x86_64-375.66.run

Hope this helps!


View more
  • x
  • convention:

Saqibaz
Saqibaz Created Mar 24, 2022 06:19:28 (0) (0)
 
hpl_Panda
hpl_Panda Created Mar 24, 2022 13:03:41 (0) (0)
 
stephen.xu
stephen.xu Admin Created Mar 24, 2022 06:24:53

Hi,

1. Compile and install gcc.
In this step, the available compilation directory size must be at least 10 GB. The following operations use /opt as an example.
a. Run the following commands to install gcc:

yum install gcc gcc-c++ make # centos/redhat
apt-get install gcc g++ make # ubuntu
zypper install gcc gcc-c++ make # suse


b. Download gcc 4.9.0 for configuration and compilation.

COMPILE_DIR=/opt
mkdir -p $COMPILE_DIR/src
cd $COMPILE_DIR/src
wget http://ftp.gnu.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz
tar xzf gcc-4.9.0.tar.gz
cd gcc-4.9.0
./contrib/download_prerequisites
mkdir -p $COMPILE_DIR/build/gcc-4.9.0
cd $COMPILE_DIR/build/gcc-4.9.0
$COMPILE_DIR/src/gcc-4.9.0/configure --prefix $COMPILE_DIR/gcc-4.9.0 --enable-languages=c,c++ --disable-multilib
make -j4 #Use four CPUs for concurrent compilation. The number can be configured.
make install


c. Set up the cc connection.

cd $COMPILE_DIR/gcc-4.9.0/bin
ln -s gcc cc

2. Use gcc.

a. Run the following command to use gcc:

export PATH=$COMPILE_DIR/gcc-4.9.0/bin:$PATH

b. Run the NVDIA installation script again.

bash /opt/NVIDIA-Linux-x86_64-375.66.run


Have a nice day!

View more
  • x
  • convention:

user_4411447
user_4411447 Created Mar 24, 2022 13:04:17 (0) (0)
 
user_4411447
user_4411447 Created Mar 24, 2022 13:04:23

good
View more
  • x
  • convention:

user_4358465
user_4358465 Created Mar 25, 2022 04:17:01

Excellent suggestions olive and stephen! Thank you
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.