proot
proot copied to clipboard
wine configure script is failing under script
Hi,
With wine git master, ./configure is failing on debian testing with :
configure: creating ./config.status
../../src/configure: xrealloc: ../bash/subst.c:5188: cannot allocate
2097152 bytes (5230592 bytes allocated)
configure: error: write failure creating ./config.status
Problematic part of the configure file (see 1) :
cat Make.tmp - <<\_WINE_EOF >\$tmp/makefile && mv -f \$tmp/makefile \$1 && rm -f Make.tmp && return
`cat $wine_rules_file`
_WINE_EOF
$wine_rules_file is a relatively big file and it doesn't seems to like embedding it.
I have a trace with proot -v 9 if wanted ... I've filtered out the part associated with the failing process on 2.
Perhaps using MREMAP_MAYMOVE with mremap(2) could help ?
Nicolas.
Hello Nicolas,
configure: creating ./config.status ../../src/configure: xrealloc: ../bash/subst.c:5188: cannot allocate 2097152 bytes (5230592 bytes allocated) configure: error: write failure creating ./config.status [...] $wine_rules_file is a relatively big file and it doesn't seems to like embedding it.
This is exactly the Bash bug PRoot heap emulation [1] attempts to workaround. Sadly, in your case, the pre-allocated heap size is not big enough.
Rant: why the heck Bash developers assume the heap has an infinite size? Googling confirms this causes troubles even without an ELF loader.
I let this issue open until I find a reliable solution (maybe using a custom ELF loader). In the mean time, you can try to increase the pre-allocated heap size [2].
[1] https://github.com/cedric-vincent/PRoot/blob/proot-v3.2.2/src/syscall/heap.c [2] https://github.com/cedric-vincent/PRoot/blob/proot-v3.2.2/src/syscall/heap.c#L44
Perhaps using MREMAP_MAYMOVE with mremap(2) could help ?
It is not possible to move the [emulated] heap since the application might have variables that point inside it, and PRoot doesn't redirect memory accesses (it is way too costly).
Cédric.
Hello Nicolas,
For information, the latest release (v4.0.0) emulates a bigger heap. This should workaround this issue, however I keep it open since it is not an acceptable fix to me.
Regards, Cédric.
Was hit with this when compiling wine 1.7.51 on 64-bit proot 5.1.0 and using debian squeeze i386 as guest:
../configure: xmalloc: ../bash/make_cmd.c:100: cannot allocate 2282628 bytes (13500416 bytes allocated)
Maybe there's still some way to make the heap dynamic? We'll keep hitting the fixed buffer size again and again.