Cuda 11.7 - error: attribute "__malloc__" does not take arguments

Just upgraded Ubuntu from 20.04 LTS to 22.04 LTS. Facing the same problem as here…

I have downloaded and installed hpc_sdk version 11.7.

(base) eric@cray:~$ gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(base) eric@cray:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_18:49:52_PDT_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0

Also ,I met this problem on Ubuntu22.04,and later I try to compile it on Ubuntu20.04 ,It works well,resignedly