You are not logged in.

#1 2022-05-28 12:07:17

Kestutis
Member
Registered: 2019-04-21
Posts: 8

gcc-12 include errors in cmake, CUDA project

Hi,
Latest Cuda (11.6) is not well compatible with gcc-12, which is now default in Arch Linux.
I got errors when building cmake project, while trying to include GRPC and other libraries, which works in .cpp gcc, but not in .cu file.
I figured out, that this is related to gcc-12. I installed gcc-11 from official repo, but compiling with cmake still points to */usr/include/c++/12.1.0/* but not to */usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/*
I am using vscode, I changed my kit to gcc-11, but that doesn't effect on building .cu files with cmake, while it effects only building .cpp files.
Where could problem be? What workaround could be made?

Thanks in advance

Offline

#2 2022-05-31 10:52:00

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,140

Re: gcc-12 include errors in cmake, CUDA project

archlinux cuda maintainer appears to be working on building cuda 11.7 against gcc11 , https://archlinux.org/packages/communit … 6_64/cuda/ .

Maybe you could try that PKGBUILD ?

Sidenote :
building programs for use on archlinux through Integrated Development Environment methods tends to be much harder then using pacman/makepkg .

(the same goes for manual installations)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2022-06-21 12:01:12

Kestutis
Member
Registered: 2019-04-21
Posts: 8

Re: gcc-12 include errors in cmake, CUDA project

Thank you for info, cuda 11.7 solved problem

Offline

#4 2022-06-21 12:10:32

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 3,962

Re: gcc-12 include errors in cmake, CUDA project

Please remember to mark your thread [SOLVED] (edit the title of your first post).


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

Board footer

Powered by FluxBB