public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Include not working on samba share
@ 2009-01-05 14:28 Fabian Cenedese
  2009-01-09 11:18 ` Fabian Cenedese
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Cenedese @ 2009-01-05 14:28 UTC (permalink / raw)
  To: gcc-help

Hi

I have a problem that may be gcc or not. I'll just ask here if anybody knows
something.

We have some projects that are C++ with header files and can be compiled
with no problems on a local drive. The used gcc is quite old (2.96.x) and
built with cygwin, running on windows.

However if the whole project is moved from the local drive to a share
(samba, probably also windows) the compilation may fail with
various errors. The main problem seems to be that include files are not
read properly. They are found (gcc emits an error if the name is wrong)
but the content seems not to be read. Even if such a problematic
header file contains crap it is not mentioned by gcc. To make things
worse is that on different computers the compilation may fail differently
or even work without problems.

The other possible culprit could be the cygwin environment. But I don't
know what I could change there except for updating.

Has anybody ever experienced something similar? Or an idea what I
could look into (from the gcc side)?

Thanks for any help

bye  Fabi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Include not working on samba share
  2009-01-05 14:28 Include not working on samba share Fabian Cenedese
@ 2009-01-09 11:18 ` Fabian Cenedese
  2010-03-17  8:28   ` Fabian Cenedese
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Cenedese @ 2009-01-09 11:18 UTC (permalink / raw)
  To: gcc-help

At 15:27 05.01.2009 +0100, Fabian Cenedese wrote:
>We have some projects that are C++ with header files and can be compiled
>with no problems on a local drive. The used gcc is quite old (2.96.x) and
>built with cygwin, running on windows.
>
>However if the whole project is moved from the local drive to a share
>(samba, probably also windows) the compilation may fail with
>various errors. The main problem seems to be that include files are not
>read properly. They are found (gcc emits an error if the name is wrong)
>but the content seems not to be read. Even if such a problematic
>header file contains crap it is not mentioned by gcc. To make things
>worse is that on different computers the compilation may fail differently
>or even work without problems.

I have now tried gcc 3.4.3 and 4.1 with the same cygwin1.dll (1.5).
They both can compile the project without showing these errors. Does
anyone know what could have changed regarding file opening/reading
since 2.x or whereabout to look at?

Thanks

bye  Fabi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Include not working on samba share
  2009-01-09 11:18 ` Fabian Cenedese
@ 2010-03-17  8:28   ` Fabian Cenedese
  0 siblings, 0 replies; 3+ messages in thread
From: Fabian Cenedese @ 2010-03-17  8:28 UTC (permalink / raw)
  To: gcc-help

At 12:17 09.01.2009 +0100, Fabian Cenedese wrote:
>At 15:27 05.01.2009 +0100, Fabian Cenedese wrote:
>>We have some projects that are C++ with header files and can be compiled
>>with no problems on a local drive. The used gcc is quite old (2.96.x) and
>>built with cygwin, running on windows.
>>
>>However if the whole project is moved from the local drive to a share
>>(samba, probably also windows) the compilation may fail with
>>various errors. The main problem seems to be that include files are not
>>read properly. They are found (gcc emits an error if the name is wrong)
>>but the content seems not to be read. Even if such a problematic
>>header file contains crap it is not mentioned by gcc. To make things
>>worse is that on different computers the compilation may fail differently
>>or even work without problems.
>
>I have now tried gcc 3.4.3 and 4.1 with the same cygwin1.dll (1.5).
>They both can compile the project without showing these errors. Does
>anyone know what could have changed regarding file opening/reading
>since 2.x or whereabout to look at?

I'm reviving this old thread in case somebody is looking for a solution.

cpp.exe has a mechanism to ensure that the same file will not be included
multiple times. It identifies "the same file" by remembering the device-id
and inode-number of each already included file. Unfortunately, when the
above problem happens, the inode numbers of different files are equal!
That's why cpp.exe did just not include the second file and also didn't
report any error...

The issue about the non-unique inode numbers is described here:
http://www.cygwin.com/cygwin-ug-net/highlights.html

"On file systems which don't support unique persistent file IDs (FAT, older Samba shares) the inode number for a file is calculated by hashing its full Win32 path. The inode number generated by the stat call always matches the one returned in d_ino of the dirent structure. It is worth noting that the number produced by this method is not guaranteed to be unique. However, we have not found this to be a significant problem because of the low probability of generating a duplicate inode number."

As gcc 3 and 4 don't have this problem they may do additional or
different checks to not include a file twice.

bye  Fabi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-17  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-05 14:28 Include not working on samba share Fabian Cenedese
2009-01-09 11:18 ` Fabian Cenedese
2010-03-17  8:28   ` Fabian Cenedese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).