Propably problem is related to underlying filesystem at samba server. By default rsync tries to identify similarity of files using modification time and filesize attributes and it failes over samba. Please use -c option with rsync to use file checksums to identify similarity of files.
Same reason than previous problem, gcc compiler get wrong modification times from samba when compiling files.