[pkg-wine-party] Bug#850329: Bug#850329: wine creates files with binary filenames

Vincent Lefevre vincent at vinc17.net
Sat Jan 7 01:40:34 UTC 2017


Control: reassign -1 autoconf 2.69-10
Control: retitle -1 autoconf generates code that can execute binary data as a shell script
Control: tags -1 -moreinfo -unreproducible
Control: severity -1 important

since this breaks Subversion in particular, requiring manual clean-up
of the directory (though the real culprit of the mess is dash).

On 2017-01-06 18:34:47 +0100, Jens Reyer wrote:
> are the tests that you run available somewhere, so that I can try to
> reproduce this?

I could reproduce it after removing the .wine directory, though it is
not necessarily related to wine at all (perhaps just a coincidence),
as I've now found the cause of the problem, and wine is not involved.
In a MPFR working copy (trunk), I just typed:

./configure --host=i586-mingw32msvc --disable-shared --with-gmp=/usr/local/gmp-mingw32 --enable-assert=full --enable-thread-safe

/usr/local/gmp-mingw32 is where a mingw32 version of GMP had been
installed last year, with:

$ ./configure --host=i586-mingw32msvc --disable-shared --prefix=/usr/local/gmp-mingw32 CC="i586-mingw32msvc-gcc -D__USE_MINGW_ANSI_STDIO"
$ make
$ make check LOG_COMPILER=wine
$ make install

Now, back to the problem, the following file was created by the
configure command in the MPFR directory:

-rw-r--r--  1 vlefevre vlefevre       0 2017-01-07 02:03:23 pX\016\005\v\005\340\a\001\v\001\002\033\030*\004\340\024\0200\@\020\002\004\001\004\260\005\004}\030\006\003\@\001

In the config.log file, I can see:

configure:4348: checking whether we are cross compiling
configure:4356: i586-mingw32msvc-gcc -D__USE_MINGW_ANSI_STDIO -o conftest.exe -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentium -march=pentium  -I/usr/local/gmp-mingw32/include  -L/usr/local/gmp-mingw32/lib conftest.c  >&5
configure:4360: $? = 0
configure:4367: ./conftest.exe
./conftest.exe: 1: ./conftest.exe: MZ
: not found
./conftest.exe: 2: ./conftest.exe: 
B/57X
@0B/70B
B/81
B/92
: not found
./conftest.exe: 1: ./conftest.exe: 
.text
: not found
./conftest.exe: 1: ./conftest.exe: Syntax error: word unexpected (expecting ")")
./conftest.exe: 1: ./conftest.exe: .data00
.rdata: not found
configure:4371: $? = 2
configure:4386: result: yes
./conftest.exe: 1: ./conftest.exe: 
.idata
: not found
./conftest.exe: 2: ./conftest.exe: 
[: not found

So, this is a bug in autoconf, which tries to execute a Windows
program, which is then interpreted by dash as a shell script:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816313

but autoconf must have workarounds for known bugs, in particular
when the user has no control over the test like above.

Since --host is provided the check "whether we are cross compiling"
is useless, as one explicitly declares a cross-compilation:

  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the pkg-wine-party mailing list