shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
1.9k stars 496 forks source link

build: Fix absl log flags being stripped #1340

Closed joeyparrish closed 4 months ago

joeyparrish commented 4 months ago

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

joeyparrish commented 4 months ago

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

cosmin commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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

joeyparrish commented 4 months ago

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 https://github.com/shaka-project/shaka-packager/pull/1293, but I don't remember the reasoning behind it.

joeyparrish commented 4 months ago

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.