www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Digger 2.3 & verstr.h problem

reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
Hi, just trying to build the latest DMD with Digger 2.3 and get this:

uffer.d root/port.d root/response.d root/rmem.d root/rootobject.d 
root/speller.d root/stringtable.d newdelete.o glue.a backend.a
globals.d(293): Error: file "verstr.h" cannot be found or not in a path 
specified with -J
make: *** [dmd] Error 1
digger: Saving to cache.
digger: Clearing temporary cache
Fatal error: Command ["make", "-f", "posix.mak", "MODEL=64", 
"HOST_DC=/Volumes/Daten/Windows/d/develop/d-language/Digger/dl/dmd-2.067.
/dmd2/osx/bin/dmd", 
"dmd"] failed with status 2
mac-pro:Digger robby$ find . -name "verstr.h"
./repo/dmd/src/verstr.h
mac-pro:Digger robby$ find . -name globals.d
./repo/dmd/src/globals.d
mac-pro:Digger robby$

I'm wondering why the "verstr.h" file can't be found... it's in the 
same dir as from where the import happens. Any ideas?

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
Aug 23 2015
next sibling parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Sunday, 23 August 2015 at 11:27:32 UTC, Robert M. Münch wrote:
 Hi, just trying to build the latest DMD with Digger 2.3 and get 
 this:

 uffer.d root/port.d root/response.d root/rmem.d 
 root/rootobject.d root/speller.d root/stringtable.d newdelete.o 
 glue.a backend.a
 globals.d(293): Error: file "verstr.h" cannot be found or not 
 in a path specified with -J
 make: *** [dmd] Error 1
 digger: Saving to cache.
 digger: Clearing temporary cache
 Fatal error: Command ["make", "-f", "posix.mak", "MODEL=64", 
 "HOST_DC=/Volumes/Daten/Windows/d/develop/d-language/Digger/dl/dmd-2.067.
/dmd2/osx/bin/dmd", "dmd"] failed with status 2
 mac-pro:Digger robby$ find . -name "verstr.h"
 ./repo/dmd/src/verstr.h
 mac-pro:Digger robby$ find . -name globals.d
 ./repo/dmd/src/globals.d
 mac-pro:Digger robby$

 I'm wondering why the "verstr.h" file can't be found... it's in 
 the same dir as from where the import happens. Any ideas?
almost certainly a consequence of the recent switchover to the dmd frontend being written in D. Have you tried building the latest Digger git HEAD first? If that doesn't work I suggest reporting it here for Vladimir (CyberShadow) to look at: https://github.com/CyberShadow/Digger/issues/new
Aug 23 2015
parent reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2015-08-23 16:23:57 +0000, John Colvin said:

 almost certainly a consequence of the recent switchover to the dmd 
 frontend being written in D. Have you tried building the latest Digger 
 git HEAD first? If that doesn't work I suggest reporting it here for 
 Vladimir (CyberShadow) to look at: 
 https://github.com/CyberShadow/Digger/issues/new
Yes, and get this: mac-pro:Digger robby$ rdmd --build-only digger digger.d(36): Error: no property 'additionalComponents' for type 'ae.sys.d.manager.DManager' Failed: ["dmd", "-v", "-o-", "digger.d", "-I."] So, I downloaded the binary... Maybe I somehow screwed up my setup? But can't imagine how and why... -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Aug 24 2015
parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Monday, 24 August 2015 at 09:13:56 UTC, Robert M. Münch wrote:
 On 2015-08-23 16:23:57 +0000, John Colvin said:

 almost certainly a consequence of the recent switchover to the 
 dmd frontend being written in D. Have you tried building the 
 latest Digger git HEAD first? If that doesn't work I suggest 
 reporting it here for Vladimir (CyberShadow) to look at: 
 https://github.com/CyberShadow/Digger/issues/new
Yes, and get this: mac-pro:Digger robby$ rdmd --build-only digger digger.d(36): Error: no property 'additionalComponents' for type 'ae.sys.d.manager.DManager' Failed: ["dmd", "-v", "-o-", "digger.d", "-I."] So, I downloaded the binary... Maybe I somehow screwed up my setup? But can't imagine how and why...
Is this from a clean clone of Digger, either with --recursive or having done git submodule update --init ? What version of DMD are you using to build it?
Aug 24 2015
parent =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2015-08-24 11:01:47 +0000, John Colvin said:

 Is this from a clean clone of Digger, either with --recursive or having 
 done git submodule update --init ? What version of DMD are you using to 
 build it?
Hi, no it was not. Doing a "git submodule update --init" fixed this problem. After this, the import path problem still exists. Thanks for this tip. -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Aug 24 2015
prev sibling parent reply "Vladimir Panteleev" <thecybershadow.lists gmail.com> writes:
On Sunday, 23 August 2015 at 11:27:32 UTC, Robert M. Münch wrote:
 Hi, just trying to build the latest DMD with Digger 2.3 and get 
 this:

 uffer.d root/port.d root/response.d root/rmem.d 
 root/rootobject.d root/speller.d root/stringtable.d newdelete.o 
 glue.a backend.a
 globals.d(293): Error: file "verstr.h" cannot be found or not 
 in a path specified with -J
 make: *** [dmd] Error 1
 digger: Saving to cache.
 digger: Clearing temporary cache
 Fatal error: Command ["make", "-f", "posix.mak", "MODEL=64", 
 "HOST_DC=/Volumes/Daten/Windows/d/develop/d-language/Digger/dl/dmd-2.067.
/dmd2/osx/bin/dmd", "dmd"] failed with status 2
 mac-pro:Digger robby$ find . -name "verstr.h"
 ./repo/dmd/src/verstr.h
 mac-pro:Digger robby$ find . -name globals.d
 ./repo/dmd/src/globals.d
 mac-pro:Digger robby$

 I'm wondering why the "verstr.h" file can't be found... it's in 
 the same dir as from where the import happens. Any ideas?
Can't reproduce this on Windows, Linux or OS X 10.10.3. Can you include more of the build log (specifically, the entire failing command line)? It should have a -J. in it.
Aug 23 2015
next sibling parent reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2015-08-23 17:01:07 +0000, Vladimir Panteleev said:

 Can't reproduce this on Windows, Linux or OS X 10.10.3.
Ok, good. So it should be fixable on my side.
 Can you include more of the build log (specifically, the entire failing 
 command line)? It should have a -J. in it.
CC=g++ /Volumes/Daten/Windows/d/develop/d-language/Digger/dl/dmd-2.06 .1/dmd2/osx/bin/dmd -ofdmd -m64 -vtls -J. -d access.d aggregate.d aliasthis.d apply.d argtypes.d arrayop.d arraytypes.d attrib.d backend.d builtin.d canthrow.d clone.d complex.d cond.d constfold.d cppmangle.d ctfeexpr.d dcast.d dclass.d declaration.d delegatize.d denum.d dimport.d dinifile.d dinterpret.d dmacro.d dmangle.d dmodule.d doc.d dscope.d dstruct.d dsymbol.d dtemplate.d dunittest.d dversion.d entity.d errors.d escape.d expression.d func.d globals.d hdrgen.d id.d identifier.d impcnvtab.d imphint.d init.d inline.d intrange.d json.d lexer.d lib.d link.d mars.d mtype.d nogc.d nspace.d opover.d optimize.d parse.d sapply.d sideeffect.d statement.d staticassert.d target.d tokens.d traits.d utf.d visitor.d objc.d root/aav.d root/array.d root/file.d root/filename.d root/longdouble.d root/man.d root/outbuffer.d root/port.d root/response.d root/rmem.d root/rootobject.d root/speller.d root/stringtable.d newdelete.o glue.a backend.a globals.d(293): Error: file "verstr.h" cannot be found or not in a path specified with -J make: *** [dmd] Error 1 digger: Saving to cache. digger: Clearing temporary cache Fatal error: Command ["make", "-f", "posix.mak", "MODEL=64", "HOST_DC=/Volumes/Daten/Windows/d/develop/d-language/Digger/dl/dmd-2.067. /dmd2/osx/bin/dmd", "dmd"] failed with status 2 AFAIU it does has the -J. included. -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Aug 23 2015
parent reply "Vladimir Panteleev" <thecybershadow.lists gmail.com> writes:
On Sunday, 23 August 2015 at 20:07:39 UTC, Robert M. Münch wrote:
 On 2015-08-23 17:01:07 +0000, Vladimir Panteleev said:

 [...]
Ok, good. So it should be fixable on my side. [...]
Not really sure what's going on there... If I could reproduce it, I'd try building DMD manually - if it still occurred, build DMD 2.067.1 from source and add debugging printfs to see why it's not finding verstr.h.
Aug 23 2015
parent reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2015-08-23 20:13:38 +0000, Vladimir Panteleev said:

 Not really sure what's going on there... If I could reproduce it, I'd 
 try building DMD manually - if it still occurred, build DMD 2.067.1 
 from source and add debugging printfs to see why it's not finding 
 verstr.h.
I'm not building 2.067.1 I try to build HEAD and digger uses 2.067.1 for this. Might this be a cause? -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Aug 24 2015
parent reply "Vladimir Panteleev" <thecybershadow.lists gmail.com> writes:
On Monday, 24 August 2015 at 09:18:14 UTC, Robert M. Münch wrote:
 On 2015-08-23 20:13:38 +0000, Vladimir Panteleev said:

 Not really sure what's going on there... If I could reproduce 
 it, I'd try building DMD manually - if it still occurred, 
 build DMD 2.067.1 from source and add debugging printfs to see 
 why it's not finding verstr.h.
I'm not building 2.067.1 I try to build HEAD and digger uses 2.067.1 for this. Might this be a cause?
Well, yes, your problem is that DMD 2.067 isn't finding a file while compiling DMD HEAD. So you would need to debug DMD 2.067 to find why it refuses to compile DMD HEAD.
Aug 24 2015
parent reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2015-08-24 14:27:52 +0000, Vladimir Panteleev said:

 Well, yes, your problem is that DMD 2.067 isn't finding a file while 
 compiling DMD HEAD. So you would need to debug DMD 2.067 to find why it 
 refuses to compile DMD HEAD.
Any way that I can switch to 2.068 for building HEAD? Not that I expect to help a lot but who knows... And, any idea how I can print getcwd() during compile time? I tried but it's not working by using the function directly... this is really strange. -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Aug 25 2015
parent reply "Vladimir Panteleev" <thecybershadow.lists gmail.com> writes:
On Tuesday, 25 August 2015 at 07:32:50 UTC, Robert M. Münch wrote:
 On 2015-08-24 14:27:52 +0000, Vladimir Panteleev said:

 Well, yes, your problem is that DMD 2.067 isn't finding a file 
 while compiling DMD HEAD. So you would need to debug DMD 2.067 
 to find why it refuses to compile DMD HEAD.
Any way that I can switch to 2.068 for building HEAD? Not that I expect to help a lot but who knows...
You could try unpacking 2.068 and replacing the Digger/dl/dmd-2.067.1 directory.
 And, any idea how I can print getcwd() during compile time? I 
 tried but it's not working by using the function directly... 
 this is really strange.
getcwd() doesn't work during compile time because it's a system call.
Aug 25 2015
parent =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2015-08-25 13:42:38 +0000, Vladimir Panteleev said:

 And, any idea how I can print getcwd() during compile time? I tried but 
 it's not working by using the function directly... this is really 
 strange.
getcwd() doesn't work during compile time because it's a system call.
I really don't have an idea how to track this problem down... -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Aug 27 2015
prev sibling parent reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
On 2015-08-23 17:01:07 +0000, Vladimir Panteleev said:

 Can't reproduce this on Windows, Linux or OS X 10.10.3.
 
 Can you include more of the build log (specifically, the entire failing 
 command line)? It should have a -J. in it.
I still try to get digger running on my OSX again. I fiddled around a bit and think I'm a bit closer to the problem, but still don't have an idea how to fix it. 1. I replaced the used DMD version with 2.068, no effect same problem. 2. If I avoid the import("verstr.h") code and replace it with a fixed string, it works. 3. If I add the src/ directory explicitly to the command line it works too. Looks like this then: Volumes/Daten/Windows/d/develop/d-language/Digger/dl/dmd-2.06 .1/dmd2/osx/bin/dmd -v -ofdmd -m64 -vtls -J. -J/Volumes/Daten/Windows/d/develop/d-language/Digger/repo/dmd/src -d -L-lstdc++ access.d aggregate.d aliasthis.d apply.d argtypes.d arrayop.d arraytypes.d attrib.d backend.d builtin.d canthrow.d clone.d complex.d cond.d constfold.d cppmangle.d ctfeexpr.d dcast.d dclass.d declaration.d delegatize.d denum.d dimport.d dinifile.d dinterpret.d dmacro.d dmangle.d dmodule.d doc.d dscope.d dstruct.d dsymbol.d dtemplate.d dunittest.d dversion.d entity.d errors.d escape.d expression.d func.d globals.d hdrgen.d id.d identifier.d impcnvtab.d imphint.d init.d inline.d intrange.d json.d lexer.d lib.d link.d mars.d mtype.d nogc.d nspace.d opover.d optimize.d parse.d sapply.d sideeffect.d statement.d staticassert.d target.d tokens.d traits.d utf.d visitor.d typinf.d irstate.d objc.d libmach.d scanmach.d root/aav.d root/array.d root/file.d root/filename.d root/longdouble.d root/man.d root/outbuffer.d root/port.d root/response.d root/rmem.d root/rootobject.d root/speller.d root/stringtable.d newdelete.o glue.a backend.a Note the second -J So, somehow the file look-up with -J. seems not to work on my OSX. But I don't have a clue what the problem could be. Maybe some strange environment settings on my side? Any help welcome... -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Sep 02 2015
parent =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
Some more tests with a simple example:

import std.stdio;

void main() {
    writeln("hello world!" ~ import("signature.h"));
}


mac-pro:d-language robby$ dmd -v -J. hello.d
binary    dmd
version   v2.068.0
config    /usr/local/bin/dmd.conf
parse     hello
importall hello
import    object	(/Library/D/dmd/src/druntime/import/object.d)
import    std.stdio	(/Library/D/dmd/src/phobos/std/stdio.d)
import    core.stdc.stdio 
(/Library/D/dmd/src/druntime/import/core/stdc/stdio.d)
import    core.stdc.config 
(/Library/D/dmd/src/druntime/import/core/stdc/config.d)
import    core.stdc.stdarg 
(/Library/D/dmd/src/druntime/import/core/stdc/stdarg.d)
import    core.stdc.stdlib 
(/Library/D/dmd/src/druntime/import/core/stdc/stdlib.d)
import    core.stdc.stddef 
(/Library/D/dmd/src/druntime/import/core/stdc/stddef.d)
import    core.stdc.stdint 
(/Library/D/dmd/src/druntime/import/core/stdc/stdint.d)
import    core.stdc.signal 
(/Library/D/dmd/src/druntime/import/core/stdc/signal.d)
import    core.stdc.wchar_ 
(/Library/D/dmd/src/druntime/import/core/stdc/wchar_.d)
import    core.stdc.time	(/Library/D/dmd/src/druntime/import/core/stdc/time.d)
import    core.sys.posix.sys.types 
(/Library/D/dmd/src/druntime/import/core/sys/posix/sys/types.d)
import    core.sys.posix.config 
(/Library/D/dmd/src/druntime/import/core/sys/posix/config.d)
import    std.typecons	(/Library/D/dmd/src/phobos/std/typecons.d)
import    std.traits	(/Library/D/dmd/src/phobos/std/traits.d)
import    std.typetuple	(/Library/D/dmd/src/phobos/std/typetuple.d)
import    std.meta	(/Library/D/dmd/src/phobos/std/meta.d)
import    std.stdiobase	(/Library/D/dmd/src/phobos/std/stdiobase.d)
import    std.range.primitives 
(/Library/D/dmd/src/phobos/std/range/primitives.d)
semantic  hello
import    core.stdc.errno 
(/Library/D/dmd/src/druntime/import/core/stdc/errno.d)
entry     main      	hello.d
semantic2 hello
semantic3 hello
hello.d(4): Error: file "signature.h" cannot be found or not in a path 
specified with -J


And now adding the explicit path:

mac-pro:d-language robby$ pwd
/Volumes/Daten/Windows/d/develop/d-language

mac-pro:d-language robby$ dmd -v 
-J/Volumes/Daten/Windows/d/develop/d-language hello.d
binary    dmd
version   v2.068.0
config    /usr/local/bin/dmd.conf
parse     hello
importall hello
import    object	(/Library/D/dmd/src/druntime/import/object.d)
import    std.stdio	(/Library/D/dmd/src/phobos/std/stdio.d)
import    core.stdc.stdio 
(/Library/D/dmd/src/druntime/import/core/stdc/stdio.d)
import    core.stdc.config 
(/Library/D/dmd/src/druntime/import/core/stdc/config.d)
import    core.stdc.stdarg 
(/Library/D/dmd/src/druntime/import/core/stdc/stdarg.d)
import    core.stdc.stdlib 
(/Library/D/dmd/src/druntime/import/core/stdc/stdlib.d)
import    core.stdc.stddef 
(/Library/D/dmd/src/druntime/import/core/stdc/stddef.d)
import    core.stdc.stdint 
(/Library/D/dmd/src/druntime/import/core/stdc/stdint.d)
import    core.stdc.signal 
(/Library/D/dmd/src/druntime/import/core/stdc/signal.d)
import    core.stdc.wchar_ 
(/Library/D/dmd/src/druntime/import/core/stdc/wchar_.d)
import    core.stdc.time	(/Library/D/dmd/src/druntime/import/core/stdc/time.d)
import    core.sys.posix.sys.types 
(/Library/D/dmd/src/druntime/import/core/sys/posix/sys/types.d)
import    core.sys.posix.config 
(/Library/D/dmd/src/druntime/import/core/sys/posix/config.d)
import    std.typecons	(/Library/D/dmd/src/phobos/std/typecons.d)
import    std.traits	(/Library/D/dmd/src/phobos/std/traits.d)
import    std.typetuple	(/Library/D/dmd/src/phobos/std/typetuple.d)
import    std.meta	(/Library/D/dmd/src/phobos/std/meta.d)
import    std.stdiobase	(/Library/D/dmd/src/phobos/std/stdiobase.d)
import    std.range.primitives 
(/Library/D/dmd/src/phobos/std/range/primitives.d)
semantic  hello
import    core.stdc.errno 
(/Library/D/dmd/src/druntime/import/core/stdc/errno.d)
entry     main      	hello.d
semantic2 hello
semantic3 hello
file      signature.h	(/Volumes/Daten/windows/d/develop/d-language/signature.h)
...

It works. This made me suspicous what's goind on. The 
/Volumes/Daten/... device is not the boot device nor the one where my 
~home directory is located. So, tried it there:

mac-pro:tmp robby$ pwd
/Users/robby/tmp

mac-pro:tmp robby$ dmd -v -J. hello.d
binary    dmd
version   v2.068.0
config    /usr/local/bin/dmd.conf
parse     hello
importall hello
import    object	(/Library/D/dmd/src/druntime/import/object.d)
import    std.stdio	(/Library/D/dmd/src/phobos/std/stdio.d)
import    core.stdc.stdio 
(/Library/D/dmd/src/druntime/import/core/stdc/stdio.d)
import    core.stdc.config 
(/Library/D/dmd/src/druntime/import/core/stdc/config.d)
import    core.stdc.stdarg 
(/Library/D/dmd/src/druntime/import/core/stdc/stdarg.d)
import    core.stdc.stdlib 
(/Library/D/dmd/src/druntime/import/core/stdc/stdlib.d)
import    core.stdc.stddef 
(/Library/D/dmd/src/druntime/import/core/stdc/stddef.d)
import    core.stdc.stdint 
(/Library/D/dmd/src/druntime/import/core/stdc/stdint.d)
import    core.stdc.signal 
(/Library/D/dmd/src/druntime/import/core/stdc/signal.d)
import    core.stdc.wchar_ 
(/Library/D/dmd/src/druntime/import/core/stdc/wchar_.d)
import    core.stdc.time	(/Library/D/dmd/src/druntime/import/core/stdc/time.d)
import    core.sys.posix.sys.types 
(/Library/D/dmd/src/druntime/import/core/sys/posix/sys/types.d)
import    core.sys.posix.config 
(/Library/D/dmd/src/druntime/import/core/sys/posix/config.d)
import    std.typecons	(/Library/D/dmd/src/phobos/std/typecons.d)
import    std.traits	(/Library/D/dmd/src/phobos/std/traits.d)
import    std.typetuple	(/Library/D/dmd/src/phobos/std/typetuple.d)
import    std.meta	(/Library/D/dmd/src/phobos/std/meta.d)
import    std.stdiobase	(/Library/D/dmd/src/phobos/std/stdiobase.d)
import    std.range.primitives 
(/Library/D/dmd/src/phobos/std/range/primitives.d)
semantic  hello
import    core.stdc.errno 
(/Library/D/dmd/src/druntime/import/core/stdc/errno.d)
entry     main      	hello.d
semantic2 hello
semantic3 hello
file      signature.h	(/Users/robby/tmp/signature.h)


This works too. So, it has to do with some access depending which 
device it's running on. I have these:

mac-pro:tmp robby$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *256.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS System                  254.6 GB   disk0s2
   3:                 Apple_Boot Recovery HD             1.0 GB     disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *9.0 TB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:                  Apple_HFS Daten                   9.0 TB     disk1s2

As you can see /dev/disk0 seems to work /dev/disk1 not. Any idea how 
this can influence the -J switch?

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
Sep 02 2015