Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 784506 - [guru] app-arch/unalz-0.65-r1 calls cc directly
Summary: [guru] app-arch/unalz-0.65-r1 calls cc directly
Status: RESOLVED FIXED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Joe Kappus
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: qa-guru
  Show dependency tree
 
Reported: 2021-04-20 16:41 UTC by Agostino Sarubbo
Modified: 2024-04-17 15:11 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,7.20 KB, text/plain)
2021-04-20 16:41 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 2021-04-20 16:41:29 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-arch/unalz-0.65-r1 calls cc directly.
Discovered on: amd64 (internal ref: guru_ci)

NOTE:
As per QA policy, toolchain tools must not be called directly because they can cause issue in cross-compiling and because is not possible use a different CC implementation (like clang). To reproduce, please use sys-devel/gcc-config[-native-symlinks], sys-devel/binutils-config[-native-symlinks] and set the CC variable to x86_64-pc-linux-gnu-gcc.
Comment 1 Agostino Sarubbo gentoo-dev 2021-04-20 16:41:31 UTC
Created attachment 701250 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2021-04-20 16:41:33 UTC
Possible context of error(s):

make: gcc: No such file or directory
Comment 3 Michele Santullo 2021-04-21 16:25:16 UTC
I can try to port this to meson if it's of any help, but with the following caveats:
1. I can't make promises about when, it could be tonight, it could be next year
2. I can't make promises about maintaining it in case there are upstream changes (unlikely since it's been unchanged for years afaict)

I will attempt this if it's of any help, just let me know please
Comment 4 Agostino Sarubbo gentoo-dev 2021-04-22 17:05:16 UTC
Changing the Assignee as per https://archives.gentoo.org/gentoo-dev/message/74ee632e9fe2f4c12890524fec132205
Comment 5 Michele Santullo 2021-04-23 10:09:13 UTC
Does that mean I should attempt the port?
Comment 6 Agostino Sarubbo gentoo-dev 2021-04-25 14:04:43 UTC
Changing TRACKER as requested by QA.
Comment 7 Michele Santullo 2021-04-26 14:47:55 UTC
???
Comment 8 James Beddek 2021-04-27 04:21:54 UTC
(In reply to Michele Santullo from comment #7)
> ???

This is an automatically filed bug, and the previous two comments from Agostino have just been automated messages when mass changing the assignee/tracker for every GURU bug.

As the note in the original comment notes:

(In reply to Agostino Sarubbo from comment #0)
> As per QA policy, toolchain tools must not be called directly because they
> can cause issue in cross-compiling and because is not possible use a
> different CC implementation (like clang). To reproduce, please use
> sys-devel/gcc-config[-native-symlinks],
> sys-devel/binutils-config[-native-symlinks] and set the CC variable to
> x86_64-pc-linux-gnu-gcc.

The error in the build log shows the toolchain (gcc in this case) being called directly from the Makefile. Because this version of the tinerbox does not symlink `/usr/bin/gcc` to the actual compiler executable you get an error.

> make: gcc: No such file or directory

(In reply to Michele Santullo from comment #3)
> I will attempt this if it's of any help, just let me know please

Porting to Meson might help but it's a real overkill for the issue here.
Within the unalz-0.65-r1 Makefile the first two lines set the variables CPP & CC as g++ & gcc, respectively. These should not be set explicitly by the makefile and instead be set by the environment.

You can achieve that by either removing those lines (I think) so they aren't set to begin with, or replace the `=` with `?=` so they are not set if those variables are already set in the environment like they are when emerginig. You could probably also pass CC=$(tc-get CC) or something like that to the emake command in src_compile
Comment 9 Larry the Git Cow gentoo-dev 2024-04-17 15:11:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=681e65013fae37e64f5b37d85179f98ad44bb2fe

commit 681e65013fae37e64f5b37d85179f98ad44bb2fe
Author:     Joe Kappus <joe@wt.gd>
AuthorDate: 2024-04-17 10:17:17 +0000
Commit:     Joe Kappus <joe@wt.gd>
CommitDate: 2024-04-17 10:25:37 +0000

    app-arch/unalz: update EAPI 7 -> 8, fixups
    
    Major fixups, didn't revbump as nobody
    could build this for years.
    
    It needs a little more to work with clang,
    but with gcc it's fine.
    
    Closes: https://bugs.gentoo.org/784506
    Closes: https://bugs.gentoo.org/900995
    Signed-off-by: Joe Kappus <joe@wt.gd>

 app-arch/unalz/Manifest                            |  4 +--
 .../files/unalz-0.65-respect-compiler-flags.patch  | 36 ++++++++++++++++++++++
 app-arch/unalz/unalz-0.65-r1.ebuild                | 30 ++++++++++--------
 3 files changed, 56 insertions(+), 14 deletions(-)