Bug 257060

Summary: lang/gcc12-devel: conflicts with gcc11 on libgccjit++.h
Product: Ports & Packages Reporter: Ting-Wei Lan <lantw44>
Component: Individual Port(s)Assignee: Gerald Pfeifer <gerald>
Status: Open ---    
Severity: Affects Only Me CC: dim
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Ting-Wei Lan 2021-07-08 17:20:17 UTC
Installing gcc12-devel-12.0.0.s20210627...
pkg-static: gcc12-devel-12.0.0.s20210627 conflicts with gcc11-11.1.0 (installs files into the same place).  Problematic file: /usr/local/include/libgccjit++.h

I am not sure if it is an expected behevior. Previous versions of gcc ports don't conflict as long as they have different major version numbers.
Comment 1 Dimitry Andric freebsd_committer 2021-07-17 19:23:45 UTC
Yeah, just a "me too" here:

===>  Installing for gcc12-devel-12.0.0.s20210711
===>  Checking if gcc12-devel is already installed
===>   Registering installation for gcc12-devel-12.0.0.s20210711
Installing gcc12-devel-12.0.0.s20210711...
pkg-static: gcc12-devel-12.0.0.s20210711 conflicts with gcc11-11.1.0 (installs files into the same place).  Problematic file: /usr/local/include/libgccjit++.h
*** Error code 1

I regularly install most of the gcc ports, and gcc11 can't coexist with gcc12. :)
Comment 2 Dimitry Andric freebsd_committer 2021-07-17 19:58:08 UTC
Hm at first sight these two headers are new for gcc 11 and 12. But they seem to be a slightly different case than other gcc 'internal' headers, such as in:

/usr/local/lib/gcc11/gcc/x86_64-portbld-freebsd14.0/11.1.0/include/

Maybe these should be put in something like /usr/local/include/gcc11 instead, like the gcc11 specific libraries are now put in /usr/local/lib/gcc11 ?
Comment 3 Gerald Pfeifer freebsd_committer 2021-07-17 20:31:06 UTC
I filed this upstream at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101491
Let's see what comes out of that before we add a local hack.

(Should we add CONFLICTS among these ports for now? lang/gcc12-devel is very
early still, not meant for regular users, so maybe that's okay-ish?)