-
Notifications
You must be signed in to change notification settings - Fork 513
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
Switch to CMake and git submodules #1047
Comments
Oh, and of course, some of the old Python build scripts in our old forks of Chromium repos will only run with Python 2, which is not even installed by default any more in many places. |
In a pure python3-environment, such as my workstation at the office, I can't even run gyp any more. So replacing gyp is a high priority in this list. Replacing gclient with submodules is relatively easy and straightforward. See joeyparrish@f4d560e Some of those deps could be dropped by the time this work is complete (such as gyp, packager/build). |
@joeyparrish I managed to fix some problems with generating CMakeLists.txt from gyp. But still - I can tell how to fix locally some files in order to generate CMakeLists.txt. And by the way - I use Python3 with Shaka gyp and it works (AFAIK I had to fix only about two places regarding py2->py3) |
@zdanek, thank you! You shouldn't need to make permanent changes to gyp. You could make temporary changes, generate CMakeLists.txt from gyp, then clean up CMakeLists.txt by hand and commit it. The goal is to get rid of gyp, so it should be fine to hack it up as needed if it is easier than writing CMakeLists.txt completely from scratch. |
@joeyparrish I got it. I was using generated CMakeLists.txt for CLion to edit files and have includes working properly. It was OK but I never compiled Shaka with make. I always used command line and ninja like everybody. Now I tried to builld it and it failed. There are a few problems:
Biggest problem is that it does not compile. That means, some paths are messed up and some includes are bad defined so inside the source files includes doesn't work. If there's no other volunteer I might spend some evenings trying to clean it up and/or rethink better approach. Maybe it will need more people to help to split it into sub-works to speed it up and not to be so boring and arduous task :) I will try to dig into it tomorrow. First task is to build Shaka using cmake. |
I see. Thank you for the update! It seems there isn't a better solution right now than manually creating the build files for cmake. I agree that doing it one library/dependency at a time is probably best. |
I have begun the process of writing CMake files by hand for each library. |
As part of this work, |
@joeyparrish regarding to write a new CMake files by somebody from the community - I was thinking about it as I wrote 3 months ago but as you currently see it's quite absorbing and in my opinion must be done by somebody who is backed by bigger company that pays for the time spent. I wouldn't have enough time to do it. The time that I need to spend on my current job. |
Well, I only get to spend one day a week on it, so it will take a long time. Thankfully, @kqyang has offered to do code reviews as I make progress. I'll start merging partial build system work to a branch in stages. If anyone is interested, they can follow along here. I'll tag this issue with each PR, and you can play with the branch I'm creating and provide feedback. So far, I've got 4 internal libraries building, and I've ripped out Chromium build tools, Chromium base, and gflags. I've updated curl, boringssl, gmock, and gtest. I've added abseil and glog. Those 4 internal libraries build, including their tests, but I'm stuck on crashing tests in the file library. |
Although local problems (crashing tests) this is good news. Getting rid of Chromium build tools is my dream since 1.5 years :) |
Everything we have so far in PR #1072 is building and passing all tests. If anyone wants to help write CMakeLists for additional libraries once that PR lands, I would be very happy to have the help! I think we could easily divide up the work by folder. Please let me know if you are interested! |
Rebasing #1155 and applying some fixes. Had to comment out the `mpd_notify_muxer_listener_unittest` because it depends on `MockMpdNotifier` from `mpd/base` which has not been ported yet. Can bring this test back once that has been ported. Related to #1047 --------- Co-authored-by: Carlos Bentzen <carlos.bentzen@bitmovin.com> Co-authored-by: Joey Parrish <joeyparrish@google.com>
Issue shaka-project#1047 (cmake) Issue shaka-project#346 (absl)
Hello everyone, Thanks for the update. I want to know what's the progress now ! |
We're getting very close to merging |
That's great! Well done and thanks all |
Related to issue #1047 After this it should be possible to build a working `packager` application from the `cmake` branch. Some further logging improvements may be needed to get full parity with the `main` branch in terms of ability to do verbose debug logging, but other than that everything is expected to work.
The |
When will the cmake branch be available? Thanks! |
You can check out the |
Documentation in the |
Great effort thanks! |
I was able to build shaka-packager with cmake, but i'm getting a weird behavior:
doesnt seem to generate the mpd file containing the segments:
may you guys check if it is reproducible on your side? Thanks |
This work was done over ~80 individual commits in the `cmake` branch. BEGIN_COMMIT_OVERRIDE feat!: Replace gyp build system with CMake Closes shaka-project#1047 feat!: Update all dependencies fix: Fix Python 3.10+ compatibility in scripts feat!: Drop Python 2 support in all scripts feat!: Replace glog with absl::log, tweak log output and flags feat: Add install target to build system feat: Respect the file mode for HttpFiles (shaka-project#1081) feat: Move all third-party deps into git submodules (shaka-project#1083) fix: Fix local files with UTF8 names (shaka-project#1246) fix: Fix build on FreeBSD (shaka-project#1287) fix: Fix clang build (shaka-project#1288) fix: Fix various build issues on macOS fix: Fix various build issues on Windows END_COMMIT_OVERRIDE
The use of our ancient chromium build infrastructure has been increasingly problematic. We use old versions of chromium components so that they are compatible with gyp (gyp has been removed upstream), but this means also an older version of depot_tools, and lack of support for newer OSes, SDKs, and Linux distros.
We should replace gyp with CMake, gclient with submodules, and depot_tools should go away completely. Dependencies (like protobuf, etc) should be updated to the latest versions, and if possible, system versions should be used instead of building from source.
I'm not sure what order these should be done in, or how much work they will be. I'll experiment with it a bit to figure that out, but I may or may not be the one to finish the work. Volunteers are welcome!
The text was updated successfully, but these errors were encountered: