From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5550 invoked by alias); 17 Mar 2010 07:51:36 -0000 Received: (qmail 5532 invoked by uid 22791); 17 Mar 2010 07:51:35 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from ms9.webland.ch (HELO ms9smtp.webland.ch) (92.43.217.109) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Mar 2010 07:51:30 +0000 Received: from macserver.private ([84.74.41.8]) by ms9smtp.webland.ch (Webland Mail Server v10.0) with ASMTP id ZKQ44533 for ; Wed, 17 Mar 2010 08:51:33 +0100 Received: from localhost (localhost [127.0.0.1]) by macserver.private (Postfix) with ESMTP id F006D66037E; Wed, 17 Mar 2010 08:51:23 +0100 (CET) Received: from macserver.private ([127.0.0.1]) by localhost (macserver.private [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yYyB4nFfH5gU; Wed, 17 Mar 2010 08:51:19 +0100 (CET) Received: from fabi-PC.indel.ch (unknown [192.168.1.53]) by macserver.private (Postfix) with ESMTP id 34DE4660373 for ; Wed, 17 Mar 2010 08:51:19 +0100 (CET) Message-Id: <5.2.0.9.1.20100317084621.046a1ac8@localhost> X-Sender: cenedese@localhost Date: Wed, 17 Mar 2010 08:28:00 -0000 To: gcc-help@gcc.gnu.org From: Fabian Cenedese Subject: Re: Include not working on samba share In-Reply-To: <5.2.0.9.1.20090109121534.01ebdd60@localhost> References: <5.2.0.9.1.20090105151301.01edf400@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00214.txt.bz2 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