Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 886599 - sci-physics/vgm-5.0 fails to compile (CLANG-STRICTER-SYSTEM): MultiUnion.h:50:36: error: unknown type name G4int
Summary: sci-physics/vgm-5.0 fails to compile (CLANG-STRICTER-SYSTEM): MultiUnion.h:50...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Oliver Freyermuth
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-12-18 10:10 UTC by Agostino Sarubbo
Modified: 2022-12-24 07:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,120.45 KB, text/plain)
2022-12-18 10:10 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-12-18 10:10:44 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sci-physics/vgm-5.0 fails to compile (CLANG-STRICTER-SYSTEM).
Discovered on: amd64 (internal ref: clang-stricter_tinderbox)

NOTE:
(CLANG-STRICTER-SYSTEM) in the summary means that the bug was found on a machine that runs clang with stricter mode

This machine uses clang with CFLAGS/CXXFLAGS=-Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-function-pointer-types

See also:
https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
https://wiki.gentoo.org/wiki/Modern_C_porting
Comment 1 Agostino Sarubbo gentoo-dev 2022-12-18 10:10:46 UTC
Created attachment 843353 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-12-18 10:10:47 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


FAILED: packages/Geant4GM/CMakeFiles/Geant4GM.dir/source/solids/MultiUnion.cxx.o 
/var/tmp/portage/sci-physics/vgm-5.0/work/vgm-5-0/packages/Geant4GM/include/Geant4GM/solids/MultiUnion.h:50:36: error: unknown type name 'G4int'
Comment 3 Oliver Freyermuth 2022-12-18 15:28:17 UTC
The cause is that VGM seems to rely on G4Transform3D.hh (from sci-physics/geant) to implicitly include globals.hh, which in turn includes G4Types.hh, i.e. VGM did not follow the include-what-you-use semantics. 

Since sci-physics/geant-4.11.1 has dropped some unnecessary includes from headers, sci-physics/vgm broke (it's not a clang specific issue). 

I'll investigate later this week whether a simple downstream patch is possible, if not, I'll PR sci-physics/vgm to depend on <sci-physics/geant-4.11.1 for the time being (until an adapted version comes out). 

Thanks for reporting!
Comment 4 Oliver Freyermuth 2022-12-18 18:02:04 UTC
I already tested now: While a simple patch makes sci-physics/vgm-5.0 compile against sci-physics/geant-4.11.1.0 again, tests can't be compiled and run since the G4gl2ps library is gone from sci-physics/geant-4.11.1.0. 

So it seems more wise to block against >=sci-physics/geant-4.11.1 and wait for upstream to add compatibility (which usually happens quite fast). 
A PR is upcoming.
Comment 5 Andreas Sturmlechner gentoo-dev 2022-12-18 18:25:59 UTC
Is there an upstream issue to track? Version cap is always last resort.
Comment 6 Oliver Freyermuth 2022-12-18 18:40:16 UTC
I have created one just now:
https://github.com/vmc-project/vgm/issues/10
I'll link to this via a comment in the ebuild so we can keep track. 

However, I know this is already on the developer's radar: They are usually bumping all versions of the full VMC stack (sci-physics/vmc, sci-physics/vgm and sci-physics/geant4_vmc) a few weeks after the release of a new sci-physics/geant version, also including tests for the new features added in sci-physics/geant. 

They are unable to react earlier since sci-physics/geant does not have a publicly available repository which allows to track changes as they come in, they sadly only make the source code available once a new release is tagged.
Comment 7 Larry the Git Cow gentoo-dev 2022-12-24 07:42:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fec296a07eb82feb1e34ed1849f780d28ef78aab

commit fec296a07eb82feb1e34ed1849f780d28ef78aab
Author:     Oliver Freyermuth <o.freyermuth@googlemail.com>
AuthorDate: 2022-12-18 17:58:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-24 07:41:36 +0000

    sci-physics/vgm: require <sci-physics/geant-4.11.1
    
    There is include breakage with newer versions,
    and libraries are missing for VGM tests (G4gl2ps).
    
    Closes: https://bugs.gentoo.org/886599
    Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
    Closes: https://github.com/gentoo/gentoo/pull/28705
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-physics/vgm/vgm-5.0.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)