ld: crt2.o: No such file: No such file or directory

1,531 views
Skip to first unread message

Arjan

unread,
Apr 29, 2010, 10:55:36 AM4/29/10
to gg95
Hi,

Great to see the recent g95-development work!
I installed the latest version for MinGW/MSYS (on a Windows-XP, SP3
box):
(G95 (GCC 4.1.2 (g95 0.93!) Apr 27 2010)
Copyright (C) 2002-2008 Free Software Foundation, Inc.)

via a self-extracting windows executable.
When I compile a simple program, I get the following error:

ld: crt2.o: No such file: No such file or directory

even though I have library_path and path set as always and crt2.o is
just
where it belongs. I've been working with g95 consistently over the
past years and never had this before. Also: I only upgraded to the
lastest version. Nothing else was changed. Regression to the "latest
stable version" of g95 from
last year
(G95 (GCC 4.0.4 (g95 0.92!) Jun 17 2009)
Copyright (C) 2002-2008 Free Software Foundation, Inc.)
resolves the bug...

Does anyone else experience the same?
Can I solve it in my recent installation?
Is Andy the sole expert who can deal with this?
If so: Andy, can you please have a peek into this?

Regards,


Arjan

--
You received this message because you are subscribed to the Google Groups "gg95" group.
To post to this group, send email to gg...@googlegroups.com.
To unsubscribe from this group, send email to gg95+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gg95?hl=en.

Arjan

unread,
Apr 29, 2010, 11:05:35 AM4/29/10
to gg95
I just saw that there was already a thread about this issue.
Nevertheless, even the version of 28 april (=yesterday) does not
resolve the problem...

A.

_MIke_

unread,
Apr 29, 2010, 11:58:05 AM4/29/10
to gg95
Hi, Arjan

You must copy all file (*.a, *.o) from
..\g95\lib\
to
..\g95\lib\gcc-lib\i686-pc-mingw32\4.1.2\

I my case it's work.

Regards,
Mike

Arjan

unread,
Apr 29, 2010, 12:59:09 PM4/29/10
to gg95
> You must copy all file (*.a, *.o) from
> ..\g95\lib\
> to
> ..\g95\lib\gcc-lib\i686-pc-mingw32\4.1.2\

Mike,

Thanks for your suggestion.

I installed g95 in the MinGW structure, as suggested at installation.
Therefore I don't seem to have a (sub-)directory g95.
Anyhow, I searched for e.g. crt2.o and found it both in
c:\MinGW\lib and in c:\MinGW\i386-pc-mingw32\lib, although the version
in the latter directory is 8 KB and in the former only 3KB...
Many more files reside in both directories, sometimes with the same
size,
sometimes with different sizes. Copying the .o and .a-files from c:
\MinGW\lib
to c:\MinGW\i386-pc-mingw32\lib
would make a difference, but would you really think that it would
solve something?

Arjan

Doug

unread,
Apr 29, 2010, 4:20:18 PM4/29/10
to gg95


On Apr 29, 12:59 pm, Arjan <arjan.van.d...@rivm.nl> wrote:
> > You must copy all file (*.a, *.o) from
> > ..\g95\lib\
> > to
> > ..\g95\lib\gcc-lib\i686-pc-mingw32\4.1.2\
>
> Mike,
>
> Thanks for your suggestion.
>
> I installed g95 in the MinGW structure, as suggested at installation.
> Therefore I don't seem to have a (sub-)directory g95.
> Anyhow, I searched for e.g. crt2.o and found it both in
> c:\MinGW\lib and in c:\MinGW\i386-pc-mingw32\lib, although the version
> in the latter directory is 8 KB and in the former only 3KB...
> Many more files reside in both directories, sometimes with the same
> size,
> sometimes with different sizes. Copying the .o and .a-files from c:
> \MinGW\lib
> to c:\MinGW\i386-pc-mingw32\lib
> would make a difference, but would you really think that it would
> solve something?
>
> Arjan
>

The environment variable that you may need to use for g95 is
G95_LIBRARY_PATH. You could try setting it. The name of the build that
I provide is g95-MinGW-41.exe but Andy changes it to g95-MinGW.exe.
Follow the documentation for g95-MinGW-41.exe.

Doug

Arjan

unread,
Apr 29, 2010, 6:32:45 PM4/29/10
to gg95
> Follow the documentation for g95-MinGW-41.exe.
> Doug

Thanks!
I'll give it a try tomorrow!
And let you know the result...

Arjan

Arjan

unread,
Apr 30, 2010, 11:12:50 AM4/30/10
to gg95
> > Follow the documentation for g95-MinGW-41.exe.
> > Doug

I re-installed the latest snapshot for a "Self-extracting Windows
x86". Setting environment variable G95_LIBRARY_PATH to c:\MinGW\i386-
pc-mingw32\lib removed the complaint about crt2.o. It seems to work
now.

Would it be a suggestion for you to make the windows-installer ask
permission to set G95_LIBRARY_PATH? This would save a lot of trouble!
Or make a note of the need to set this environment variable on the
download page and in the readme?

Thanks for helping me out!
Reply all
Reply to author
Forward
0 new messages