Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 722078 - dev-lang/ghc-8.10.1: QA Notice: Files built without respecting CFLAGS have been detected
Summary: dev-lang/ghc-8.10.1: QA Notice: Files built without respecting CFLAGS have be...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
: 722812 722814 722816 722818 722820 722824 725050 725052 725054 725056 725058 725060 725062 725064 725066 725070 725072 725074 725076 725078 725080 725082 725084 725086 725088 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-05-10 09:07 UTC by Agostino Sarubbo
Modified: 2020-05-24 20:25 UTC (History)
1 user (show)

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


Attachments
build.log.bz2 (build.log.bz2,205.57 KB, application/x-bzip2)
2020-05-10 09:07 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 2020-05-10 09:07:36 UTC
This is an auto-filled bug because dev-lang/ghc does not respect CFLAGS.
The issue was originally discovered on amd64, but it may be reproducible on other arches as well.
If you think that a different summary clarifies the issue better, feel free to change it.
Attached build log and emerge --info.

NOTE:
To reproduce this issue you may want to set CFLAGS="${CFLAGS} -frecord-gcc-switches".
Comment 1 Agostino Sarubbo gentoo-dev 2020-05-10 09:07:48 UTC
Created attachment 637486 [details]
build.log.bz2

build log and emerge --info
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-10 09:40:12 UTC
"""
 * QA Notice: Files built without respecting CFLAGS have been detected
 *  Please include the following list of files in your report:
 * /usr/lib64/ghc-8.10.1/ghc-heap-8.10.1/libHSghc-heap-8.10.1-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/pretty-1.1.3.6/libHSpretty-1.1.3.6-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/template-haskell-2.16.0.0/libHStemplate-haskell-2.16.0.0-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/terminfo-0.4.1.4/libHSterminfo-0.4.1.4-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/deepseq-1.4.4.0/libHSdeepseq-1.4.4.0-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/hpc-0.6.1.0/libHShpc-0.6.1.0-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/stm-2.5.0.0/libHSstm-2.5.0.0-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/binary-0.8.8.0/libHSbinary-0.8.8.0-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/filepath-1.4.2.1/libHSfilepath-1.4.2.1-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/ghci-8.10.1/libHSghci-8.10.1-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/containers-0.6.2.1/libHScontainers-0.6.2.1-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/ghc-boot-th-8.10.1/libHSghc-boot-th-8.10.1-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/bin/runghc
 * /usr/lib64/ghc-8.10.1/bin/hpc
 * /usr/lib64/ghc-8.10.1/bin/hsc2hs
 * /usr/lib64/ghc-8.10.1/bin/ghc-pkg
 * /usr/lib64/ghc-8.10.1/bin/haddock
 * /usr/lib64/ghc-8.10.1/ghc-compact-0.1.0.0/libHSghc-compact-0.1.0.0-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/libiserv-8.10.1/libHSlibiserv-8.10.1-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/transformers-0.5.6.2/libHStransformers-0.5.6.2-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/xhtml-3000.2.2.1/libHSxhtml-3000.2.2.1-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/ghc-boot-8.10.1/libHSghc-boot-8.10.1-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/array-0.5.4.0/libHSarray-0.5.4.0-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/mtl-2.2.2/libHSmtl-2.2.2-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/directory-1.3.6.0/libHSdirectory-1.3.6.0-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/exceptions-0.10.4/libHSexceptions-0.10.4-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/parsec-3.1.14.0/libHSparsec-3.1.14.0-ghc8.10.1.so
 * /usr/lib64/ghc-8.10.1/Cabal-3.2.0.0/libHSCabal-3.2.0.0-ghc8.10.1.so
"""

These files are written in haskell, not in C. It uses it's own codegenerator without -frecord-gcc-switches equivalent.

I expect $CFLAGS to already be passed everywhere where it makes sense:

