-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[RFC] CMake buildsystem QoL improvements ? #4284
Comments
These sorts of improvements are generally welcome, provided they don't break existing usage. @steven-johnson is the person who knows the most about the existing cmake-based build. I generally avoid it and just use the makefiles. |
A related issue is that the Python bindings also need a CMake file (especially important for Windows users). |
As discussed in halide#4284 one important thing is to be able to link to shared versions of LLVM libraries. This is off-by-default. The important [existing] caveat to note is that i don't see where those llvm libraries-to-be-linked are specified anywhere in the halide_config.cmake, so as long as you are a. building static halide and b. not building halide as a cmake sub-project (via add_subdirectory) i don't see how the linking can succeed, both either with old static llvm libraries, and now with shared llvm library. The best i can tell `llvm-config --system-libs` is only needed when linking to static libraries, to propagate their deps, so let's not do that for shared llvm libs. And the switch to `llvm_config()` is the main thing here, it internally handles `USE_SHARED`, and does `target_link_libraries()`. Since this is opt-in, i don't believe this should have any impact on existing users.
Improvements of the sort you describe would be quite welcome. We have historically used CMake primarily for Windows testing, but as you can see, it often lags behind; getting it to 100% parity with Makefile would be a highly desirable goal in my opinion. Contributions in this vein would be great, especially because none of the core contributors use CMake much outside of this project and thus things like the installation options are easy for us to overlook. |
Yeah, that's the fun part i suppose. |
We're totally into helping to make stuff like this better. The main thing I'll add to the discussion so far is that future success rides on making sure the things you care about are covered by tests somehow so that if anything breaks it gets caught before it gets checked in. I'd also like to see us have regular packaging for various environments as part of our release process. |
I.e. what i'm saying is, would it be acceptable to diverge into two incompatible layouts:
via a CMake option at Halide configuration time?
Can be done. As the end result i do plan to end up with debian package files, So don't worry about that part.
I'm sorry, i'm not sure how this could look. |
I suspect (without evidence) that the current tarball + usage has limited usage, because (as you've pointed out) it has various serious drawbacks. We'd want to take a straw poll on the mailing list, Gitter room, etc, to see if there are users with nontrivial dependence on the status quo, but I really don't want to fork our build system even more than it already is; making breaking changes to CMake that are a net improvement to people used to that ecosystem is a win IMHO. |
By not breaking the status quo I really just meant that it has to still be tested and work to the same extent that it currently does on all the platforms we support. I.e. don't break the build bots. |
I am also very interested in improving and modernizing the CMake build. In particular, I don't see any reason we couldn't depend on a very recent version of CMake (like 3.13, the version available by default in Debian Buster) instead of 3.3. The main advantage here being that there are many new features available only in 3.12+ that would greatly improve the simplicity and maintainability of our build. Adding Halide to Nuget (for Windows), Homebrew (for macOS), a Debian/Ubuntu-compatible PPA, and Pip/Conda (for everyone else), would absolutely ease the installation burden for new users. |
I would be in favor of such a move as well.
…On Mon, Oct 14, 2019, 7:29 PM Alex Reinking ***@***.***> wrote:
I am also very interested in improving and modernizing the CMake build. In
particular, I don't see any reason we couldn't depend on a very recent
version of CMake (like 3.13, the version available by default in Debian
Buster) instead of 3.3.
Adding Halide to Nuget (for Windows), Homebrew (for macOS), a
Debian/Ubuntu-compatible PPA, and Pip/Conda (for everyone else), would
absolutely ease the installation burden for new users.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4284?email_source=notifications&email_token=AACQJ65VBZVXXCSLZQ6DKT3QOUTJHA5CNFSM4I3PAAHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBHGGMY#issuecomment-542008115>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQJ62YFRJ7RALLTB7HZ4LQOUTJHANCNFSM4I3PAAHA>
.
|
Most of this has been handled in #4644 -- still need to create deb packages. |
Oh, nice! |
Whoa, huge congrats to everyone involved! |
Thanks @LebedevRI -- I took the lead on this and @steven-johnson was invaluable getting our build infrastructure up to date and finding bugs in my work. |
Hello.
To preface, i will understand if this isn't something that is wanted for the project..
I'd like to try using halide in some my future toy project.
As it stands now, halide is largely not packaged in distributions,
certainly not in debian; and this is a dealbreaker for me :/
After looking around, i understand why that might be the case - the cmake build system
is, uhm, making some very unusual and interesting choices.
The question is: is there any interest in trying to straighten out the cmake build,
make it more likely to be packaged, and easier to use in cmake-based projects?
Right now i see 3 main issues:
find_package(halide)
.The text was updated successfully, but these errors were encountered: