I've seen that issue since a started to use osxcross: on non-local file systems, libtool (ranlib) fails by not being able to rename the temporary library into the original name (see libtool.c, #3173). It forced me to always build on local fs. I decided to give it a better look and I think I've found the issue:
In cctools/libstuff/ofile.c, the ofile_unmap function does not do a munmap to free the memory-mapping, so the file is still considered busy on the fs and cannot be renamed. It works fine on local fs as the system can honor the rename (later) but not for other type of fs.
I've seen that issue since a started to use osxcross: on non-local file systems, libtool (ranlib) fails by not being able to rename the temporary library into the original name (see libtool.c, #3173). It forced me to always build on local fs. I decided to give it a better look and I think I've found the issue:
In cctools/libstuff/ofile.c, the ofile_unmap function does not do a munmap to free the memory-mapping, so the file is still considered busy on the fs and cannot be renamed. It works fine on local fs as the system can honor the rename (later) but not for other type of fs.
The fix is simply to add the munmap as follows:
I'm not 100% sure how to do a PR as I don't understand for now where the file comes from exactly