Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use prebuilt MesaLink package in travis CI #878

Merged
merged 5 commits into from Aug 15, 2019

Conversation

ymjing
Copy link

@ymjing ymjing commented Aug 5, 2019

@zyearn

This PR fixes a build issue in https://travis-ci.org/apache/incubator-brpc/jobs/536646641 due to Rust toolchain upgrades.

@ymjing
Copy link
Author

ymjing commented Aug 5, 2019

All CI tasks passed except this one: https://travis-ci.org/apache/incubator-brpc/jobs/568078842
Looks like a problem with Travis itself. Could anyone restart this task?

.travis.yml Outdated
- PURPOSE=compile USE_MESALINK=yes
- PURPOSE=unittest USE_MESALINK=yes
- PURPOSE=compile-with-cmake USE_MESALINK=yes
- PURPOSE=compile-with-bazel USE_MESALINK=yes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USE_MESALINK option seems not working in cmake and bazel. It is still using openssl.

Copy link
Author

@ymjing ymjing Aug 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't updated the build scripts for cmake and bazel. Let me implement the changes today and push to this PR. Let me know if you think a seperate PR for build scripts would be better.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many compilation options, such as with-glog, with-thrift. Just compiling with mesalink in travis seems not a general way to test all options. I think it may be a better way to add one specific PURPOSE called compile-with-all-options and we can turn on all the options here, not just mesalink.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same feeling; orthogonal build options bloat CI tasks.

I'm not familiar with the options other than USE_MESALINK; and it seems irrelevant to this PR which only adddresses a previous MesaLink build issue.

So maybe we merge this PR first; and create a new issue/PR for the proposed compile-with-all-options PURPOSE.

CMakeLists.txt Outdated
@@ -167,6 +182,7 @@ set(DYNAMIC_LIB
${THRIFTNB_LIB}
${OPENSSL_LIBRARIES}
${OPENSSL_CRYPTO_LIBRARY}
${MESALINK_LIB}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if WITH_MESALINK is defined but openssl is in system and still be found? In the current cmake, brpc may still use openssl?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MesaLink provides SSL/TLS but not crypto; so OpenSSL's libcrypto is still linked.

Actually, either ${OPENSSL_LIBRARIES} or ${OPENSSL_SSL_LIBRARY} is just redundant in the cases of MesaLink builds. No code uses libssl; therefore the generated libbrpc.so does not link libssl.

ldd output/lib/libbrpc.so

yields the following result:
https://paste.ubuntu.com/p/bCMkRJyFK9/

So you can see there's no libssl linked.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you think this is not preferred for readability, I have a quickfix using CMake's list(APPEND). Looking forward to your reply.

Copy link
Member

@zyearn zyearn Aug 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your detailed explanation. In any case either ${OPENSSL_LIBRARIES} or ${MESALINK_LIB} is used, it's enough to link just one of them. So it may be more clear if we remove ${OPENSSL_LIBRARIES} when mesalink is used.

@ymjing
Copy link
Author

ymjing commented Aug 9, 2019

@ymjing
Copy link
Author

ymjing commented Aug 14, 2019

Any comments on the new commits pushed 5 days ago?

@jamesge jamesge merged commit 024c969 into apache:master Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants