[GHC] #13166: Warning: Can't find file "C:\...\lib/include\ghcversion.h" in directories

GHC ghc-devs at haskell.org
Wed Feb 1 10:37:02 UTC 2017


#13166: Warning: Can't find file "C:\...\lib/include\ghcversion.h" in directories
-------------------------------------+-------------------------------------
        Reporter:  domenkozar        |                Owner:
            Type:  bug               |               Status:  upstream
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Phyx-):

 The path isn't incorrect, It's a perfectly valid Windows path. DOS path
 separator character `\` isn't required by the API at all. The behavior
 you're alluding to is that of DOS or command.com, not NT.

 The page I pointed you to explicitly says:

 {{{
 Note  File I/O functions in the Windows API convert "/" to "\" as part
 of converting the name to an NT-style name, except when using the "\\?\"
 prefix as detailed in the following sections.
 }}}

 You can see an overview here
 https://en.wikipedia.org/wiki/Path_%28computing%29

 or you can just experiment yourself:

 {{{
 C:\Users\tamar\Desktop>mkdir foo
 C:\Users\tamar\Desktop>echo "hello world" > foo/test.txt
 C:\Users\tamar\Desktop>dir foo
  Volume in drive C is Windows
  Volume Serial Number is ...

  Directory of C:\Users\tamar\Desktop\foo

 01/02/2017  10:17    <DIR>          .
 01/02/2017  10:17    <DIR>          ..
 01/02/2017  10:17                16 test.txt
                1 File(s)             16 bytes
                2 Dir(s)  45,293,834,240 bytes free
 }}}

 The error is being generated by `cpphs` and we've given it a valid path.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13166#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list