collect2: CreateProcess: No such file or directory

949 views
Skip to first unread message

jon

unread,
May 30, 2008, 11:12:01 PM5/30/08
to GNU Fortran
I have a small Fortran 77 program (mrpp.f) that I can compile with
Lahey. I installed the Mingw build of gfortran that I got today from
http://gcc.gnu.org/wiki/GFortranBinaries. Something is wrong with the
installation on my Windows Vista computer, and the diagnostic isn't
helping me resolve the problem. I've used a previous mingw build
before with no problem, so I'm asking for any clues on how to proceed
(the Mac version is working OK).

G:\rblos\mrpp>gfortran mrpp.f -o a.exe
collect2: CreateProcess: No such file or directory

G:\rblos\mrpp>gfortran -v
Using built-in specs.
Target: i586-pc-mingw32
Configured with: ../trunk/configure --prefix=/mingw --enable-
languages=c,fortran --with-gmp=/home/FX/local --with-ld=/mingw/bin/ld
-
-with-as=/mingw/bin/as --disable-werror --enable-bootstrap --enable-
threads --disable-nls --build=i586-pc-mingw32 --enable-libgomp -
-disable-shared
Thread model: win32
gcc version 4.4.0 20080514 (experimental) [trunk revision 135286]
(GCC)

G:\rblos\mrpp>lf95 mrpp.f
Lahey/Fujitsu Fortran 95 Compiler Release 7.10.02 S/N:
001446007891750
Copyright (C) 1994-2004 Lahey Computer Systems. All rights reserved.
Copyright (C) 1998-2004 FUJITSU LIMITED. All rights reserved.
Compiling file mrpp.f.
Compiling program unit mrpp at line 1:
Compiling program unit dist at line 231:
Compiling program unit invert at line 467:
Compiling program unit pvalue at line 545:
Compiling program unit e at line 654:
Encountered 0 errors, 0 warnings in file mrpp.f.
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

jon

unread,
May 30, 2008, 11:29:21 PM5/30/08
to GNU Fortran
P.S.

I set the LIBRARY_PATH environment variable:

LIBRARY_PATH=C:\Program Files\gfortran\lib

should I drill down further into this directory, say for example, to:

C:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0 ??

(I'm running 32 bit version, but eh i386... path has only directory
(version) 4.3.0 in it.

There are too many random choices for me to make without some help.
Thanks in advance.

FX

unread,
May 31, 2008, 3:38:00 AM5/31/08
to gnu-f...@googlegroups.com
> C:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0 ??

That's a Vista issue: you should add that directory (which normally
contains f951.exe) to your PATH (not to you LIBRARY_PATH, but to your
PATH).

> (I'm running 32 bit version, but eh i386... path has only directory
> (version) 4.3.0 in it.

That's because I made the build system (for the binaries you
downloaded) go from i386 to i586 some time between 4.3 and 4.4 (to
enable OpenMP, some i586 features are needed).

FX

--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/

jon

unread,
Jun 1, 2008, 6:46:44 PM6/1/08
to GNU Fortran


On May 31, 1:38 am, FX <fxcoud...@gmail.com> wrote:
> > C:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0  ??
>
> That's a Vista issue: you should add that directory (which normally  
> contains f951.exe) to your PATH (not to you LIBRARY_PATH, but to your  
> PATH).

Thanks, FX, I'll try that. I'm on the Mac right now. Since everything
works well on the Mac, I should probably analyze the differences in
the future and make adjustments.

BTW, if I do a simple

gfortran -c mrpp.f

the object code file mrpp.o is created properly without error or
warning. It is only when attempting a full compile and link that the
error occurs. This is what led me to suspect that it might be a
library connection issue. I need to get some experience with the gcc
compilers to interpret some of the non-fortran oriented messages.



> > (I'm running 32 bit version, but eh i386... path has only directory
> > (version) 4.3.0 in it.
>
> That's because I made the build system (for the binaries you  
> downloaded) go from i386 to i586 some time between 4.3 and 4.4 (to  
> enable OpenMP, some i586 features are needed).
>

OK, that makes sense. I need to keep up with the reading of the
gfortran list to keep abreast. Things are evolving much faster than my
brain is adapting <grin>. Thanks.


> FX
>
> --
> François-Xavier Couderthttp://www.homepages.ucl.ac.uk/~uccafco/

jon

unread,
Jun 1, 2008, 8:10:21 PM6/1/08
to GNU Fortran
FX,

I re-installed, checked environment variables, and still have same
error message.

Follwing is a session (with some parts un-rolled for better viewing).
As you can see, all paths referenced are valid, and the (permanent)
files referenced all exist.

Do you have any further suggestions?

