BinaryBuilder.jl
BinaryBuilder.jl copied to clipboard
Include minimal script in hints
It took me a while to figure out how to use meson. Maybe a more in depth hint script would be helpful, like
meson ${prefix} . --cross-file=${MESON_TARGET_TOOLCHAIN}
cd ..
cd ..
cd destdir
ninja
ninja install
I'm not sure what you're asking, isn't the documentation https://juliapackaging.github.io/BinaryBuilder.jl/dev/build_tips/#Meson-builds, which also points to concrete examples, clear enough?
Also, note that we can easily transfer issues between repositories within the same organisation, so no need to open multiple tickets.
Yes, I saw those. I think meson needs two positional arguments, one for the location of the code, and one for the target folder. Then you have to cd to the target folder before you run ninja? Although looking at those code examples, maybe I'm wrong?
maybe I'm wrong?
I think so
Aha, well that might explain why my ORC PR was faltering. All of the examples do something like this:
mkdir build && cd build
meson .. --cross-file=${MESON_TARGET_TOOLCHAIN}
Maybe that could be in the hints?
A broader way to think about this is that the hints scripts should be as complete as possible. For example, none of them include a line for cd'ing into the right folder before starting.
For example, none of them include a line for cd'ing into the right folder before starting.
Because generally speaking you don't have to do it. It's good style, but not strictly necessary. It's common to do that with CMake because there is no way to clean up what you've built so far, so what people do is to do the build in a subdirectory and if necessary wipe it out to restart from scratch. Makefiles generated by Autoconf have the distclean target to do that, so in that case it's not important to move anywhere at all.
with CMake there is no way to clean up what you've built so far, so what people do is to do the build in a subdirectory and if necessary wipe it out to restart from scratch
Ah, right, so then, maybe mention this or even include it in the suggested code? In the couple of CMake builds I've done, when I just cd'd into the folder and pasted the hint code, I got a warning that building into the source folder is deprecated, and it's recommended to create a separate build folder?
It seems to me that for the hint script, the first priority would be getting something that could potentially work just from copying and pasting.
just cd'd into the folder and pasted the hint code, I got a warning that building into the source folder is deprecated, and it's recommended to create a separate build folder?
I think those are custom messages printed by custom CMake files, not something built-in