Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

gcc switch issue

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
leonchik1976
Guru
Guru
Posts: 344
Joined: Sun Jan 24, 2010 1:28 pm

gcc switch issue

  • Quote

Post by leonchik1976 » Thu Jun 29, 2023 3:41 pm

Hi, i have both gcc 12 and gcc 13 installed (gcc 13 is default).
when i tried to emerge sci-libs/cholmod-3.0.14 with USE=cuda, it fails with:

"/opt/cuda/bin/../targets/x86_64-linux/include/crt/host_config.h:132:2: error: #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk."

Using /etc/portage/package.env and set cholmod to use gcc-12 (according to this: https://forums.gentoo.org/viewtopic-t-1 ... ight-.html) - doesn't help, though the same works with other packages.

But after switching to gcc 12 with gcc-config - sci-libs/cholmod builds without any issue.

So what can be missing here for this to work?
# cat /etc/portage/env/gcc-12.conf
CC=/usr/bin/gcc-12
CXX=/usr/bin/g++-12
Top
Thistled
Guru
Guru
User avatar
Posts: 572
Joined: Thu Jan 06, 2011 6:57 pm
Location: Scotland
Contact:
Contact Thistled
Website

  • Quote

Post by Thistled » Sat Jul 01, 2023 10:28 pm

Hello there

I don't mean to sound patronising but
unsupported GNU version! gcc versions later than 12 are not supported!
is saying build cholmod with GCC 12.
But after switching to gcc 12 with gcc-config - sci-libs/cholmod builds without any issue.
Exactly. Because the output says it should be built with GCC 12 and not 13.

Build it with GCC 12, and then gcc-config back to 13.
I would do it this way and just avoid playing with package.env.
Would that not solve the problem?
Whatever you do, do it properly!
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Jul 02, 2023 3:21 pm

OP's stated problem is that package.env is expected to work here, and did not. Using gcc-config requires the user to intervene every time this package is built. A working solution based on package.env would allow the user to run emerge --emptytree @world or similar and get the right results. A workaround built on gcc-config does not, because it requires switching compilers between packages.

I cannot comment on why package.env did not work here, though I seem to recall recently reading a thread that suggested CC and CXX are not among the variables that package.env can change. OP: the cited forum thread has two steps for configuring package.env, but you only showed one. Did you do both? If yes, please show the relevant lines from the other file.
Top
leonchik1976
Guru
Guru
Posts: 344
Joined: Sun Jan 24, 2010 1:28 pm

  • Quote

Post by leonchik1976 » Sun Jul 02, 2023 3:25 pm

Hu wrote:OP's stated problem is that package.env is expected to work here, and did not. Using gcc-config requires the user to intervene every time this package is built. A working solution based on package.env would allow the user to run emerge --emptytree @world or similar and get the right results. A workaround built on gcc-config does not, because it requires switching compilers between packages.

I cannot comment on why package.env did not work here, though I seem to recall recently reading a thread that suggested CC and CXX are not among the variables that package.env can change. OP: the cited forum thread has two steps for configuring package.env, but you only showed one. Did you do both? If yes, please show the relevant lines from the other file.
i believe my problem is somehow related to nvcc flags, because the issue is only with CUDA-related use-flag packages
Top
Post Reply

4 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy