www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Problem building GCC Frontend

reply Nick Sabalausky <Nick_member pathlink.com> writes:
I'm trying to build and use the D frontend for GCC.  I've gotten it to
(seemingly) compile, but I'm getting an odd problem when trying to use it.  I
made a basic test file, test.d, which is literally just "void main() {  }".
When I do "gdc -c test.d" I get this:

read error, errno = 2
Error: Error reading file 'test.d'

Could this be one of the intrnal compiler errors that the "Grey Areas/Known
Issues" section of http://home.earthlink.net/~dvdfrdmn/d/ refers to?  Also, If I
try "gdc test.d" without the "-c" I get "gdc: libphobos.spec: No such file or
directory". The whole problem couldn't be because I haven't built phobos could
it?  I don't think I would be able to build phobos anyway without the D frontend
working, since isn't part of phobos written in D?
Jul 23 2004
next sibling parent reply Jan <Jan ArtifactGames.de> writes:
Try to give the whole path of "test.d" to the compiler. I havenīt done 
much in D yet, but i had that problem too (same error message), because 
i only gave "hello.d" to it, which was not in the same directory as the 
compiler.
The error should rather be "couldnīt find 'hello.d'" or such, since this 
message is a bit confusing.

Jan.

Nick Sabalausky wrote:

 I'm trying to build and use the D frontend for GCC.  I've gotten it to
 (seemingly) compile, but I'm getting an odd problem when trying to use it.  I
 made a basic test file, test.d, which is literally just "void main() {  }".
 When I do "gdc -c test.d" I get this:
 
 read error, errno = 2
 Error: Error reading file 'test.d'
 
 Could this be one of the intrnal compiler errors that the "Grey Areas/Known
 Issues" section of http://home.earthlink.net/~dvdfrdmn/d/ refers to?  Also, If
I
 try "gdc test.d" without the "-c" I get "gdc: libphobos.spec: No such file or
 directory". The whole problem couldn't be because I haven't built phobos could
 it?  I don't think I would be able to build phobos anyway without the D
frontend
 working, since isn't part of phobos written in D?
 
 

Jul 23 2004
parent Nick Sabalausky <Nick_member pathlink.com> writes:
Hmm, no it still gives me that message.

In article <cdrm2j$2d5q$1 digitaldaemon.com>, Jan says...
Try to give the whole path of "test.d" to the compiler. I havenīt done 
much in D yet, but i had that problem too (same error message), because 
i only gave "hello.d" to it, which was not in the same directory as the 
compiler.
The error should rather be "couldnīt find 'hello.d'" or such, since this 
message is a bit confusing.

Jan.

Nick Sabalausky wrote:

 I'm trying to build and use the D frontend for GCC.  I've gotten it to
 (seemingly) compile, but I'm getting an odd problem when trying to use it.  I
 made a basic test file, test.d, which is literally just "void main() {  }".
 When I do "gdc -c test.d" I get this:
 
 read error, errno = 2
 Error: Error reading file 'test.d'
 
 Could this be one of the intrnal compiler errors that the "Grey Areas/Known
 Issues" section of http://home.earthlink.net/~dvdfrdmn/d/ refers to?  Also, If
I
 try "gdc test.d" without the "-c" I get "gdc: libphobos.spec: No such file or
 directory". The whole problem couldn't be because I haven't built phobos could
 it?  I don't think I would be able to build phobos anyway without the D
frontend
 working, since isn't part of phobos written in D?
 
 


Jul 23 2004
prev sibling next sibling parent reply Nick Sabalausky <Nick_member pathlink.com> writes:
I just converted the source file from using DOS-style line breaks to Unix-style
(I'm on Cygwin, btw.  I wanted to be able to use DOS-style breaks, but oh
well...) and now instead of getting:

read error, errno = 2
Error: Error reading file 'test.d'

Instead of that, I'm now getting:

Error: Error reading file 'object.d'

Even though I never made any reference to such a file.

In article <cdrlam$2cc4$1 digitaldaemon.com>, Nick Sabalausky says...
I'm trying to build and use the D frontend for GCC.  I've gotten it to
(seemingly) compile, but I'm getting an odd problem when trying to use it.  I
made a basic test file, test.d, which is literally just "void main() {  }".
When I do "gdc -c test.d" I get this:

read error, errno = 2
Error: Error reading file 'test.d'

Could this be one of the intrnal compiler errors that the "Grey Areas/Known
Issues" section of http://home.earthlink.net/~dvdfrdmn/d/ refers to?  Also, If I
try "gdc test.d" without the "-c" I get "gdc: libphobos.spec: No such file or
directory". The whole problem couldn't be because I haven't built phobos could
it?  I don't think I would be able to build phobos anyway without the D frontend
working, since isn't part of phobos written in D?