C:\rblos\mrpp>gfortran mrpp.f -v -o a.exe
Driving: gfortran mrpp.f -v -o a.exe -lgfortranbegin -lgfortran
Using built-in specs.
Target: i586-pc-mingw32
Configured with:
../trunk/configure
--prefix=/mingw
--enable-languages=c,fortran
--with-gmp=/home/FX/local
--with-ld=/mingw/bin/ld
--with-as=/mingw/bin/as
--disable-werror
--enable-bootstrap
--enable-threads
--disable-nls
--build=i586-pc-mingw32
--enable-libgomp
--disable-shared
Thread model: win32
gcc version 4.4.0 20080514 (experimental) [trunk revision 135286]
(GCC)
COLLECT_GCC_OPTIONS='-v' '-o' 'a.exe' '-mtune=pentium'
c:/program files/gfortran/bin/../libexec/gcc/i586-pc-mingw32/4.4.0/
f951.exe mrpp.f
-ffixed-form
-quiet
-dumpbase mrpp.f
-mtune=pentium
-auxbase mrpp
-version
-fintrinsic-modules-path c:/program files/gfortran/bin/../lib/
gcc/i586-pc-mingw32/4.4.0/finclude
-o C:\Users\myname\AppData\Local\Temp/ccbHfrg3.s
GNU Fortran (GCC) version 4.4.0 20080514 (experimental) [trunk
revision 135286] (i586-pc-mingw32)
compiled by GNU C version 4.4.0 20080514 (experimental) [trunk
revision 135286], GMP version 4.2.1, MPFR version 2.3.1.
GGC heuristics:
--param ggc-min-expand=30
--param ggc-min-heapsize=4096
COLLECT_GCC_OPTIONS='-v' '-o' 'a.exe' '-mtune=pentium'
as -v -o C:\Users\myname\AppData\Local\Temp/ccxWsi98.o
C:\Users\myname\AppData\Local\Temp/ccbHfrg3.s
GNU assembler version 2.17.50 (mingw32) using BFD version 2.17.50
20060824
COMPILER_PATH=
c:/program files/gfortran/bin/../libexec/gcc/i586-pc-
mingw32/4.4.0/;
c:/program files/gfortran/bin/../libexec/gcc/
LIBRARY_PATH=
c:/program files/gfortran/bin/../lib/gcc/i586-pc-
mingw32/4.4.0/;
c:/program files/gfortran/bin/../lib/gcc/;
c:/program files/gfortran/bin/../lib/gcc/i586-pc-
mingw32/4.4.0/../../../
COLLECT_GCC_OPTIONS='-v' '-o' 'a.exe' '-mtune=pentium'
c:/program files/gfortran/bin/../libexec/gcc/i586-pc-
mingw32/4.4.0/collect2.exe
-Bdynamic -o a.exe
c:/program files/gfortran/bin/../lib/gcc/i586-pc-
mingw32/4.4.0/../../../crt2.o
c:/program files/gfortran/bin/../lib/gcc/i586-pc-mingw32/4.4.0/
crtbegin.o
-Lc:/program files/gfortran/bin/../lib/gcc/i586-pc-
mingw32/4.4.0
-Lc:/program files/gfortran/bin/../lib/gcc
-Lc:/program files/gfortran/bin/../lib/gcc/i586-pc-
mingw32/4.4.0/../../..
C:\Users\myname\AppData\Local\Temp/ccxWsi98.o
-lgfortranbegin -lgfortran -lmingw32 -lgcc -l
moldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -
lmingw32 -lgcc -lmoldname -lmingwex
-lmsvcrt c:/program files/gfortran/bin/../lib/gcc/i586-pc-
mingw32/4.4.0/crtend.o
collect2: CreateProcess: No such file or directory
~~~~~~~~~~~~~~~~~~~~~~
(some irrelevant stuff deleted from:)
C:\rblos\mrpp>set
APPDATA=C:\Users\myname\AppData\Roaming
HOMEDRIVE=C:
HOMEPATH=\Users\myname
INCLUDE=
C:\Program Files\Microsoft.NET\FrameworkSDK\include\;
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\;
C:\Program Files\Lahey-Fujitsu Fortran\v7.1\Win32\Include
lib=
C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\;
C:\Program Files\Microsoft.NET\FrameworkSDK\Lib\;
C:\Program Files\Lahey-Fujitsu Fortran\v7.1\Win32\Lib
Path=
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Program Files\QuickTime\QTSystem\;
C:\Program Files\util;
C:\Program Files\Lahey-Fujitsu Fortran\v7.1\Win32\Bin;
C:\Program Files\gfortran\bin;
C:\Program Files\gfortran\libexec\gcc\i586-pc-mingw32\4.4.0
~~~~~~~~~~~~~~~~
(I verified existance of all paths and files referenced in gfortran -
v:)
(...except those referenced in "Configured with" as \mingw\... )
(...I don't have a \mingw installation, as the mingw distro is too
old)

