Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610752 - app-emulation/wine: wine_compiler_check() violates FILESDIR access rules in PMS
Summary: app-emulation/wine: wine_compiler_check() violates FILESDIR access rules in PMS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Wine Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: filesdir-bad-scope
  Show dependency tree
 
Reported: 2017-02-24 00:15 UTC by Tim Harder
Modified: 2017-03-12 21:39 UTC (History)
1 user (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 Tim Harder gentoo-dev 2017-02-24 00:15:24 UTC
See the tracker.

The FILESDIR directory currently can't be used in pkg_pretend() according to PMS.
Comment 1 Adam Feldman gentoo-dev 2017-02-24 02:36:17 UTC
Any recommendations on how to perform a check for compiler bugs that wouldn't violate the PMS?
Comment 2 SpanKY gentoo-dev 2017-02-24 05:33:27 UTC
i don't think we need to be so specific in the checks.  just reject gcc versions older than 4.9, and 5.[0123].  we don't support <=4.8 anymore, and will never stabilize 5.[0123].

so instead of compiling files, just check the `gcc-version`.
Comment 3 Adam Feldman gentoo-dev 2017-02-24 05:55:22 UTC
(In reply to SpanKY from comment #2)
> i don't think we need to be so specific in the checks.  just reject gcc
> versions older than 4.9, and 5.[0123].  we don't support <=4.8 anymore, and
> will never stabilize 5.[0123].
> 
> so instead of compiling files, just check the `gcc-version`.

I'm not sure I follow.  The issue is with compilers that don't have backported patches.  These patches were added to GCC without revision bumps, so the only way to detect whether GCC is patched is to either test compile, or have it die during compilation when the triggering event occurs.


Example: The original release of gcc-5.1 suffered from a bug with ms_abi.  Eventually, that was backported, but without a revbump, so we can only determine whether the user has a patched GCC during compilation of a piece of code that would trigger the compiler bug.

We have two instances of this the ms_abi issue (GCC #PR66838) and the stack reallignment issue (GCC #PR69140).

I agree that we can probably do a strict version check for the 3rd check, for builtin_ms_va_list, but I'm not sure how we'd handle the other two.
Comment 4 Ulrich Müller gentoo-dev 2017-02-24 06:09:59 UTC
Do an approximate version check in pkg_pretend, and more specific tests in one of the src_* phases (like src_configure). If the upstream build system was doing such tests, it would be in the configure phase too.

Also, pkg_pretend should be reserved for quick sanity checks, but (IMHO) not do expensive tasks like compiling files.
Comment 5 Arfrever Frehtes Taifersar Arahesis 2017-02-24 06:12:42 UTC
(In reply to NP-Hardass from comment #3)
> I agree that we can probably do a strict version check for the 3rd check,
> for builtin_ms_va_list, but I'm not sure how we'd handle the other two.

if [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
  die "GCC 5.0 - 5.3 not supported"
fi
Comment 6 Adam Feldman gentoo-dev 2017-02-24 18:42:57 UTC
(In reply to Ulrich Müller from comment #4)
> Do an approximate version check in pkg_pretend, and more specific tests in
> one of the src_* phases (like src_configure). If the upstream build system
> was doing such tests, it would be in the configure phase too.
> 
> Also, pkg_pretend should be reserved for quick sanity checks, but (IMHO) not
> do expensive tasks like compiling files.

Alright, we'll do the processing in src_configure.  Thanks.
Comment 7 SpanKY gentoo-dev 2017-02-24 19:16:52 UTC
(In reply to NP-Hardass from comment #3)

which is why i said you should just reject 5.[0123] entirely.  the toolchain team doesn't accept any new reports for those versions, so wine shouldn't either.  we only support 5.4+ now.
Comment 8 Adam Feldman gentoo-dev 2017-02-25 03:14:58 UTC
(In reply to SpanKY from comment #7)
> (In reply to NP-Hardass from comment #3)
> 
> which is why i said you should just reject 5.[0123] entirely.  the toolchain
> team doesn't accept any new reports for those versions, so wine shouldn't
> either.  we only support 5.4+ now.

Ah, I misunderstood that.  Got it now. Thanks for explaining.
Comment 9 Adam Feldman gentoo-dev 2017-03-12 21:39:06 UTC
Fixed in 5829502de752852949c11138e6a472a7a043ee58.

Checks compiler versions where previously we checked compilation, and compilation checks moved to src_configure