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
2.01k stars 513 forks source link

build fails #1318

Closed ibobak closed 9 months ago

ibobak commented 11 months ago

System info

Operating System: Ubuntu 22.04 Shaka Packager Version: I am on a master branch, commit 3e71302 gcc version: gcc (GCC) 13.1.0
cmake version: 3.22.1

Issue and steps to reproduce the problem

I am running two commands

cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel

and getting this:

[396/1221] Building C object packager/third_party/libxml2/source/CMakeFiles/LibXml2.dir/threads.c.o
FAILED: packager/third_party/libxml2/source/CMakeFiles/LibXml2.dir/threads.c.o
/usr/bin/cc -D_REENTRANT -I/home/ihor/github/shaka-packager/packager/.. -I/home/ihor/github/shaka-packager/package
r/../include -I/home/ihor/github/shaka-packager/build/packager/third_party/libxml2/source -I/home/ihor/github/shak
a-packager/packager/third_party/libxml2/source/include -O3 -DNDEBUG -fPIC -Wall -Wextra -Werror -Wno-unknown-warni
ng-option -Wno-format-extra-args -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-format-truncation -Wno-ar
ray-bounds -MD -MT packager/third_party/libxml2/source/CMakeFiles/LibXml2.dir/threads.c.o -MF packager/third_party
/libxml2/source/CMakeFiles/LibXml2.dir/threads.c.o.d -o packager/third_party/libxml2/source/CMakeFiles/LibXml2.dir
/threads.c.o -c /home/ihor/github/shaka-packager/packager/third_party/libxml2/source/threads.c
/home/ihor/github/shaka-packager/packager/third_party/libxml2/source/threads.c: In function ‘xmlInitThreads’:
/home/ihor/github/shaka-packager/packager/third_party/libxml2/source/threads.c:875:28: error: the comparison will
always evaluate as ‘true’ for the address of ‘pthread_equal’ will never be NULL [-Werror=address]
  875 |             (pthread_equal != NULL) &&
      |                            ^~
In file included from /usr/include/features.h:486,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from /home/ihor/github/shaka-packager/packager/third_party/libxml2/source/libxml.h:54,
                 from /home/ihor/github/shaka-packager/packager/third_party/libxml2/source/threads.c:11:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/13.1.0/include-fixed/pthread.h:1349:1: note: ‘pthread_equal’ declared here
 1349 | __NTH (pthread_equal (pthread_t __thread1, pthread_t __thread2))
      | ^~~~~
At top level:
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlie
r diagnostics
cc1: all warnings being treated as errors
[485/1221] Building CXX object packager/third_party/goo...urce/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
ninja: build stopped: subcommand failed.
mawashii commented 11 months ago

I can confirm I had the exact same issue on a Debian GNU/Linux 12 (bookworm) system with cmake version 3.25.1, ninja version 1.11.1, gcc version 12.2.0

I managed to get the main branch to build on a Ubuntu 20.04.6 LTS system with cmake version 3.16.3, ninja version 1.10.0, gcc version 9.4.0

Not sure which part of the equation made the difference here but the build finished properly on the Ubuntu host, maybe that helps you in the meantime.

joeyparrish commented 9 months ago

@ibobak, @mawashii, can you please test again with the latest from main? There have been many changes since the commit you referenced from December 1st, including upgrades to zlib, protobuf, and absl, and a change to stop treating warnings as errors in third_party dependencies. My hope is that one of these many changes has resolved the issue. If not, we can try an update to libxml2.

cosmin commented 9 months ago

The change to not treat warning as errors in 3rd party libraries should have resolved this issue.

github-actions[bot] commented 9 months ago

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.