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 or IRC

Bug 450776

Summary: app-emulation/wine-1.5.21 - configure: checking for -lGL... ./conftest: error while loading shared libraries: failed to map segment from shared object: Operation not permitted
Product: Gentoo Linux Reporter: hcaulfield57
Component: HardenedAssignee: The Gentoo Linux Hardened Team <hardened>
Severity: normal CC: synamics, wine, x11
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: build.log

Description hcaulfield57 2013-01-08 01:02:32 UTC
See description

Reproducible: Always

Portage (hardened/linux/amd64, gcc-4.5.4, glibc-2.15-r3, 3.7.0-hardened x86_64)
System uname: Linux-3.7.0-hardened-x86_64-AMD_Phenom-tm-_II_X4_960T_Processor-with-gentoo-2.1
Timestamp of tree: Mon, 07 Jan 2013 13:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
CFLAGS="-O2 -march=native -pipe"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X alsa amd64 berkdb bzip2 cli cracklib crypt cxx dri gdbm gpm hardened iconv ipv6 justify mmx modules mudflap multilib ncurses nls nptl openmp pax_kernel pcre pppd readline session sse sse2 ssl tcpd unicode urandom zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Comment 1 hcaulfield57 2013-01-08 01:07:16 UTC
Created attachment 334754 [details]
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-01-08 03:34:50 UTC
> checking for -lGL... ./conftest: error while loading shared libraries: failed to map segment from shared object: Operation not permitted
not found

It appears that your hardened setup is blocking executables that link to your opengl library.

@hardened, @x11, what should be the fix, and is it something that needs to be done on the wine ebuild side?
Comment 3 Magnus Granberg gentoo-dev 2013-01-12 11:58:27 UTC
What video driver are you useing?
Comment 4 Greg Turner 2013-02-10 03:20:50 UTC
Not sure if this is the same issue but something somewhat similar-seeming just happened to me on 1.5.23-r1 (slightly later in the build process); I don't harden and the problem persisted in vmware, which rules out both as likely culprits.  However, I was able to build after turning off sandbox, so perhaps this is some kind of 64/32-wine vs sandbox problem?
Comment 5 Greg Turner 2013-02-10 03:35:30 UTC
Here is the output I can gather from my similar-ish-seeming build failure:  if I capture everything in a log via 

# ( emerge -1 wine --color=n 2>&1 ) 2>&1 > /tmp/winebuild.log

make[1]: Leaving directory `/var/tmp/portage/app-emulation/wine-1.5.23-r1/work/wine32/dlls/acledit'
config.status: creating dlls/aclui/Makefile
make[1]: Entering directory `/var/tmp/portage/app-emulation/wine-1.5.23-r1/work/wine32/dlls/aclui'
../../tools/makedep  -C/var/tmp/portage/app-emulation/wine-1.5.23-r1/work/wine-1.5.23/dlls/aclui -S/var/tmp/portage/app-emulation/wine-1.5.23-r1/work/wine-1.5.23 -T../..  aclui_main.c 
/proc/27410/cmdline: ../../tools/makedep -C/var/tmp/portage/app-emulation/wine-1.5.23-r1/work/wine-1.5.23/dlls/aclui -S/var/tmp/portage/app-emulation/wine-1.5.23-r1/work/wine-1.5.23 -T../.. aclui_main.c 

make[1]: *** [depend] Aborted (core dumped)
make[1]: Leaving directory `/var/tmp/portage/app-emulation/wine-1.5.23-r1/work/wine32/dlls/aclui'
make: *** [dlls/aclui/__depend__] Error 2
 * ERROR: app-emulation/wine-1.5.23-r1 failed (configure phase):
 *   emake failed

But, everything still doesn't get into the log.  Amazingly, something still escapes from my shell redirection and spills onto the console (that's the first time I've /ever/ seen anything leak from this "( foo 2>&1 ) 2>&1" bash construct, I use it all the time!):

 (null)*(null) ../../sandbox-2.6/libsandbox/libsandbox.c:check_syscall():879: failure (Value too large for defined data type):
 (null)*(null) ISE:
	abs_path: (null)
	res_path: /var/tmp/portage/app-emulation/wine-1.5.23-r1/work/wine32/include/config.h
Comment 6 Greg Turner 2013-02-11 21:23:57 UTC
Well I saw something similar happen in gcc47 now.  So, my issue is starting to look like a sandbox (hence, portage) issue affecting complex multilib ebuilds -- and perhaps not specifically a wine problem.

Notably, I also have a pretty different setup with portage 2.2 and ~amd64 everything...  So whether or not the reported issue stems from the same root cause  as mine is not at all clear (I'm really just making a stab in the dark).  Can you try disabling sandbox/usersandbox in your FEATURES, hcaulfield57?
Comment 7 synamics 2013-12-18 02:09:21 UTC
Well, anything at /var/log/messages? If grsecurity blocked anything it should be listed here.
Comment 8 Adam Feldman gentoo-dev 2015-04-18 20:57:44 UTC
Feel free to reopen when there is info to give.