Skip to content
This repository was archived by the owner on Jun 24, 2020. It is now read-only.

Fix protobuf.patch to support protobuf_BUILD_PROTOC_BINARIES #34

Closed
wants to merge 1 commit into from

Conversation

CAMOBAP
Copy link

@CAMOBAP CAMOBAP commented Mar 9, 2019

Patch updated based on PR protocolbuffers/protobuf#3878

Tested locally for:

  • Cross-build from 'Macos:x86_64' to 'Android:armv7hf'

@CAMOBAP
Copy link
Author

CAMOBAP commented Mar 9, 2019

Also according to conan search protobuf -r all

Remote 'conan-center':
protobuf/3.5.1@bincrafters/stable
protobuf/3.5.2@bincrafters/stable
protobuf/3.6.1@bincrafters/stable

testing/3.3.0 not published, is this ok to publish it or we cannot publish testing versions?

@SSE4
Copy link
Member

SSE4 commented Mar 10, 2019

@CAMOBAP795 we're not publishing testing versions. I am changing the base to use stable instead.

@SSE4 SSE4 changed the base branch from testing/3.3.0 to stable/3.3.0 March 10, 2019 12:06
@CAMOBAP
Copy link
Author

CAMOBAP commented Mar 10, 2019

@SSE4 thanks for explanation BTW is there a way to do conan export from github directly? Or the only way to include testing/* as git submodule (in own project) and do conan export from local FS?

P.S. I have asked the same question here

@SSE4
Copy link
Member

SSE4 commented Mar 10, 2019

currently it's not possible to export straight from GitHub.
so you need to get recipe somehow, e.g. download it from GitHub or include as Git submodule.

@SSE4
Copy link
Member

SSE4 commented Mar 10, 2019

it also might be possible to write conan hook which will be able to fetch sources from GitHub as pre_export, but I am not sure.

@SSE4
Copy link
Member

SSE4 commented Mar 11, 2019

mac builds failed:

Traceback (most recent call last):
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/conans/errors.py", line 24, in conanfile_exception_formatter
    yield
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/conans/client/cmd/build.py", line 59, in build
    conan_file.test()
  File "/Users/travis/build/bincrafters/conan-protobuf/test_package/conanfile.py", line 19, in test
    self.run(bin_path, run_environment=True)
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/conans/model/conan_file.py", line 267, in run
    raise ConanException("Error %d while executing %s" % (retcode, command))
conans.errors.ConanException: Error 11 while executing DYLD_LIBRARY_PATH="/Users/travis/.conan/data/protobuf/3.3.0/bincrafters/testing/package/48662b768df6bdcb6584e028fed6c4d26482c50c/lib" /Users/travis/build/bincrafters/conan-protobuf/test_package/build/2efa9ad62c2f5cb83cef8d83c1d3ebfe5b81fc1c/bin/test_package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "build.py", line 10, in <module>
    builder.run()
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/cpt/packager.py", line 449, in run
    self.run_builds(base_profile_name=base_profile_name)
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/cpt/packager.py", line 529, in run_builds
    r.run()
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/cpt/runner.py", line 99, in run
    test_folder=self._test_folder)
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/conans/client/conan_api.py", line 93, in wrapper
    return f(*args, **kwargs)
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/conans/client/conan_api.py", line 385, in create
    test_build_folder, test_folder, conanfile_path)
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/conans/client/cmd/create.py", line 41, in create
    test_build_folder=test_build_folder)
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/conans/client/cmd/test.py", line 46, in install_build_and_test
    install_folder=test_build_folder, test=str(reference))
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/conans/client/cmd/build.py", line 59, in build
    conan_file.test()
  File "/Users/travis/.pyenv/versions/3.7.1/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/travis/.pyenv/versions/conan/lib/python3.7/site-packages/conans/errors.py", line 30, in conanfile_exception_formatter
    raise ConanExceptionInUserConanfileMethod(msg)
conans.errors.ConanExceptionInUserConanfileMethod: protobuf/3.3.0@bincrafters/testing (test package): Error in test() method, line 19
	self.run(bin_path, run_environment=True)
	ConanException: Error 11 while executing DYLD_LIBRARY_PATH="/Users/travis/.conan/data/protobuf/3.3.0/bincrafters/testing/package/48662b768df6bdcb6584e028fed6c4d26482c50c/lib" /Users/travis/build/bincrafters/conan-protobuf/test_package/build/2efa9ad62c2f5cb83cef8d83c1d3ebfe5b81fc1c/bin/test_package
The command "./.ci/run.sh" exited with 1.

@CAMOBAP
Copy link
Author

CAMOBAP commented Mar 11, 2019

@SSE4 let me have a look

@CAMOBAP
Copy link
Author

CAMOBAP commented Mar 19, 2019

@SSE4 I have tried to run tests locally, is there a way to restrict test configuration, for instance I try ./.ci/run.sh and in logs I see:

+--------+-------------+--------------------+--------------+-------------------+-------------------+
| arch   | compiler    |   compiler.version | build_type   | compiler.libcxx   | protobuf:shared   |
|--------+-------------+--------------------+--------------+-------------------+-------------------|
| x86_64 | apple-clang |                9   | Release      | libc++            | True              |
| x86_64 | apple-clang |                9   | Debug        | libc++            | True              |
| x86_64 | apple-clang |                9   | Release      | libc++            | False             |
| x86_64 | apple-clang |                9   | Debug        | libc++            | False             |
| x86_64 | apple-clang |                9.1 | Release      | libc++            | True              |
| x86_64 | apple-clang |                9.1 | Debug        | libc++            | True              |
| x86_64 | apple-clang |                9.1 | Release      | libc++            | False             |
| x86_64 | apple-clang |                9.1 | Debug        | libc++            | False             |
| x86_64 | apple-clang |               10   | Release      | libc++            | True              |
| x86_64 | apple-clang |               10   | Debug        | libc++            | True              |
| x86_64 | apple-clang |               10   | Release      | libc++            | False             |
| x86_64 | apple-clang |               10   | Debug        | libc++            | False             |
+--------+-------------+--------------------+--------------+-------------------+-------------------+

I don't have compiler below 10, how can I modify build.py to restrict compiler version?

@SSE4
Copy link
Member

SSE4 commented Mar 19, 2019

@CAMOBAP795 with environment variables, e.g. CONAN_BUILD_TYPES=Release CONAN_APPLE_CLANG_VERSIONS=10 ./.ci/run.sh
more info here: https://github.com/conan-io/conan-package-tools

@uilianries
Copy link
Member

Why not splitting both protoc and libprotoxxx ?

@uilianries
Copy link
Member

I can reproduce the same error, it only occurs when build_type=Debug and shared=True. However, when running otool the result is the same:

otool -L /Users/user153599/Development/bincrafters/conan-protobuf/test_package/build/8aaadb56941b22c8791e1829fb851f07504cae2c/bin/test_package 
/Users/user153599/Development/bincrafters/conan-protobuf/test_package/build/8aaadb56941b22c8791e1829fb851f07504cae2c/bin/test_package:
	libprotobuf-lited.dylib (compatibility version 0.0.0, current version 0.0.0)
	libprotobufd.dylib (compatibility version 0.0.0, current version 0.0.0)
	libprotocd.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants