www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - DStep

reply "Craig Dillabaugh" <cdillaba cg.scs.carleton.ca> writes:
I am trying to use DStep on OpenSuse 12.3.  I downloaded one of
the binaries (it was for Debian, so I guess that is my problem),
and when I run DStep I get the following error:

craigkris linux-s9qf:~/code/DShape/D> dstep shapefil.h
File(850DF8, "")/usr/include/stdio.h:33:11: fatal error:
'stddef.h' file not found

This seems to be some problem with clang (when I googled around I
found similar errors).

I actually started trying to fix this by adding symlinks to the
offending header files in my /usr/include folder, but that is
looking like a losing proposition. Has anyone successfully
overcome this before.

I also tried downloading dstep from gitHub and building from
scratch, but I am getting all sort of errors there (eg.)

 build.sh
dstep/driver/Application.d(13): Error: module Application is in file 'dstack/application/Application.d' which cannot be read Any help would be appreciated. Craig
Nov 22 2013
next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-11-22 15:35, Craig Dillabaugh wrote:
 I am trying to use DStep on OpenSuse 12.3.  I downloaded one of
 the binaries (it was for Debian, so I guess that is my problem),
 and when I run DStep I get the following error:

 craigkris linux-s9qf:~/code/DShape/D> dstep shapefil.h
 File(850DF8, "")/usr/include/stdio.h:33:11: fatal error:
 'stddef.h' file not found
Unfortunately this is a known issue. What I did is was to place stddef.h and stdarg.h (shipped with Clang) into /use/include. Please see the readme for more info. https://github.com/jacob-carlborg/dstep#libclang
 build.sh
dstep/driver/Application.d(13): Error: module Application is in file 'dstack/application/Application.d' which cannot be read
Did you clone the submodules? Run: $ git clone --recursive git github.com:jacob-carlborg/dstep.git -- /Jacob Carlborg
Nov 23 2013
parent reply "Craig Dillabaugh" <craig.dillabaugh gmail.com> writes:
On Saturday, 23 November 2013 at 20:16:32 UTC, Jacob Carlborg 
wrote:
 On 2013-11-22 15:35, Craig Dillabaugh wrote:
 I am trying to use DStep on OpenSuse 12.3.  I downloaded one of
 the binaries (it was for Debian, so I guess that is my 
 problem),
 and when I run DStep I get the following error:

 craigkris linux-s9qf:~/code/DShape/D> dstep shapefil.h
 File(850DF8, "")/usr/include/stdio.h:33:11: fatal error:
 'stddef.h' file not found
Unfortunately this is a known issue. What I did is was to place stddef.h and stdarg.h (shipped with Clang) into /use/include. Please see the readme for more info.
Thanks. That is how I started out trying to fix it (Well, I used symlinks rather than copy the files, but basically the same). I got it to stop complaining about stddef.h and stdarg.h, but at the third header (can't recall something obscure though) I gave up because I figured I was going to be adding symlinks to half the headers on my system! Thats when I decided to try compiling from scratch. Is this issue supposed to be fixed with new versions of clang?
 https://github.com/jacob-carlborg/dstep#libclang

 build.sh
dstep/driver/Application.d(13): Error: module Application is in file 'dstack/application/Application.d' which cannot be read
Did you clone the submodules? Run: $ git clone --recursive git github.com:jacob-carlborg/dstep.git
No I hadn't tried that. I will give it a shot. I am actually not urgently in need of DStep for my current project anymore, since my hand-written bindings seem to be doing the trick. However, as this was my first bind D to C attempt, I wanted to run DStep and see how close my bindings come to its output. Once I have my small initial project working though I am hoping to write bindings to a much larger library, and DStep would certainly come in handy there :o) Cheers, Craig
Nov 23 2013
parent reply Jacob Carlborg <doob me.com> writes:
On 2013-11-24 06:37, Craig Dillabaugh wrote:

 Thanks.  That is how I started out trying to fix it (Well, I used
 symlinks rather than copy the files, but basically the same).  I got it
 to stop complaining about stddef.h and stdarg.h, but at the third header
 (can't recall something obscure though) I gave up because I figured I
 was going to be adding symlinks to half the headers on my system! Thats
 when I decided to try compiling from scratch.
You need some kind of hearers, either system headers or headers from Clang. stddef.h and stdarg.h are somewhat special headers, they're builtin includes and you need to get them from Clang.
 Is this issue supposed to be fixed with new versions of clang?
I don't know, I don't think so.
 No I hadn't tried that.  I will give it a shot.
You will need Tango as well. All this is in the readme. Please let me know if there's something that is not clear in the readme. -- /Jacob Carlborg
Nov 24 2013
parent reply "Craig Dillabaugh" <craig.dillabaugh gmail.com> writes:
On Sunday, 24 November 2013 at 13:05:04 UTC, Jacob Carlborg wrote:
 On 2013-11-24 06:37, Craig Dillabaugh wrote:

 Thanks.  That is how I started out trying to fix it (Well, I 
 used
 symlinks rather than copy the files, but basically the same).  
 I got it
 to stop complaining about stddef.h and stdarg.h, but at the 
 third header
 (can't recall something obscure though) I gave up because I 
 figured I
 was going to be adding symlinks to half the headers on my 
 system! Thats
 when I decided to try compiling from scratch.
You need some kind of hearers, either system headers or headers from Clang. stddef.h and stdarg.h are somewhat special headers, they're builtin includes and you need to get them from Clang.
I have clang installed on my machine. Is there anyway to point dstep to the right headers when I invoke it?
 Is this issue supposed to be fixed with new versions of clang?
I don't know, I don't think so.
 No I hadn't tried that.  I will give it a shot.
You will need Tango as well. All this is in the readme. Please let me know if there's something that is not clear in the readme.
I already got Tango working - that was clear from your docs. At first I resisted, figuring I was sure to have problems getting Tango to work (Murphy's Law seems to apply strongly for me), but Tango turned out to be a piece of cake. I will give compiling DStep another shot in the next day or two and report back!
Nov 24 2013
parent reply Jacob Carlborg <doob me.com> writes:
On 2013-11-24 14:58, Craig Dillabaugh wrote:

 I have clang installed on my machine.  Is there anyway to point dstep to
 the right headers when I invoke it?
Yes, use the -I flag. In addition to the listed flags, DStep accept all flags Clang accepts.
 I already got Tango working - that was clear from your docs.  At first I
 resisted, figuring I was sure to have problems getting Tango to work
 (Murphy's Law seems to apply strongly for me), but Tango turned out to
 be a piece of cake.  I will give compiling DStep another shot in the
 next day or two and report back!
I plan to use dub to compile DStep. -- /Jacob Carlborg
Nov 24 2013
parent reply "Craig Dillabaugh" <craig.dillabaugh gmail.com> writes:
On Sunday, 24 November 2013 at 14:04:32 UTC, Jacob Carlborg wrote:
 On 2013-11-24 14:58, Craig Dillabaugh wrote:

 I have clang installed on my machine.  Is there anyway to 
 point dstep to
 the right headers when I invoke it?
Yes, use the -I flag. In addition to the listed flags, DStep accept all flags Clang accepts.
 I already got Tango working - that was clear from your docs.  
 At first I
 resisted, figuring I was sure to have problems getting Tango 
 to work
 (Murphy's Law seems to apply strongly for me), but Tango 
 turned out to
 be a piece of cake.  I will give compiling DStep another shot 
 in the
 next day or two and report back!
I plan to use dub to compile DStep.
So the following command works (at least on my system): dstep -I/usr/lib64/clang/3.2/include shapefil.h Thanks for your help.
Nov 24 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-11-24 16:02, Craig Dillabaugh wrote:

 So the following command works (at least on my system):
 dstep -I/usr/lib64/clang/3.2/include shapefil.h

 Thanks for your help.
Great to hear. -- /Jacob Carlborg
Nov 24 2013
prev sibling parent reply "Gary Willoughby" <dev nomad.so> writes:
On Friday, 22 November 2013 at 14:35:45 UTC, Craig Dillabaugh 
wrote:
 I am trying to use DStep on OpenSuse 12.3.  I downloaded one of
 the binaries (it was for Debian, so I guess that is my problem),
 and when I run DStep I get the following error:

 craigkris linux-s9qf:~/code/DShape/D> dstep shapefil.h
 File(850DF8, "")/usr/include/stdio.h:33:11: fatal error:
 'stddef.h' file not found

 This seems to be some problem with clang (when I googled around 
 I
 found similar errors).

 I actually started trying to fix this by adding symlinks to the
 offending header files in my /usr/include folder, but that is
 looking like a losing proposition. Has anyone successfully
 overcome this before.

 I also tried downloading dstep from gitHub and building from
 scratch, but I am getting all sort of errors there (eg.)

 build.sh
dstep/driver/Application.d(13): Error: module Application is in file 'dstack/application/Application.d' which cannot be read Any help would be appreciated. Craig
I ran into the same issue and the documentation does cover it, but why on earth should a binary require a header file?
Nov 24 2013
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2013-11-24 14:01, Gary Willoughby wrote:

 I ran into the same issue and the documentation does cover it, but why
 on earth should a binary require a header file?
It needs the header files when compiling C code. Up until after phase of creating the AST I assume the process would be exactly the same as compiling C code with Clang. It will basically compile the C code but skip the code generating phase. The headers are not always needed. Converting this will work without any headers: int foo (int x, int y); As soon as you start using includes in the header files you'll most likely end up including stddef.h or stdarg.h indirectly, one way or another. -- /Jacob Carlborg
Nov 24 2013
prev sibling parent "Craig Dillabaugh" <craig.dillabaugh gmail.com> writes:
On Sunday, 24 November 2013 at 13:01:15 UTC, Gary Willoughby 
wrote:
 On Friday, 22 November 2013 at 14:35:45 UTC, Craig Dillabaugh 
 wrote:
 I am trying to use DStep on OpenSuse 12.3.  I downloaded one of
 the binaries (it was for Debian, so I guess that is my 
 problem),
 and when I run DStep I get the following error:

 craigkris linux-s9qf:~/code/DShape/D> dstep shapefil.h
 File(850DF8, "")/usr/include/stdio.h:33:11: fatal error:
 'stddef.h' file not found

 This seems to be some problem with clang (when I googled 
 around I
 found similar errors).

 I actually started trying to fix this by adding symlinks to the
 offending header files in my /usr/include folder, but that is
 looking like a losing proposition. Has anyone successfully
 overcome this before.

 I also tried downloading dstep from gitHub and building from
 scratch, but I am getting all sort of errors there (eg.)

 build.sh
dstep/driver/Application.d(13): Error: module Application is in file 'dstack/application/Application.d' which cannot be read Any help would be appreciated. Craig
I ran into the same issue and the documentation does cover it, but why on earth should a binary require a header file?
I read part about the -I option, but thought it was for compiling DStep, not running it. Jacob cleared that up for me in the post above.
Nov 24 2013