http://bugs.winehq.org/show_bug.cgi?id=19856
Summary: cygwin's gcc package does not install /bin/cc because cygwin's bash can't run some programs under wine Product: Wine Version: 1.1.27 Platform: PC OS/Version: Linux Status: NEW Keywords: download, Installer Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
I've seen this before with other scripts, but now it's breaking cygwin's setup utility. Installing the gcc package is also supposed to install /bin/cc (which is needed by lots of build scripts, e.g. cmake's). But on Wine, cygwin's setup fails to do this. It seems that the postinstall script tries to run /usr/sbin/update-alternatives but fails.
$ wine 'c:\cygwin\bin\bash' postinst.sh fixme:ntdll:NtSetInformationToken unimplemented class 4 fixme:advapi:ImpersonateLoggedOnUser (0xa4) fixme:ntdll:NtQueryObject Unsupported information class 1 fixme:ntdll:NtQueryVolumeInformationFile 0xf4: volume info not supported fixme:ntdll:NtQueryVolumeInformationFile 0x118: volume info not supported fixme:advapi:ImpersonateLoggedOnUser (0xb8) fixme:ntdll:NtQueryVolumeInformationFile 0x24: volume info not supported postinst.sh: line 7: /usr/sbin/update-alternatives: Bad address fixme:advapi:ImpersonateLoggedOnUser (0xc4) 16 [main] bash 29! _cygtls::handle_exceptions: Error while dumping state (probably corrupted stack) fixme:ntdll:NtQueryVolumeInformationFile 0x104: volume info not supported /usr/sbin/update-alternatives: /usr/sbin/update-alternatives: cannot execute binary file
http://bugs.winehq.org/show_bug.cgi?id=19856
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source
http://bugs.winehq.org/show_bug.cgi?id=19856
--- Comment #1 from Dan Kegel dank@kegel.com 2009-08-27 15:51:56 --- This also seems to affect cygwin's c compiler; trying to compile "hello, world" fails with /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe: /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe: cannot execute binary file
http://bugs.winehq.org/show_bug.cgi?id=19856
--- Comment #2 from Dan Kegel dank@kegel.com 2009-08-27 15:54:54 --- er, that last comment should have said "This also affects running, not just installation. You can still try to compile in spite of cc not existing by using the command gcc-3 rather than cc."
http://bugs.winehq.org/show_bug.cgi?id=19856
--- Comment #3 from Dan Kegel dank@kegel.com 2009-08-27 20:11:47 --- Reproducible with a very small C program:
#include <stdio.h> #include <stdlib.h> int main(int argc, char **argv, char **env) { char *newargv[] = { "/usr/sbin/update-alternatives", NULL }; char *newenviron[] = { NULL }; execve("/usr/sbin/update-alternatives", newargv, env); perror("Returned? "); }
cygwin's strace on that test app provides a useful clue. On cygwin/Windows, that prints the usage message for update-alternatives. On cygwin/wine, it screws up, thinks update-alternatives is a shell script, and tries to run it via sh (without -c). The problem seems to be that on cygwin/windows, the path is canonicalized with a .exe on the end; that doesn't happen on wine for some reason.
I suspect path_conv::check() and path_conv::add_ext_from_sym() in http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/path.cc?cvsroot=src are involved but it's hard to read.
http://bugs.winehq.org/show_bug.cgi?id=19856
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.2.0
--- Comment #4 from Dan Kegel dank@kegel.com 2009-08-27 20:14:35 --- This is a key problem in using cygwin. Halfway analayzed, lots of developers write build scripts in cygwin -> nominating for 1.2.
http://bugs.winehq.org/show_bug.cgi?id=19856
--- Comment #5 from Dan Kegel dank@kegel.com 2009-08-27 22:40:54 --- Created an attachment (id=23298) --> (http://bugs.winehq.org/attachment.cgi?id=23298) key part of cygwin's strace output on tiny demo executable on Windows
http://bugs.winehq.org/show_bug.cgi?id=19856
--- Comment #6 from Dan Kegel dank@kegel.com 2009-08-27 22:43:33 --- Created an attachment (id=23299) --> (http://bugs.winehq.org/attachment.cgi?id=23299) key part of cygwin's strace output on tiny demo executable on Wine, with +relay,+file
These two logs might help show what's going wrong. They're the section right around where Cygwin picks the right canonical name for update-alternatives on Vista, and the wrong canonical name on Wine.
http://bugs.winehq.org/show_bug.cgi?id=19856
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE
--- Comment #7 from Dan Kegel dank@kegel.com 2009-08-27 23:17:36 --- Aw, foo. /usr/sbin/update-alternatives is a symlink to alternatives.exe. Dup.
*** This bug has been marked as a duplicate of bug 15679 ***
http://bugs.winehq.org/show_bug.cgi?id=19856
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Dmitry Timoshkov dmitry@codeweavers.com 2009-08-28 05:37:33 --- Closing duplicate.