public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/33281]  New: gfortran crt2.o not found under Vista
@ 2007-09-02 15:15 DHConsultancy at skynet dot be
  2007-09-03 10:40 ` [Bug fortran/33281] " fxcoudert at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: DHConsultancy at skynet dot be @ 2007-09-02 15:15 UTC (permalink / raw)
  To: gcc-bugs

I'm trying to run gfortran under Windows Vista. I ran into "ld: crt2.o: No such
file". I've found several reports on this, but no solution... Is there a
solution available already?


-- 
           Summary: gfortran crt2.o not found under Vista
           Product: gcc
           Version: 4.2.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: DHConsultancy at skynet dot be


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
@ 2007-09-03 10:40 ` fxcoudert at gcc dot gnu dot org
  2007-09-04  6:17 ` dannysmith at users dot sourceforge dot net
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-03 10:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from fxcoudert at gcc dot gnu dot org  2007-09-03 10:40 -------
(In reply to comment #0)
> I'm trying to run gfortran under Windows Vista.

Do you compile yourself or use pre-made binaries (and which binaries)? What
version of gfortran do you use? If you build the compiler yourself, do you use
cygwin or mingw?

> I ran into "ld: crt2.o: No such
> file". I've found several reports on this, but no solution...

What does the compiler say when you add the -v flag? ("gfortran -v myfile.f90")
What is the value of your PATH environment variable?


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug fortran/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
  2007-09-03 10:40 ` [Bug fortran/33281] " fxcoudert at gcc dot gnu dot org
@ 2007-09-04  6:17 ` dannysmith at users dot sourceforge dot net
  2007-09-05 11:51 ` [Bug target/33281] " DHConsultancy at skynet dot be
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2007-09-04  6:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dannysmith at users dot sourceforge dot net  2007-09-04 06:17 -------
The solution is to build gcc/gfortran wiith -D__USE_MINGW_ACCESS in CFLAGS;
>From mingw/include/io.h

/* Some defines for _access nAccessMode (MS doesn't define them, but
 * it doesn't seem to hurt to add them). */
#define F_OK    0       /* Check for file existence */
/* Well maybe it does hurt.  On newer versions of MSVCRT, an access mode
   of 1 causes invalid parameter error. */   
#define X_OK    1       /* MS access() doesn't check for execute permission. */
#define W_OK    2       /* Check for write permission */
#define R_OK    4       /* Check for read permission */


and later:
#ifdef __USE_MINGW_ACCESS
/*  Old versions of MSVCRT access() just ignored X_OK, while the version
    shipped with Vista, returns an error code.  This will restore the
    old behaviour  */
static inline int __mingw_access (const char* __fname, int __mode)
  { return  _access (__fname, __mode & ~X_OK); }
#define access(__f,__m)  __mingw_access (__f, __m)
#endif

Danny


-- 

dannysmith at users dot sourceforge dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-09-04 06:17:29
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
  2007-09-03 10:40 ` [Bug fortran/33281] " fxcoudert at gcc dot gnu dot org
  2007-09-04  6:17 ` dannysmith at users dot sourceforge dot net
@ 2007-09-05 11:51 ` DHConsultancy at skynet dot be
  2007-09-05 12:58 ` DHConsultancy at skynet dot be
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: DHConsultancy at skynet dot be @ 2007-09-05 11:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from DHConsultancy at skynet dot be  2007-09-05 11:51 -------
Subject: Re:  gfortran crt2.o not found under Vista



