I have the following setup, c++ project with remote cache defined in shared directory (remote<DirectoryBuildCache) . I have the following use case which fails:
- user1 builds a projects and upload the cache
- user2 makes his changes in source file and trying to build, fails with linker error of multiple definitions of main, as I see two object files are created for same source file and linked for some reason.
Could someone explain this behavior?
Thanks for posting this question here. I suspect something may have to do with file system case sensitivity. Could you give more information on the your scenario such as what’s the operating system of both user1 and user2. Are both object files exactly the same or does any letter are of different case (e.g.
Foo.o)? Finally, could you provide a small sample that reproduce the issue?
I found the root cause of the problem. I used same source files for both users. In gradle source files was set as absolute paths to the same location. This is incorrect use case, so sorry for bothering.
No worries. Just to be clear, it’s not an issue with Gradle? Thanks for the clarification.
I would say no, there is no issue with Gradle