C:\rblos\mrpp>cd "c:/program files/gfortran/bin/../libexec/gcc/i586-pc-
mingw32/4.4.0/"
c:\Program Files\gfortran\libexec\gcc\i586-pc-mingw32\4.4.0>cd "c:/
program files/gfortran/bin/../libexec/gcc"
c:\Program Files\gfortran\libexec\gcc>cd "c:/program files/gfortran/
bin/../lib/gcc/i586-pc-mingw32/4.4.0/"
c:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0>cd "c:/program
files/gfortran/bin/../lib/gcc/"
c:\Program Files\gfortran\lib\gcc>cd "c:/program files/gfortran/bin/../
lib/gcc/i586-pc-mingw32/4.4.0/../../../"
c:\Program Files\gfortran\lib>cd "c:/program files/gfortran/bin/../
libexec/gcc/i586-pc-mingw32/4.4.0/"
c:\Program Files\gfortran\libexec\gcc\i586-pc-mingw32\4.4.0>dir
collect2.exe
Volume in drive C has no label.
Volume Serial Number is E8AD-DCE7
Directory of c:\Program Files\gfortran\libexec\gcc\i586-pc-
mingw32\4.4.0
05/14/2008 09:02 AM 96,256 collect2.exe
1 File(s) 96,256 bytes
0 Dir(s) 31,516,749,824 bytes free
c:\Program Files\gfortran\libexec\gcc\i586-pc-mingw32\4.4.0>cd "c:/
program files/gfortran/bin/../lib/gcc/i586-pc-mingw32/4.4.0/../../../"

c:\Program Files\gfortran\lib>dir crt2.o
Volume in drive C has no label.
Volume Serial Number is E8AD-DCE7
Directory of c:\Program Files\gfortran\lib
05/14/2008 09:03 AM 2,288 crt2.o
1 File(s) 2,288 bytes
0 Dir(s) 31,516,389,376 bytes free
c:\Program Files\gfortran\lib>cd "c:/program files/gfortran/bin/../lib/
gcc/i586-pc-mingw32/4.4.0/"
c:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0>dir crtbegin.o
Volume in drive C has no label.
Volume Serial Number is E8AD-DCE7
Directory of c:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0
05/14/2008 08:59 AM 966 crtbegin.o
1 File(s) 966 bytes
0 Dir(s) 31,514,251,264 bytes free
c:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0>cd "c:/program
files/gfortran/bin/../lib/gcc/i586-pc-mingw32/4.4.0"

c:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0>cd "c:/program
files/gfortran/bin/../lib/gcc"
c:\Program Files\gfortran\lib\gcc>cd "c:/program files/gfortran/bin/../
lib/gcc/i586-pc-mingw32/4.4.0/../../.."
c:\Program Files\gfortran\lib>cd "c:/program files/gfortran/bin/../lib/
gcc"
c:\Program Files\gfortran\lib\gcc>cd "C:\Users\myname\AppData\Local
\Temp/"
C:\Users\myname\AppData\Local\Temp>cd "c:/program files/gfortran/
bin/../lib/gcc/i586-pc-mingw32/4.4.0/"
c:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0>dir crtend.o
Volume in drive C has no label.
Volume Serial Number is E8AD-DCE7
Directory of c:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0
05/14/2008 08:59 AM 863 crtend.o
1 File(s) 863 bytes
0 Dir(s) 31,516,557,312 bytes free
c:\Program Files\gfortran\libexec\gcc\i586-pc-mingw32\4.4.0>dir
f951.exe
Volume in drive C has no label.
Volume Serial Number is E8AD-DCE7
Directory of c:\Program Files\gfortran\libexec\gcc\i586-pc-
mingw32\4.4.0
05/14/2008 09:02 AM 9,492,992 f951.exe
1 File(s) 9,492,992 bytes
0 Dir(s) 31,516,164,096 bytes free
c:\Program Files\gfortran\libexec\gcc\i586-pc-mingw32\4.4.0>cd "c:/
program files/gfortran/bin/../lib/gcc/i586-pc-mingw32/4.4.0/finclude"

c:\Program Files\gfortran\lib\gcc\i586-pc-mingw32\4.4.0\finclude>

FX

unread,
Jun 2, 2008, 3:50:34 AM6/2/08
to gnu-f...@googlegroups.com
> Do you have any further suggestions?


No, I don't. But thanks for the detailed debugging session: I've
reported it in the GCC bug database: http://gcc.gnu.org/bugzilla/
show_bug.cgi?id=36417

FX

unread,
Jun 4, 2008, 3:38:46 AM6/4/08
to FX, gnu-f...@googlegroups.com
> I've reported it in the GCC bug database: http://gcc.gnu.org/
> bugzilla/show_bug.cgi?id=36417


Using the fix suggested by the mingw GCC maintainer in that PR, I
have made a new build that should have the issue fixed: could you
download it (http://quatramaran.ens.fr/~coudert/gfortran/gfortran-
windows.exe) and tell me if it works fine? You can remove the
"libexec" directory from your path, and it should still work fine.

jon

unread,
Jun 5, 2008, 1:34:13 AM6/5/08
to GNU Fortran
FX,

excellent. ça marche bien.

You can mark this one as fixed.
Reply all
Reply to author
Forward
0 new messages