Hardware: DELL Optiplex GX1, 256Mb RAM, running RH Linux 6.0 using both the stock 2.2.5-15 kernel and the latest 2.2.11 kernel. IBM RS6000 3AT running AIX 4.2.1 1) RS6000 serves an NFS file system to the Linux box. NFS file system contains Fortran source code for a modelling program. 2) Compile the source code in 4 scenarios - on the linux box using the PGI fortran 90 compiler and ECGS for one .c file. a) Source compiled to .o files on NFS filesystem. Executable written to NFS file system. b) Source compiled to .o files on NFS file system. Executable written to local filesystem on Linux box. c) Source compiled to .o files on local file system. Executable written to local file system. d) Source compiled to .o files on local file system. Executable written to NFS file system. 3) Results: a) All of the .o files compiled to either the local or NFS file systems compare as Identical. b) Executables that are written on the NFS file system do NOT work. They generate an error: Memory Fault (core dump). c) Executables that are written to the local file system from either local or NFS .o files work correctly. d) A byte by byte comparison of the executable files shows that they only differ by about 12k bytes out of 4Mb. The difference is that a few zeroes have crept into the corrupt executable image. Usually just one or two here and there that shift the binary code by a byte or two for sections of the executable. The whole 12k of appears to be caused by a handful of corruptions where these extra zeroes offset the executable code for a section. 4) Conclusion: It appears as if the linker is having some sort of problem with writing a complete executable on an NFS mounted file system. Compile and link to a local drive from either local or NFS .o works correctly. Compile and link to an NFS file system from either local or NFS .o files generates a corrupt executable. This could be related to the IBM NFS implementation - but at the moment looks more like a linker/NFS problem of some sort. At least one other report of a problem with similar symptoms on similar hardware has been reported on the comp.os.linux.* newsgroups but no solution seems to be available. Thanks for any help or suggestions - this problem makes it difficult to use NFS in this case. Cheers, David
The problem is not with the linker but with NFS, probably on the server machine. Have you checked for AIX patches? There's a similar problem on Solaris, and the fix was to apply a patch to the Solaris server.
I think I've heard of a related problem that was resolved by a patch to AIX. I think that if you don't need file locking, you can tell AIX to export the filesystem to Linux as an NFSv2 filesystem to get the same result.
As Alan has emailed that this is definitely a known bug in AIX, we're closing it.