fxcoudert at gcc dot gnu dot org wrote:
> ------- Comment #1 from fxcoudert at gcc dot gnu dot org  2007-09-03 10:40 -------
> (In reply to comment #0)
>> I'm trying to run gfortran under Windows Vista.
> 
> Do you compile yourself or use pre-made binaries (and which binaries)?
I use the binaries for version 4.2.2, native Windows version, from
http://gcc.gnu.org/wiki/GFortranBinaries


> 
> What does the compiler say when you add the -v flag? ("gfortran -v myfile.f90")
> What is the value of your PATH environment variable?
the compilation works fine, the error occurs at the link phase:
" ld: crt2.o: No such file: No such file or directory"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
                   ` (2 preceding siblings ...)
  2007-09-05 11:51 ` [Bug target/33281] " DHConsultancy at skynet dot be
@ 2007-09-05 12:58 ` DHConsultancy at skynet dot be
  2007-09-05 13:25 ` fxcoudert at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: DHConsultancy at skynet dot be @ 2007-09-05 12:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from DHConsultancy at skynet dot be  2007-09-05 12:58 -------
Subject: Re:  gfortran crt2.o not found under Vista

I was hoping to avoid having to do the build. If all else fails, I'll 
try it.

Thnx for your help.

dannysmith at users dot sourceforge dot net wrote:
> ------- Comment #2 from dannysmith at users dot sourceforge dot net  2007-09-04 06:17 -------
> The solution is to build gcc/gfortran wiith -D__USE_MINGW_ACCESS in CFLAGS;
>>From mingw/include/io.h
> 
> /* Some defines for _access nAccessMode (MS doesn't define them, but
>  * it doesn't seem to hurt to add them). */
> #define F_OK    0       /* Check for file existence */
> /* Well maybe it does hurt.  On newer versions of MSVCRT, an access mode
>    of 1 causes invalid parameter error. */   
> #define X_OK    1       /* MS access() doesn't check for execute permission. */
> #define W_OK    2       /* Check for write permission */
> #define R_OK    4       /* Check for read permission */
> 
> 
> and later:
> #ifdef __USE_MINGW_ACCESS
> /*  Old versions of MSVCRT access() just ignored X_OK, while the version
>     shipped with Vista, returns an error code.  This will restore the
>     old behaviour  */
> static inline int __mingw_access (const char* __fname, int __mode)
>   { return  _access (__fname, __mode & ~X_OK); }
> #define access(__f,__m)  __mingw_access (__f, __m)
> #endif
> 
> Danny
> 
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
                   ` (3 preceding siblings ...)
  2007-09-05 12:58 ` DHConsultancy at skynet dot be
@ 2007-09-05 13:25 ` fxcoudert at gcc dot gnu dot org
  2007-09-05 15:58 ` fxcoudert at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-05 13:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2007-09-05 13:25 -------
(In reply to comment #2)
> The solution is to build gcc/gfortran wiith -D__USE_MINGW_ACCESS in CFLAGS

It might be worth putting into the tree. Danny, would you be OK with the
following?

Index: configure.ac
===================================================================
--- configure.ac        (revision 127859)
+++ configure.ac        (working copy)
@@ -974,8 +974,10 @@
     host_makefile_frag="config/mh-cygwin"
     ;;
   *-mingw32*)
+    host_makefile_frag="config/mh-mingw"
     ;;
   *-mingw64*)
+    host_makefile_frag="config/mh-mingw"
     ;;
   *-interix*)
     host_makefile_frag="config/mh-interix"
Index: config/mh-mingw
===================================================================
--- config/mh-mingw     (revision 0)
+++ config/mh-mingw     (revision 0)
@@ -0,0 +1,3 @@
+# Add -D__USE_MINGW_ACCESS to enable the built compiler to work on Windows
+# Vista (see PR33281 for details).
+BOOT_CFLAGS += -D__USE_MINGW_ACCESS


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
                   ` (4 preceding siblings ...)
  2007-09-05 13:25 ` fxcoudert at gcc dot gnu dot org
@ 2007-09-05 15:58 ` fxcoudert at gcc dot gnu dot org
  2007-09-06  7:45 ` DHConsultancy at skynet dot be
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-05 15:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-09-05 15:58 -------
Daniel,

Can you try the updated binaries at
http://quatramaran.ens.fr/~coudert/gfortran/gfortran-windows.exe ? They are
built with the patch in comment #5.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
                   ` (5 preceding siblings ...)
  2007-09-05 15:58 ` fxcoudert at gcc dot gnu dot org
@ 2007-09-06  7:45 ` DHConsultancy at skynet dot be
  2007-09-06  9:56 ` fxcoudert at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: DHConsultancy at skynet dot be @ 2007-09-06  7:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from DHConsultancy at skynet dot be  2007-09-06 07:45 -------
Subject: Re:  gfortran crt2.o not found under Vista

It works!

Thank you very much for this quick response!

Daniel

fxcoudert at gcc dot gnu dot org wrote:
> ------- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-09-05 15:58 -------
> Daniel,
> 
> Can you try the updated binaries at
> http://quatramaran.ens.fr/~coudert/gfortran/gfortran-windows.exe ? They are
> built with the patch in comment #5.
> 
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
                   ` (6 preceding siblings ...)
  2007-09-06  7:45 ` DHConsultancy at skynet dot be
@ 2007-09-06  9:56 ` fxcoudert at gcc dot gnu dot org
  2007-09-06 15:42 ` fxcoudert at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-06  9:56 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2007-
                   |                            |09/msg00447.html
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch
   Last reconfirmed|2007-09-04 06:17:29         |2007-09-06 09:56:19
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
                   ` (7 preceding siblings ...)
  2007-09-06  9:56 ` fxcoudert at gcc dot gnu dot org
@ 2007-09-06 15:42 ` fxcoudert at gcc dot gnu dot org
  2007-09-06 15:47 ` fxcoudert at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-06 15:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from fxcoudert at gcc dot gnu dot org  2007-09-06 15:42 -------
Subject: Bug 33281

Author: fxcoudert
Date: Thu Sep  6 15:42:02 2007
New Revision: 128188

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128188
Log:
        PR target/33281
        * configure.ac: Use config/mh-mingw on mingw.
        * configure: Regenerate.
        * config/mh-mingw: New host makefile fragment.

