Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 613634 - dev-scheme/racket-6.7 USE="jit" fails to build on PaX enabled kernel because of MPROTECT
Summary: dev-scheme/racket-6.7 USE="jit" fails to build on PaX enabled kernel because ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-23 13:20 UTC by Igor Hramov
Modified: 2018-02-05 11:19 UTC (History)
0 users

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


Attachments
emerge --info '=dev-scheme/racket-6.7::gentoo' (emerge-info.txt,15.90 KB, text/plain)
2017-03-23 13:20 UTC, Igor Hramov
Details
/tmp/portage/dev-scheme/racket-6.7/temp/build.log (build.log,56.30 KB, text/plain)
2017-03-23 13:40 UTC, Igor Hramov
Details
/tmp/portage/dev-scheme/racket-6.7/temp/environment (environment,79.78 KB, text/plain)
2017-03-23 13:41 UTC, Igor Hramov
Details
patched src_compile() section (racket-6.7.ebuild.patch,270 bytes, patch)
2017-03-23 14:09 UTC, Igor Hramov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Hramov 2017-03-23 13:20:28 UTC
Created attachment 468038 [details]
emerge --info '=dev-scheme/racket-6.7::gentoo'

make sysinfercgc
make[1]: Entering directory '/tmp/portage/dev-scheme/racket-6.7/work/racket-6.7/src/racket'
./racketcgc -cqu ./mksystem.rkt system.rktd "x86_64-pc-linux-gnu-gcc -E -I. -I./include -I./src -pthread -I/usr/lib64/libffi-3.2.1/include   -DUSE_SENORA_GC   -DMZ_USES_SHARED_LIB  ./src/systype.c" "" "./racketcgc" "./racketcgc"
out of memory 
make[1]: *** [Makefile:171: sysinfercgc] Segmentation fault
make[1]: Leaving directory '/tmp/portage/dev-scheme/racket-6.7/work/racket-6.7/src/racket'
make: *** [Makefile:92: cgc] Error 2
 * ERROR: dev-scheme/racket-6.7::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-scheme/racket-6.7::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-scheme/racket-6.7::gentoo'`.
 * The complete build log is located at '/tmp/portage/dev-scheme/racket-6.7/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/dev-scheme/racket-6.7/temp/environment'.
 * Working directory: '/tmp/portage/dev-scheme/racket-6.7/work/racket-6.7/src/racket'
 * S: '/tmp/portage/dev-scheme/racket-6.7/work/racket-6.7/src'

dmesg says:
[79927.771663] grsec: denied RWX mmap of <anonymous mapping> by /tmp/gentoo/tmp/portage/dev-scheme/racket-6.7/work/racket-6.7/src/racket/.libs/racketcgc[mksystem.rkt:4076] uid/euid:250/250 gid/egid:250/250, parent /tmp/gentoo/usr/bin/gmake[make:4073] uid/euid:250/250 gid/egid:250/250
[79927.772200] mksystem.rkt[4076]: segfault at c8 ip 0000039e0c6347da sp 000003eb99921830 error 4 in libracket-6.7.so[39e0c514000+2c1000]
[79927.772242] grsec: Segmentation fault occurred at 00000000000000c8 in /tmp/gentoo/tmp/portage/dev-scheme/racket-6.7/work/racket-6.7/src/racket/.libs/racketcgc[mksystem.rkt:4076] uid/euid:250/250 gid/egid:250/250, parent /tmp/gentoo/usr/bin/gmake[make:4073] uid/euid:250/250 gid/egid:250/250
[79927.772366] grsec: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /tmp/gentoo/tmp/portage/dev-scheme/racket-6.7/work/racket-6.7/src/racket/.libs/racketcgc[mksystem.rkt:4076] uid/euid:250/250 gid/egid:250/250, parent /tmp/gentoo/usr/bin/gmake[make:4073] uid/euid:250/250 gid/egid:250/250
Comment 1 Igor Hramov 2017-03-23 13:40:02 UTC
Created attachment 468040 [details]
/tmp/portage/dev-scheme/racket-6.7/temp/build.log
Comment 2 Igor Hramov 2017-03-23 13:41:45 UTC
Created attachment 468042 [details]
/tmp/portage/dev-scheme/racket-6.7/temp/environment
Comment 3 Igor Hramov 2017-03-23 14:09:21 UTC
Created attachment 468044 [details, diff]
patched src_compile() section

It seems like the src_compile() section of an ebuild calls "pax-mark m .libs/racketcgc" and "pax-mark m .libs/racket3m" a little too late. I've changed src_compile a bit and now emerge runs fine. Don't know, though, if these changes are acceptable.
Comment 4 Amy Liffey gentoo-dev 2018-02-05 11:19:41 UTC
Should be fixed in 6.11.