memsharded / conan-protobuf

Google protocol buffers conan package
MIT License
1 stars 17 forks source link

Upload fails on Linux when shared is true #13

Open osechet opened 7 years ago

osechet commented 7 years ago

As mentioned in conan-io/conan#919, the upload fails on Linux when the shared option is true.

Change 'upload_repo' user from None (anonymous) to osechet
Uploading Protobuf/3.3.0@memsharded/testing
Uploading conanmanifest.txt                                           
[==================================================]                  
Uploaded conan recipe 'Protobuf/3.3.0@memsharded/testing' to 'upload_repo': https://api.bintray.com/conan/osechet/Conan
Uploading package 1/2: 9dc468f1c6797ce318a916e9e85c89fb15cd3e47
Package integrity OK!                                                 
Requesting upload permissions...Done!                                 
Uploading conanmanifest.txt                                           
[==================================================]                  
Uploading conaninfo.txt                                               
[==================================================]                  
Uploading conan_package.tgz                                           
[==================================================]                  
Uploading package 2/2: c9141d18ebeb1f2ce6a80c78c8ea06c46125d0ca
Checking package integrity...                                         
WARN: Mismatched checksum 'bin/.libs/lt-protoc' (manifest: None, file: a5af685d3ba9d9e6dce3dd24e860a47a)
ERROR: Cannot upload corrupted package 'Protobuf/3.3.0@memsharded/testing:c9141d18ebeb1f2ce6a80c78c8ea06c46125d0ca'
Traceback (most recent call last):
  File "build.py", line 14, in <module>
    builder.run()
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/conan/packager.py", line 235, in run
    self.upload_packages()
  File "/home/travis/virtualenv/python3.6.1/lib/python3.6/site-packages/conan/packager.py", line 296, in upload_packages
    raise Exception("Error uploading")
Exception: Error uploading

The problem is related to a lt-protoc file created in a hidden directory. The file is not referenced in the manifest but conan tries to upload it.

osechet commented 7 years ago

I just made some tests: it seems lt-protoc file is not created when the package is tested but at the creation of the package. Using the local protoc doesn't fix the issue. I changed the package to use make install to copy files to the package directory instead of using the package step and it works.

osechet commented 7 years ago

After more tests, it isn't that simple. There is a bug with the install target in protobuf 3.3.0 on Windows. Some include files are not installed: google/protobuf#3047. The issue is fixed with v3.3.1 but it means it may be impossible to release a 3.3.0 conan package with the make install fix.