From: Aaron G. <an...@be...> - 2007-05-27 22:33:55
|
When running GCC on MinGW32 on _Vista_ GCC is unable to find cc1plus.exe = and friends. To hack this I have put /MinGW/libexec/gcc/mingw32/3.4.5 on the PATH. Thats fine until you want to build another version of GCC when it falls = over several times. Is there a bug report and/or fix for this problem ? Many thanks in advance, Aaron |
From: Brian D. <br...@de...> - 2007-05-27 22:52:21
|
> Aaron Gray wrote: > When running GCC on MinGW32 on _Vista_ GCC is unable to find > cc1plus.exe and friends. > > To hack this I have put /MinGW/libexec/gcc/mingw32/3.4.5 on the PATH. > > Thats fine until you want to build another version of GCC when it > falls over several times. > > Is there a bug report and/or fix for this problem ? This is due to a change in access() in MSVCRT no longer supporting the undocumented X_OK. There is an updated mingw-runtime that contains a workaround. There are updated MinGW gcc binaries available. This has been discussed to death on this mailing list over the last 4 months or so, please read the fine archives. Upstream gcc has not been changed to stop using X_OK because it's a non-trivial change, as it is used often and its meaning is overloaded to also indicate that HOST_EXECUTABLE_SUFFIX needs to be appended. Thus if you're building gcc you have to use the __USE_MINGW_ACCESS workaround. Brian |
From: Sisyphus <sis...@op...> - 2007-05-28 05:22:42
|
----- Original Message ----- From: "Aaron Gray" <an...@be...> If you have trouble finding it, here's an excerpt from a previous post of Brian's: ---------------------------------- If it helps anyone else, I took the three patched drivers that Danny posted (gcc, g++, collect2) and copied them to their various aliases (e.g. c++, mingw-g++, etc) and put them in the appropriate directory structure, and made it a tarball: http://dessent.net/tmp/gcc-vista-3.4.5-20060117-1.tar.gz $ tar ztvf gcc-vista-3.4.5-20060117-1.tar.gz -rwxr-xr-x brian/None 86016 2007-05-18 18:41 bin/c++.exe -rwxr-xr-x brian/None 86016 2007-05-18 18:41 bin/g++.exe -rwxr-xr-x brian/None 83456 2007-05-18 18:40 bin/gcc.exe -rwxr-xr-x brian/None 86016 2007-05-18 18:41 bin/mingw32-c++.exe -rwxr-xr-x brian/None 86016 2007-05-18 18:41 bin/mingw32-g++.exe -rwxr-xr-x brian/None 83456 2007-05-18 18:40 bin/mingw32-gcc-3.4.5 -rwxr-xr-x brian/None 83456 2007-05-18 18:40 bin/mingw32-gcc.exe -rwx------ brian/None 85504 2007-05-18 18:41 libexec/gcc/mingw32/3.4.5/collect2.exe If you unpack this in your MinGW root folder (e.g. /mingw) just like all the other gcc-foo tarballs it should install the files in all the right places. I tested this on a Vista copy running VMware and it worked fine for compiling and linking C and C++. ---------------------------------- (That's for 3.4.5 only.) Cheers, Rob |
From: Aaron G. <an...@be...> - 2007-05-28 15:14:48
|
> http://dessent.net/tmp/gcc-vista-3.4.5-20060117-1.tar.gz ><http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30972> I also found this which is what I really needed to patch GCC 4.2.0 :- http://gcc.gnu.org/ml/gcc/2007-05/msg00228.html Thanks everyone :) Aaron |
From: Aaron G. <an...@be...> - 2007-05-30 16:43:56
|
>>> http://dessent.net/tmp/gcc-vista-3.4.5-20060117-1.tar.gz >>><http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30972> >> >> I also found this which is what I really needed to patch GCC 4.2.0 :- >> >> http://gcc.gnu.org/ml/gcc/2007-05/msg00228.html >> >> Thanks everyone :) > > I am trying to build GCC 4.2.0 on MinGW on Vista. I have patched GCC 4.2.0 > system.h with the access() hack and patched insn-modes.c's printf %n bug. > But am still getting what I presume is an access() X_OK bug. > > Do I need a new patched version on MinGW runtime and if so could you give > me > a link to it and any other new patched files please. Ah, I am getting exactly the same bug on XP, so its a GCC4.2.0/MinGW issue :( checking for C compiler default output file name... configure: error: C compiler cannot create executables Back over to working on Linux then :( Aaron |
From: Keith M. <kei...@to...> - 2007-05-31 08:42:55
|
Aaron Gray wrote: > checking for C compiler default output file name... configure: > error: C compiler cannot create executables This used to stop a virgin build of the mingw-runtime libraries; as part of the standard configure test for the compiler, it tries to link a minimal executable. For this to succeed, the linker must be able to locate crt0.o, one of the library components that we are trying to build, so of course, it doesn't exist yet. Thus, the link fails, configure decides that it can't find a working compiler, and stops dead. Of course, to build a runtime library, it isn't necessary to have a compiler which can create fully functioning executables; it is sufficient that it can emit object files. To work around this chicken and egg scenario, GCC configury includes a hack to defeat autoconf's default requirement that a compiler must be able to create executables; this hack is deployed for the purpose of building the runtime libraries. AFAIK, current versions of mingw-runtime and w32api should also incorporate this GCC hack, so you shouldn't be seeing this error when you build those specific components. That you are seeing it suggests that, at whatever point it occurs, your runtime libraries and associated object components have not (yet) been installed where the compiler expects to find them. Regards, Keith. |
From: Aaron G. <an...@be...> - 2007-05-30 15:58:33
|
>> http://dessent.net/tmp/gcc-vista-3.4.5-20060117-1.tar.gz >><http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30972> > > I also found this which is what I really needed to patch GCC 4.2.0 :- > > http://gcc.gnu.org/ml/gcc/2007-05/msg00228.html > > Thanks everyone :) I am trying to build GCC 4.2.0 on MinGW on Vista. I have patched GCC 4.2.0 system.h with the access() hack and patched insn-modes.c's printf %n bug. But am still getting what I presume is an access() X_OK bug. Do I need a new patched version on MinGW runtime and if so could you give me a link to it and any other new patched files please. Aaron |
From: Eric W. <ewe...@cs...> - 2007-05-28 14:13:09
|
> -----Original Message----- > From: min...@li... > [mailto:min...@li...] On Behalf > Of Brian Dessent > Sent: Sunday, May 27, 2007 4:54 PM > To: MinGW Users List > Subject: Re: [Mingw-users] Vista GCC cc1plus bug > > > Aaron Gray wrote: > > > When running GCC on MinGW32 on _Vista_ GCC is unable to find > > cc1plus.exe and friends. > > > > To hack this I have put /MinGW/libexec/gcc/mingw32/3.4.5 on > the PATH. > > > > Thats fine until you want to build another version of GCC when it > > falls over several times. > > > > Is there a bug report and/or fix for this problem ? > > This is due to a change in access() in MSVCRT no longer supporting the > undocumented X_OK. There is an updated mingw-runtime that contains a > workaround. There are updated MinGW gcc binaries available. This has > been discussed to death on this mailing list over the last 4 months or > so, please read the fine archives. Upstream gcc has not been > changed to > stop using X_OK because it's a non-trivial change, as it is used often > and its meaning is overloaded to also indicate that > HOST_EXECUTABLE_SUFFIX needs to be appended. Thus if you're building > gcc you have to use the __USE_MINGW_ACCESS workaround. And the GCC bug report is here: <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30972> Eric Weddington |