Skip to content

GUI: Fix build on clang++#95

Merged
AndyFilter merged 3 commits into
AndyFilter:masterfrom
delet-this:gui-fix-clang-build
Apr 17, 2026
Merged

GUI: Fix build on clang++#95
AndyFilter merged 3 commits into
AndyFilter:masterfrom
delet-this:gui-fix-clang-build

Conversation

@delet-this
Copy link
Copy Markdown

@delet-this delet-this commented Apr 15, 2026

Related to #66 (comment). After changes in #93, when using one of those clang-built kernels, the package.nix would also be built by a clang based stdenv. This gets us closer to having the nix package work with those kernels. However as the gui is currently in the same package, it will also be built by clang. It would probably make sense to split the gui to its own nix package that would then be built by the normal gcc based stdenv which would resolve this, however I don't think it's a bad idea to have the gui build passing on clang anyway. Different compilers have different warnings and all that, helping us catch more mistakes.

I have tested that the nix package (includes driver and GUI) and yeetmousectl still build.

Clang complained about these.
We don't care about 3rd party warnings, and it broke the nix build on
clang.
@delet-this delet-this force-pushed the gui-fix-clang-build branch from c3b7d76 to 3326f08 Compare April 16, 2026 20:06
@delet-this
Copy link
Copy Markdown
Author

Rebased to get the new CI workflow

@AndyFilter
Copy link
Copy Markdown
Owner

Looks good to me, although I tried to forcibly build it with clang on my Ubuntu and it failed. But I'll blame that on the fact that I'm using a 2 year old version of clang (18.1.3).

I also had to replace -flto=auto with -fuse-ld=lld for it to even try.

But it all doesn't matter, as my system was never meant to run clang in the first place.

Still compiles with g++, and that's all that matters to me, haha.

@delet-this
Copy link
Copy Markdown
Author

@AndyFilter

tried to forcibly build it with clang on my Ubuntu and it failed

Did you do make clean-all && CXX=clang++ make all and it didn't work? I tried on 18.1.8 just now and it did work, but it warned about unknown warning flags. Could be some difference between distros perhaps.

@AndyFilter
Copy link
Copy Markdown
Owner

Yea, so turns out I was compiling with clang, just clang, not clang++. All works now (with -fuse-ld=lld).
Kind of makes sense, as all the errors earlier were std-related.

In my defence, the only 2 compilers I've ever used were gcc/g++ and icc/icpx, so I thought that naming was a gcc-type-of thing.

@AndyFilter AndyFilter merged commit 4821e60 into AndyFilter:master Apr 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants