Jump to page: 1 2
Thread overview
DStep
Nov 22, 2013
Craig Dillabaugh
Nov 23, 2013
Jacob Carlborg
Nov 24, 2013
Craig Dillabaugh
Nov 24, 2013
Jacob Carlborg
Nov 24, 2013
Craig Dillabaugh
Nov 24, 2013
Jacob Carlborg
Nov 24, 2013
Craig Dillabaugh
Nov 24, 2013
Jacob Carlborg
Nov 24, 2013
Gary Willoughby
Nov 24, 2013
Jacob Carlborg
Nov 24, 2013
Craig Dillabaugh
November 22, 2013
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
November 23, 2013
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
November 24, 2013
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
November 24, 2013
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?
November 24, 2013
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
November 24, 2013
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!

November 24, 2013
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
November 24, 2013
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
November 24, 2013
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.

November 24, 2013
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.

« First   ‹ Prev
1 2