The problem seems to happen in cc1. I tried this with strace in
- Karmic, local mount
- Karmic, cifs mount
- 9.04, cifs mount
and the only obvious difference I notice is the huge inode number in the Karmic/cifs combination...

I added a bit of instrumentation to libcpp/files.c (where the error happens) and observed that the size of st_ino in struct stat is 4. This indicates that the cpp1 program wasn't built with -D_FILE_OFFSET_BITS=64.

I may well not have built cpp1 the same way it's built in Karmic, but in my case I again got the "Value too large..." error, and in my case the cause was definitely the huge inode number.

So, I suggest the problem is one of
- A problem in gcc
- A problem in the way gcc is built for Ubuntu
- Maybe samba isn't supposed to be making these huge inode numbers.

I purged karmics samba 3.4.0 and installed samba 3.2.2 I used in Jaunty (which worked just fine). I also tried older gcc. Same problem still occurs in both cases. I'm still a rookie with linux, but I think I got it right.

This kept happening to me so what i did was i wrote a script that moved the source code to the tmp directory and compiled it to the shared directory so it could be access in the network. I do hope gcc adds large file support =(.