Re: [cfe-users] Compiling on network share using relative paths fails

2020-09-10 Thread David Blaikie via cfe-users
Can you confirm other tools given similar path specifications in similar
circumstances (command line/current working directory/etc) succeed where
clang fails? (MSVC, notepad, gcc, 'cat' (if Windows has a 'cat'))

On Wed, Sep 9, 2020 at 10:41 AM Telium Technical Support via cfe-users <
cfe-users@lists.llvm.org> wrote:

> I think this is a bug…but it’s so big that I can’t believe I’m the first
> person to find it.  Perhaps someone can help me find a workaround…
>
>
>
> I discovered that clang++ will not find a source file if it is located on
> a network share (if using a relative path). For example, I have place the
> same file "main.cpp" into C:\temp (a local drive) and T:\temp (a network
> SMB share).
>
>
>
> If I change pwd to C:\temp the following line works:
>
>
>
> C:\android\cmdline-tools\ndk\21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++
> main.cpp
>
>
>
> but if I change pwd to T:\temp the above line does NOT work (can't find
> file). However, if I specify the full path for the source file for clang++
> T:\temp\main.cpp then it works.
>
>
>
> Since my make files are generated (using qmake) I have no control over the
> paths passed to clang++. Can someone explain why clang++ can't find source
> files on network shares (using relative paths), and how to fix this?
>
>
>
> In case it matters, I’m running on Win10 64 bit.  I’ve tried putting
> source files on an SMB share, and a NFS share…and the results are the same.
> ___
> cfe-users mailing list
> cfe-users@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Compiling on network share using relative paths fails

2020-09-10 Thread Telium Technical Support via cfe-users
Yes – I can open the file using relative path (in notepad) or type (cat) the 
file from the command line.  Only clang++ seems to have a problem.

 

From: David Blaikie [mailto:dblai...@gmail.com] 
Sent: Thursday, September 10, 2020 1:06 PM
To: Telium Technical Support 
Cc: via cfe-users 
Subject: Re: [cfe-users] Compiling on network share using relative paths fails

 

Can you confirm other tools given similar path specifications in similar 
circumstances (command line/current working directory/etc) succeed where clang 
fails? (MSVC, notepad, gcc, 'cat' (if Windows has a 'cat'))

 

On Wed, Sep 9, 2020 at 10:41 AM Telium Technical Support via cfe-users 
mailto:cfe-users@lists.llvm.org> > wrote:

I think this is a bug…but it’s so big that I can’t believe I’m the first person 
to find it.  Perhaps someone can help me find a workaround…

 

I discovered that clang++ will not find a source file if it is located on a 
network share (if using a relative path). For example, I have place the same 
file "main.cpp" into C:\temp (a local drive) and T:\temp (a network SMB share).

 

If I change pwd to C:\temp the following line works:

 

C:\android\cmdline-tools\ndk\21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++
 main.cpp

 

but if I change pwd to T:\temp the above line does NOT work (can't find file). 
However, if I specify the full path for the source file for clang++ 
T:\temp\main.cpp then it works.

 

Since my make files are generated (using qmake) I have no control over the 
paths passed to clang++. Can someone explain why clang++ can't find source 
files on network shares (using relative paths), and how to fix this?

 

In case it matters, I’m running on Win10 64 bit.  I’ve tried putting source 
files on an SMB share, and a NFS share…and the results are the same.

___
cfe-users mailing list
cfe-users@lists.llvm.org  
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Compiling on network share using relative paths fails

2020-09-10 Thread Jan Korous via cfe-users
Can you please paste the error message (or the full output) here?

You could try to use some strace-like tool to see what files is clang trying to 
open. I'm not familiar with Windows but maybe you could use this:
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/logger-and-logviewer

Jan

> On Sep 10, 2020, at 11:17 AM, Telium Technical Support via cfe-users 
>  wrote:
> 
> Yes – I can open the file using relative path (in notepad) or type (cat) the 
> file from the command line.  Only clang++ seems to have a problem.
>  
> From: David Blaikie [mailto:dblai...@gmail.com] 
> Sent: Thursday, September 10, 2020 1:06 PM
> To: Telium Technical Support 
> Cc: via cfe-users 
> Subject: Re: [cfe-users] Compiling on network share using relative paths fails
>  
> Can you confirm other tools given similar path specifications in similar 
> circumstances (command line/current working directory/etc) succeed where 
> clang fails? (MSVC, notepad, gcc, 'cat' (if Windows has a 'cat'))
>  
> On Wed, Sep 9, 2020 at 10:41 AM Telium Technical Support via cfe-users 
> mailto:cfe-users@lists.llvm.org>> wrote:
>> I think this is a bug…but it’s so big that I can’t believe I’m the first 
>> person to find it.  Perhaps someone can help me find a workaround…
>>  
>> I discovered that clang++ will not find a source file if it is located on a 
>> network share (if using a relative path). For example, I have place the same 
>> file "main.cpp" into C:\temp (a local drive) and T:\temp (a network SMB 
>> share).
>>  
>> If I change pwd to C:\temp the following line works:
>>  
>> C:\android\cmdline-tools\ndk\21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++
>>  main.cpp
>>  
>> but if I change pwd to T:\temp the above line does NOT work (can't find 
>> file). However, if I specify the full path for the source file for clang++ 
>> T:\temp\main.cpp then it works.
>>  
>> Since my make files are generated (using qmake) I have no control over the 
>> paths passed to clang++. Can someone explain why clang++ can't find source 
>> files on network shares (using relative paths), and how to fix this?
>>  
>> In case it matters, I’m running on Win10 64 bit.  I’ve tried putting source 
>> files on an SMB share, and a NFS share…and the results are the same.
>> ___
>> cfe-users mailing list
>> cfe-users@lists.llvm.org 
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users 
>> ___
> cfe-users mailing list
> cfe-users@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users