Jul 23 2004
parent reply "Ben Hinkle" <bhinkle mathworks.com> writes:
"Nick Sabalausky" <Nick_member pathlink.com> wrote in message
news:cdrn1c$2dr1$1 digitaldaemon.com...
 I just converted the source file from using DOS-style line breaks to

 (I'm on Cygwin, btw.  I wanted to be able to use DOS-style breaks, but oh
 well...)

I'm not sure if anyone has tried gdc on cygwin. You might be in uncharted waters here.
 and now instead of getting:

 read error, errno = 2
 Error: Error reading file 'test.d'

 Instead of that, I'm now getting:

 Error: Error reading file 'object.d'

 Even though I never made any reference to such a file.

object.d is read implicitly. It is in dmd/src/phobos/object.d
 In article <cdrlam$2cc4$1 digitaldaemon.com>, Nick Sabalausky says...
I'm trying to build and use the D frontend for GCC.  I've gotten it to
(seemingly) compile, but I'm getting an odd problem when trying to use


made a basic test file, test.d, which is literally just "void main()


When I do "gdc -c test.d" I get this:

read error, errno = 2
Error: Error reading file 'test.d'

Could this be one of the intrnal compiler errors that the "Grey


Issues" section of http://home.earthlink.net/~dvdfrdmn/d/ refers to?


try "gdc test.d" without the "-c" I get "gdc: libphobos.spec: No such


directory". The whole problem couldn't be because I haven't built phobos


it?  I don't think I would be able to build phobos anyway without the D


working, since isn't part of phobos written in D?


Jul 23 2004
next sibling parent Nick Sabalausky <Nick_member pathlink.com> writes:
In article <cdrne4$2e87$1 digitaldaemon.com>, Ben Hinkle says...
"Nick Sabalausky" <Nick_member pathlink.com> wrote in message
news:cdrn1c$2dr1$1 digitaldaemon.com...
 and now instead of getting:

 read error, errno = 2
 Error: Error reading file 'test.d'

 Instead of that, I'm now getting:

 Error: Error reading file 'object.d'

 Even though I never made any reference to such a file.

object.d is read implicitly. It is in dmd/src/phobos/object.d

Is there an environment variable where that path is supposed to be set?
Aug 05 2004
prev sibling parent reply Nick Sabalausky <Nick_member pathlink.com> writes:
In article <cdrne4$2e87$1 digitaldaemon.com>, Ben Hinkle says...
object.d is read implicitly. It is in dmd/src/phobos/object.d

Is that where it's supposed to be in the D frontend for GCC?
Aug 05 2004
next sibling parent Deja Augustine <deja scratch-ware.net> writes:
Nick Sabalausky wrote:

 In article <cdrne4$2e87$1 digitaldaemon.com>, Ben Hinkle says...
 
object.d is read implicitly. It is in dmd/src/phobos/object.d

Is that where it's supposed to be in the D frontend for GCC?

yes
Aug 05 2004
prev sibling parent bjoern <b.z. gmx.net> writes:
Nick Sabalausky wrote:

 In article <cdrne4$2e87$1 digitaldaemon.com>, Ben Hinkle says...
 
object.d is read implicitly. It is in dmd/src/phobos/object.d

Is that where it's supposed to be in the D frontend for GCC?

My "object.d" is in "$(gcc-dir)/include/d/" along with a lot of other phobos-files... - Bjoern
Aug 06 2004
prev sibling parent "Ben Hinkle" <bhinkle mathworks.com> writes:
What platform are you using? Where are you installing gdc? Not finding
libphobos.spec sounds like an install issue. Maybe also try passing the -v
flag to get verbose output.

"Nick Sabalausky" <Nick_member pathlink.com> wrote in message
news:cdrlam$2cc4$1 digitaldaemon.com...
 I'm trying to build and use the D frontend for GCC.  I've gotten it to
 (seemingly) compile, but I'm getting an odd problem when trying to use it.

 made a basic test file, test.d, which is literally just "void main()

 When I do "gdc -c test.d" I get this:

 read error, errno = 2
 Error: Error reading file 'test.d'

 Could this be one of the intrnal compiler errors that the "Grey

 Issues" section of http://home.earthlink.net/~dvdfrdmn/d/ refers to?

 try "gdc test.d" without the "-c" I get "gdc: libphobos.spec: No such file

 directory". The whole problem couldn't be because I haven't built phobos

 it?  I don't think I would be able to build phobos anyway without the D

 working, since isn't part of phobos written in D?

Jul 23 2004