Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671810 - =sci-physics/root-6.14.06 fails if CXXFLAGS contains a flag not supported by clang
Summary: =sci-physics/root-6.14.06 fails if CXXFLAGS contains a flag not supported by ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Guilherme Amadio
URL:
Whiteboard:
Keywords:
: 690022 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-11-24 17:54 UTC by Oliver Freyermuth
Modified: 2019-07-20 16:50 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Freyermuth 2018-11-24 17:54:01 UTC
This appears to be a reincarnation of https://sft.its.cern.ch/jira/browse/ROOT-7639 . 
If adding a flag such as "-mabm" to CXXFLAGS, root fails in the allDict phase:

-------------------------------
./bin/rootcling -rootbuild -1 -f allDict.cxx -noDictSelection -c -D__CLING__ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DROOT_PCH -fsigned-char -I./include -I./etc -I./etc/dictpch -I./etc/cling -I/usr/include -I/usr/in
clude/freetype2 -I/usr/include/graphviz -I/usr/include/libAfterImage -I/usr/include/libxml2 -I/usr/include/python3.6m -I/usr/lib64/python3.6/site-packages/numpy/core/include -std=c++14 -fsigned-char -m64  -ggdb -pthread -DS
YSTEM_TYPE_unix -pipe -mabm -march=broadwell -Wno-implicit-fallthrough -I/var/tmp/portage/sci-physics/root-6.14.06/work/root-6.14.06_build/include etc/dictpch/allHeaders.h  etc/dictpch/allLinkDefs.h
error: unknown argument: '-mabm'
make[2]: *** [CMakeFiles/onepcm.dir/build.make:65: etc/allDict.cxx.pch] Error 1
make[2]: Leaving directory '/var/tmp/portage/sci-physics/root-6.14.06/work/root-6.14.06_build'
make[1]: *** [CMakeFiles/Makefile2:475: CMakeFiles/onepcm.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
-------------------------------

This was not observed in older versions, which are sadly all dropped from portage.
Comment 1 Guilherme Amadio gentoo-dev 2018-12-10 13:53:06 UTC
> This was not observed in older versions, which are sadly all dropped from portage.

In which version did it work for you? Also, I can be more flexible in keeping some older versions in tree if you think that's a good idea.
Comment 2 Oliver Freyermuth 2018-12-10 14:43:25 UTC
(In reply to Guilherme Amadio from comment #1)
> > This was not observed in older versions, which are sadly all dropped from portage.
> 
> In which version did it work for you? 

It worked fine for me with 6.14.02, 6.14.04-r2, 6.14.04-r3 at least (probably older ones too). 
Of course, I only tested with -mabm in my case. 

> Also, I can be more flexible in
> keeping some older versions in tree if you think that's a good idea.

I think keeping 1-2 versions would be good to allow for regression-testing by users, unless it is too much work to perform "breaking" changes to all versions you are keeping active. At least, keeping the version before the latest one would be much appreciated ;-).
Comment 3 Larry the Git Cow gentoo-dev 2018-12-12 07:12:21 UTC
The bug has been referenced in the following commit(s):

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

commit 86d74763869855375cf01782bc78d5f4dc3fef72
Author:     Guilherme Amadio <amadio@gentoo.org>
AuthorDate: 2018-12-11 12:28:30 +0000
Commit:     Guilherme Amadio <amadio@gentoo.org>
CommitDate: 2018-12-12 07:11:01 +0000

    sci-physics/root: keep a few more old versions
    
    Bug: https://bugs.gentoo.org/671810
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Guilherme Amadio <amadio@gentoo.org>

 sci-physics/root/Manifest               |   2 +
 sci-physics/root/root-6.12.06-r8.ebuild | 313 +++++++++++++++++++++++++++++++
 sci-physics/root/root-6.14.06-r2.ebuild | 323 ++++++++++++++++++++++++++++++++
 3 files changed, 638 insertions(+)
Comment 4 Guilherme Amadio gentoo-dev 2018-12-12 07:17:20 UTC
Alright, I added back the last 6.12 and one more patch release for 6.14.

I also did a git bisect and found the commit that caused this bug (see ROOT-7639 linked above). I will apply a fix soon.
Comment 5 Oliver Freyermuth 2018-12-12 08:04:08 UTC
Dear Guilherme,

many thanks! And all the best with the fix, it might be worthwhile to integrate a test with an unhandled flag (such as -mabm) in ROOTs test suite in the future, once the fix is also applied upstream ;-). 

Cheers and all the best,
Oliver
Comment 6 Guilherme Amadio gentoo-dev 2019-07-17 08:15:26 UTC
This is really an upstream bug. Unfortunately, the commit that started causing this fixed a real issue, so I couldn't just revert it for Gentoo. I updated the upstream ticket and raised the priority to try to get this resolved sooner.
Comment 7 Guilherme Amadio gentoo-dev 2019-07-17 08:19:10 UTC
*** Bug 690022 has been marked as a duplicate of this bug. ***
Comment 8 Oliver Freyermuth 2019-07-20 16:50:37 UTC
Not sure if this is a good idea (maybe mgorny can chime in, he's for sure the expert here):

Since you depend on llvm / clang anyways, you could do something like:

CHOSEN_CC=${CC}
CHOSEN_CXX=${CXX}

CC=${CHOST}-clang
CXX=${CHOST}-clang++
strip-unsupported-flags
CC=$[CHOSEN_CC}
CXX=$[CHOSEN_CXX}

strip-unsupported-flags is from flag-o-matic. Of course, that also strips flags for the non-rootcling calls, so it would be better to do something like that upstream. I'll add a comment suggesting that to the upstream ticket.