Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 640124 - games-emulation/dolphin fails to run because of forced pie: filter-flags -pie
Summary: games-emulation/dolphin fails to run because of forced pie: filter-flags -pie
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-06 21:12 UTC by Eugene Cormier
Modified: 2018-07-22 21:06 UTC (History)
6 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 Eugene Cormier 2017-12-06 21:12:38 UTC
after switching to 17 profile and rebuilding dolphin it now segs with: writerest op out of range. This appears to be an issue with dolphin not being able to run with hardening. More info here (scroll down for the relevent gentoo info)
https://bugs.dolphin-emu.org/issues/7467


My temp fix:
created a file /etc/portage/env/nopie.conf:
CFLAGS="${CFLAGS} -no-pie"
CXXFLAGS="${CXXFLAGS} -no-pie"

then created the file /etc/portage/package.env/dolphin:
games-emulation/dolphin nopie.conf

works great after this
Comment 1 Sander Sweers 2017-12-16 15:35:37 UTC
Should be fixed with https://github.com/dolphin-emu/dolphin/commit/a389ae0711142d8c5c996fda3d1e6c5731d71de3

Will try it out and post a working patch against 5.0
Comment 2 Simone Scanzoni 2018-01-09 01:41:30 UTC
(In reply to Eugene Cormier from comment #0)
> after switching to 17 profile and rebuilding dolphin it now segs with:
> writerest op out of range. This appears to be an issue with dolphin not
> being able to run with hardening. More info here (scroll down for the
> relevent gentoo info)
> https://bugs.dolphin-emu.org/issues/7467
> 
> 
> My temp fix:
> created a file /etc/portage/env/nopie.conf:
> CFLAGS="${CFLAGS} -no-pie"
> CXXFLAGS="${CXXFLAGS} -no-pie"
> 
> then created the file /etc/portage/package.env/dolphin:
> games-emulation/dolphin nopie.conf
> 
> works great after this

This worked for me, together with the patch from bug 637986
Comment 3 Larry the Git Cow gentoo-dev 2018-07-22 21:06:39 UTC
The bug has been closed via the following commit(s):

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

commit 5c1629567172efd3e05e6b9629d18f8fb98c485e
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-07-22 20:59:04 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-07-22 21:06:31 +0000

    games-emulation/dolphin: fix crash on pie-by-default profiles
    
    Disable PIE-compatible code generation via CXXFLAGS+=-fno-pie.
    
    Before upstream fix:
    https://github.com/dolphin-emu/dolphin/commit/daa03cd1060cc826aca93a1dffc6e94bc6af6d5f
    dolphin assumed executable image to be in low addresses (<2GB)
    and hardcoded 32-bit absolute addresses during JIT phase.
    
    PIE-compatible code does not have this restriction and
    allows mapping binaries above 2GB area (and breaks dolphin's JIT).
    
    Strictly speaking -no-pie (link-time flag) does not or guarantee
    or require low address mapping for binary if it was already built
    as PIC/PIE.
    
    But -fno-pie imposes additional restrictions on generated code by GCC
    and makes -no-pie to take effect.
    
    We don't need this fix for live ebuild.
    
    Closes: https://bugs.gentoo.org/640124
    Package-Manager: Portage-2.3.43, Repoman-2.3.10

 games-emulation/dolphin/dolphin-5.0.ebuild         |  1 +
 .../dolphin/files/dolphin-5.0-no-pie.patch         | 26 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)