Added:
    trunk/config/mh-mingw
Modified:
    trunk/ChangeLog
    trunk/configure
    trunk/configure.ac


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
                   ` (8 preceding siblings ...)
  2007-09-06 15:42 ` fxcoudert at gcc dot gnu dot org
@ 2007-09-06 15:47 ` fxcoudert at gcc dot gnu dot org
  2007-09-06 17:39 ` fxcoudert at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-06 15:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from fxcoudert at gcc dot gnu dot org  2007-09-06 15:47 -------
Fix committed to mainline.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
                   ` (9 preceding siblings ...)
  2007-09-06 15:47 ` fxcoudert at gcc dot gnu dot org
@ 2007-09-06 17:39 ` fxcoudert at gcc dot gnu dot org
  2008-01-14 12:21 ` keithmarshall at users dot sourceforge dot net
  2008-02-23 10:45 ` fxcoudert at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-06 17:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from fxcoudert at gcc dot gnu dot org  2007-09-06 17:39 -------
*** Bug 30972 has been marked as a duplicate of this bug. ***


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ska-pig at gmx dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
                   ` (10 preceding siblings ...)
  2007-09-06 17:39 ` fxcoudert at gcc dot gnu dot org
@ 2008-01-14 12:21 ` keithmarshall at users dot sourceforge dot net
  2008-02-23 10:45 ` fxcoudert at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: keithmarshall at users dot sourceforge dot net @ 2008-01-14 12:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from keithmarshall at users dot sourceforge dot net  2008-01-14 12:15 -------
(In reply to comment #9)
> Fix committed to mainline.
> 

As a MinGW administrator, I am dismayed that you consider this
__USE_MINGW_ACCESS kludge as a solution to this bug; I would like this
particularly nasty kludge to go away, from the MinGW code base, as soon as is
practicably possible.

My own view on this is, that since X_OK has no meaning on any platform
supported by MinGW, our headers simply should not define it.  Danny Smith has
advised me that I cannot do that, since GCC needs it, if I don't define it, GCC
will give an arbitrary value of one, which will simply reintroduce the old
broken behaviour; IMO, that is wrong: if I don't define it, then it is because
it should not be used, and GCC should respect that.

Danny has further advised me that, if I were to adopt the next best compromise,
and define X_OK with a value of zero, that that too would break GCC, because it
uses X_OK in other contexts than the mode argument to access(), and in those
contexts the value of zero would not work.  If this is indeed the case, then I
would respectfully suggest that such usage is a violation of IEEE-1003.1, which
explicitly defines F_OK, R_OK, W_OK and X_OK for use as values for composing
the mode argument to access(), (and for no other purpose).

Regards,
Keith.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug target/33281] gfortran crt2.o not found under Vista
  2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
                   ` (11 preceding siblings ...)
  2008-01-14 12:21 ` keithmarshall at users dot sourceforge dot net
@ 2008-02-23 10:45 ` fxcoudert at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-02-23 10:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from fxcoudert at gcc dot gnu dot org  2008-02-23 10:44 -------
(In reply to comment #11)
> As a MinGW administrator, I am dismayed that you consider this
> __USE_MINGW_ACCESS kludge as a solution to this bug; I would like this
> particularly nasty kludge to go away, from the MinGW code base, as soon as is
> practicably possible.

You're welcome to contribute and provide a patch that implements your idea of
what would we the Right Thing To Do, as long as it doesn't break support of
existing MinGW versions. Post your patch to the gcc-patches mailing-list and it
will be reviewed.

Thanks for helping,
FX


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-02-23 10:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-02 15:15 [Bug fortran/33281] New: gfortran crt2.o not found under Vista DHConsultancy at skynet dot be
2007-09-03 10:40 ` [Bug fortran/33281] " fxcoudert at gcc dot gnu dot org
2007-09-04  6:17 ` dannysmith at users dot sourceforge dot net
2007-09-05 11:51 ` [Bug target/33281] " DHConsultancy at skynet dot be
2007-09-05 12:58 ` DHConsultancy at skynet dot be
2007-09-05 13:25 ` fxcoudert at gcc dot gnu dot org
2007-09-05 15:58 ` fxcoudert at gcc dot gnu dot org
2007-09-06  7:45 ` DHConsultancy at skynet dot be
2007-09-06  9:56 ` fxcoudert at gcc dot gnu dot org
2007-09-06 15:42 ` fxcoudert at gcc dot gnu dot org
2007-09-06 15:47 ` fxcoudert at gcc dot gnu dot org
2007-09-06 17:39 ` fxcoudert at gcc dot gnu dot org
2008-01-14 12:21 ` keithmarshall at users dot sourceforge dot net
2008-02-23 10:45 ` fxcoudert at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).