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 absl log flags being stripped #1340

Merged
merged 5 commits into from
Feb 14, 2024

Conversation

joeyparrish
Copy link
Member

According to a comment in
packager/third_party/abseil-cpp/source/absl/log/CMakeLists.txt, many linkers will strip the contents of absl::log_flags because its symbols symbols are only used in a global constructor, and that for now, clients should link using
$<LINK_LIBRARY:WHOLE_ARCHIVE,absl::log_flags>.

Closes #1325

According to a comment in
packager/third_party/abseil-cpp/source/absl/log/CMakeLists.txt, many
linkers will strip the contents of absl::log_flags because its symbols
symbols are only used in a global constructor, and that for now,
clients should link using
$<LINK_LIBRARY:WHOLE_ARCHIVE,absl::log_flags>.

Closes shaka-project#1325
@joeyparrish
Copy link
Member Author

I believe I have the docker builds fixed with the latest commit. PTAL!

@cosmin
Copy link
Contributor

cosmin commented Feb 14, 2024

The windows shared build is failing with a

LINK : fatal error LNK1104: cannot open file 'D:\a\shaka-packager\shaka-packager\build\packager\Release\libpackager.lib' [D:\a\shaka-packager\shaka-packager\build\packager\libpackager_static.vcxproj]

@joeyparrish
Copy link
Member Author

The windows shared build is failing with...

I've seen that before, and it doesn't make much sense, unless there is a race condition in the parallel build. I think if I re-run the failed job, it will pass, which could also point toward timing.

@cosmin
Copy link
Contributor

cosmin commented Feb 14, 2024

It's not clear why the shared windows build is trying to build libpackager static.

@joeyparrish
Copy link
Member Author

It's not clear why the shared windows build is trying to build libpackager static.

It always builds static, but only builds shared in the shared configuration. This is ever since #1293, but I don't remember the reasoning behind it.

@joeyparrish
Copy link
Member Author

I'm going to file a new issue to look into this build flake, and I'll mention changes to the target structure as an option.

@joeyparrish joeyparrish merged commit 1f71fa0 into shaka-project:main Feb 14, 2024
31 checks passed
@joeyparrish joeyparrish deleted the fix-absl-log-flags branch February 14, 2024 21:59
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Apr 14, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logging no longer works?
2 participants