conan icon indicating copy to clipboard operation
conan copied to clipboard

[question] Revision mismatch between OSes

Open brosmar opened this issue 1 year ago • 1 comments

What is your question?

I am using conan 1.60.1 with revisions enabled. I am supporting multiple platforms. I am storing artifacts in the JFrog artifactory.

Artifacts are stored here: https://myartifactory.com/ui/repos/tree/General/xentric-conan-dev-local/master/SYCA_Casting/0.4.7/dev/250c0c08c53af2d9364c14c084f35280/package/485579f82c8813e2e25fbe180219a4ccf73be7b9/09b65d5aa6ae24acb652feefd8de99d5/conan_package.tgz

Is the following naming correct?

A Recipe-HASH: 250c0c08c53af2d9364c14c084f35280 B Package Revision-HASH: 485579f82c8813e2e25fbe180219a4ccf73be7b9 C Binary Revision-HASH: 09b65d5aa6ae24acb652feefd8de99d5

When I am building the module SYCA_Casting on different platforms the A hash is changing when I am compiling the same sources on different platforms. I am asking this because when I am building an package on paltform1 which is using SYCA_Casting/0.4.7@master/dev the revision is always downloaded from the newest A-HASH. When the compile for the module was done on a different platform2 and uploaded just before the compile of module fails because SYCA_Casting/0.4.7@master/dev for platfom1 not found in the repository because the version has an old A-Hash.

Have you read the CONTRIBUTING guide?

  • [ ] I've read the CONTRIBUTING guide

brosmar avatar May 08 '24 15:05 brosmar

Hi @brosmar

Thanks for your question.

A Recipe-HASH: 250c0c08c53af2d9364c14c084f35280 B Package Revision-HASH: 485579f82c8813e2e25fbe180219a4ccf73be7b9 C Binary Revision-HASH: 09b65d5aa6ae24acb652feefd8de99d5

The B is called package_id not revision, and it is more or less the hash of the configuration (profile + dependencies) The recipe-revision (A) and package-revision (C) are the hashes of the contents, the actual files hashes of the package recipe and package binary respectively.

When I am building the module SYCA_Casting on different platforms the A hash is changing when I am compiling the same sources on different platforms. I am asking this because when I am building an package on paltform1 which is using SYCA_Casting/0.4.7@master/dev the revision is always downloaded from the newest A-HASH. When the compile for the module was done on a different platform2 and uploaded just before the compile of module fails because SYCA_Casting/0.4.7@master/dev for platfom1 not found in the repository because the version has an old A-Hash.

The most common cause for this would be a discrepancy in the sources. And one of the most common causes is the different line endings (LF vs CRLF in windows). This would be summarized in https://docs.conan.io/2/knowledge/faq.html#error-obtaining-different-revisions-in-linux-and-windows, the recommendation is to use the same line-endings everywhere (LF), it is easier, more consistent and all editors even in Windows including Notepad, support LF.

Please let me know if this helps.

memsharded avatar May 08 '24 16:05 memsharded

Does this help @brosmar ?

Maybe we can close the ticket as responded?

memsharded avatar Jul 26 '24 16:07 memsharded

Thank you verry muh for the update. This solved my problems. You can close the ticket.

brosmar avatar Aug 01 '24 07:08 brosmar