i'm learning bazel
so far my conclusion is that i would rather use cmake than bazel because cmake has a better user interface
i'm learning bazel
so far my conclusion is that i would rather use cmake than bazel because cmake has a better user interface
you run `bazel build --help` and it directs you to open a webpage that does not contain the documentation for the fucking command line options
@whitequark lmao, that is amazing
i'm not completely clear on it but it might be that there _isn't_ any single place where you can get a list of valid command line options for `bazel build`? the webpage just has recipes for various use cases, not a full reference
@Soblow they work at google
@whitequark How did they fail so miserably to have a UX worse than CMake?!!
@jhwgh1968 so, i'm cross-compiling something to Wasm that was never built for Wasm before
@whitequark you have my sympathy
Bazel is the only build system I rage quit
After 20 minutes of failing to understand how to *name a specific target to build* rather than "everything" despite having what seemed like a list of them from the config
@mal3aby oh, thanks
@whitequark There's this, though I'm not sure it helps very much?
https://bazel.build/reference/command-line-reference?hl=en#build
@Soblow @whitequark google probably doesn't have an incentive to make it work nicely for people who don't work at google (which, if you're at google, then you have access to a lot of internal tooling & documentation, and i would bet that some of those tools/docs makes it easier to use/learn bazel)
@JamesWidman @Soblow yep https://mastodon.social/@whitequark/114983916717284860
@whitequark what has the Catherine done to deserve this?
@chrisvest i chose to do it of my own volition
okay this is the actually useful page https://bazel.build/docs/user-manual
would have been good to, you know, have a link to it. they could've even printed *two* links! (gasp)
@whitequark @Soblow it seems like bazel is so awkward outside of google that, if a project is built with bazel, then it probably also ought to ship with at least one justfile:
...with just-recipes defined for common tasks.
maybe worth a bug report?
@JamesWidman weeell, i'm cross-compiling it to wasm
ive successfully cross-compiled a project i've never used before (mpact_cheriot) using a build system i've never used before (bazel) to wasm
@be i don't particularly mind that; i mean, i use nixos, same deal
@whitequark I consider a build system that cannot function without containers and grabbing its own toolchains from who-knows-where fundamentally broken.
@stylus the problem with make is that it's a fine tool for what it is, but by lacking things like "knowing what cross-compilation is" it encourages people to produce absolute abominations. which i then end up cross-compiling. which makes me utterly despise people who do them
@whitequark that's OK, my cmake hot take is I'd rather read GNU make.
@stylus it's possible that you, personally, write good makefiles
i applaud you in that case! it's just that i think make's design is too outmoded to be an option that respects other people's time, in 2025
checks most recently edited Makefile
CROSS_COMPILE ?= arm-none-eabi-well s--- I feel seen right now
@stylus meanwhile you could be a complete barbarian, but provided you don't use too many compiler-specific flags (in which case i just comment them out) with cmake porting is usually a matter of -DCMAKE_TOOLCHAIN_FILE=.../wasm32-wasip1.cmake and fixing thev source code
@whitequark I didn't design the build system but needless to say the project (micropython) cares a lot about cross builds.
i like how there's a flag to make bazel show you which commands it's running (important for debugging linker errors) but all the commands are like
emcc.sh @bazel-out/whatever/bullshit.params
and not only does it not point to a real filesystem path, but i'm pretty sure it also deletes the directory where the .params file lives before reporting failure
correction: it doesn't delete it and the @ just means "root directory of the project"
gotta be sure
@whitequark
$ man ld
-l namespec Toggles linking the archive or object file specified by namespec. Specifying the same namespec an even number of times is therefore equivalent to not specifying it at all.
@whitequark you gotta link to pthread once per thread your program will need
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.