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

[build] Fix openssl static linking error #2369

Merged

Conversation

wangyoucao577
Copy link
Contributor

@wangyoucao577 wangyoucao577 commented Jun 11, 2022

  • Upgrade OPENSSL_USE_STATIC_LIBS as an option to not only affects windows, but also pkg-config found openssl;
  • Remove useless --OPENSSL_USE_STATIC_LIBS=TRUE in android script since it doesn't have any effects;
  • Usage: PKG_CONFIG_PATH=<YOUR_STATIC_SSL_PKGCONFIG_PATH> cmake .. -DENABLE_STATIC=ON -DENABLE_SHARED=OFF -DUSE_OPENSSL_PC=ON -DOPENSSL_USE_STATIC_LIBS=ON

More analysis see #1172 (comment)

Closes #1172

@wangyoucao577 wangyoucao577 changed the title Fix openssl static linking error [build] Fix openssl static linking error Jun 11, 2022
@codecov-commenter

This comment was marked as off-topic.

@wangyoucao577
Copy link
Contributor Author

Both coverage decrease and the Travis CI build fail don't seem to make sense since changes in this PR doesn't change any code and any default behavior. Anyone can help to check it?

@maxsharabayko maxsharabayko added this to the v1.5.0 milestone Jun 13, 2022
@maxsharabayko maxsharabayko added [build] Area: Changes in build files Type: Bug Indicates an unexpected problem or unintended behavior labels Jun 13, 2022
@@ -17,7 +17,7 @@ done

cd $SRC_DIR
./configure --use-enclib=$ENC_LIB \
--use-openssl-pc=OFF --OPENSSL_USE_STATIC_LIBS=TRUE \
Copy link
Collaborator

Choose a reason for hiding this comment

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

@sergeiignatov Could you please verify this change?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, merging as is. We can have a follow-up fix later if needed. At least Android CI build is passing.

CMakeLists.txt Outdated Show resolved Hide resolved
configure-data.tcl Outdated Show resolved Hide resolved
docs/build/build-options.md Outdated Show resolved Hide resolved
docs/build/build-options.md Outdated Show resolved Hide resolved
wangyoucao577 and others added 4 commits June 13, 2022 20:43
Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
@maxsharabayko maxsharabayko merged commit 060c0d1 into Haivision:master Jun 15, 2022
@maxsharabayko
Copy link
Collaborator

@wangyoucao577
Thank you for this great PR!
I had to squash-merge it into one commit to avoid having 8 commits addressing the same change. But thank you for following the contribution guide and naming those commits properly!

@wangyoucao577 wangyoucao577 deleted the feature/openssl-static-linking branch June 16, 2022 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[build] Area: Changes in build files Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Linux: static linking apps fails
3 participants