$ bzcat build.log.bz2 | fgrep gcc | wc -l
1907
$ bzcat build.log.bz2 | fgrep gcc | fgrep frecord-gcc | wc -l
1834
Comment 3 Agostino Sarubbo gentoo-dev 2020-05-10 10:23:14 UTC
Is there a way in the ebuild to ignore cflags warning for some files?
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-10 11:17:31 UTC
https://github.com/gentoo/portage/blob/master/bin/install-qa-check.d/10ignored-flags has some variables like QA_FLAGS_IGNORED.

The problem is not haskell-specific. Any non-gcc codegen would have this problem.  

I see that go already does it:
  eclass/go-module.eclass:QA_FLAGS_IGNORED='.*'
  eclass/golang-base.eclass:QA_FLAGS_IGNORED='.*'

dev-haskell/ contains 686 packages. I can do the same, but I think it's a sigh that this QA check does not do what it's intended to do.
Comment 5 Larry the Git Cow gentoo-dev 2020-05-24 17:47:12 UTC
The bug has been closed via the following commit(s):

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

commit fe563cbaa21fd257b28ae773987b81db87af00d4
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-05-24 17:44:50 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-05-24 17:46:31 +0000

    ghc-package.eclass: disable CFLAGS QA check, bug #722078
    
    GHC uses it's own native code generator. Portage's
    QA check generates false positive because it assumes
    presence of GCC-specific sections.
    
    Workaround false positiove by disabling the check completely.
    bug #722078, bug #677600
    
    Reported-by: Agostino Sarubbo
    Closes: https://bugs.gentoo.org/722078
    Bug: https://bugs.gentoo.org/677600
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/ghc-package.eclass | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 17:48:36 UTC
*** Bug 722824 has been marked as a duplicate of this bug. ***
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 17:48:44 UTC
*** Bug 722820 has been marked as a duplicate of this bug. ***
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 17:48:51 UTC
*** Bug 722818 has been marked as a duplicate of this bug. ***
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 17:48:58 UTC
*** Bug 722816 has been marked as a duplicate of this bug. ***
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 17:49:05 UTC
*** Bug 722814 has been marked as a duplicate of this bug. ***
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 17:49:12 UTC
*** Bug 722812 has been marked as a duplicate of this bug. ***
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:23:10 UTC
*** Bug 725088 has been marked as a duplicate of this bug. ***
Comment 13 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:24:13 UTC
*** Bug 725086 has been marked as a duplicate of this bug. ***
Comment 14 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:24:19 UTC
*** Bug 725084 has been marked as a duplicate of this bug. ***
Comment 15 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:24:24 UTC
*** Bug 725082 has been marked as a duplicate of this bug. ***
Comment 16 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:24:30 UTC
*** Bug 725080 has been marked as a duplicate of this bug. ***
Comment 17 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:24:37 UTC
*** Bug 725078 has been marked as a duplicate of this bug. ***
Comment 18 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:24:43 UTC
*** Bug 725076 has been marked as a duplicate of this bug. ***
Comment 19 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:24:50 UTC
*** Bug 725074 has been marked as a duplicate of this bug. ***
Comment 20 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:24:56 UTC
*** Bug 725072 has been marked as a duplicate of this bug. ***
Comment 21 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:25:02 UTC
*** Bug 725070 has been marked as a duplicate of this bug. ***
Comment 22 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:25:07 UTC
*** Bug 725066 has been marked as a duplicate of this bug. ***
Comment 23 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:25:13 UTC
*** Bug 725064 has been marked as a duplicate of this bug. ***
Comment 24 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:25:21 UTC
*** Bug 725062 has been marked as a duplicate of this bug. ***
Comment 25 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:25:26 UTC
*** Bug 725060 has been marked as a duplicate of this bug. ***
Comment 26 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:25:32 UTC
*** Bug 725058 has been marked as a duplicate of this bug. ***
Comment 27 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:25:38 UTC
*** Bug 725056 has been marked as a duplicate of this bug. ***
Comment 28 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:25:45 UTC
*** Bug 725054 has been marked as a duplicate of this bug. ***
Comment 29 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:25:50 UTC
*** Bug 725052 has been marked as a duplicate of this bug. ***
Comment 30 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-24 20:25:57 UTC
*** Bug 725050 has been marked as a duplicate of this bug. ***