jetbrains-jdk: fix with structured attrs#425529
Conversation
9d1c078 to
98b27c2
Compare
|
Thanks for quick response! It might be issue with my setup, have you tried running some IDE with these changes? |
|
I don't know how to use java at all |
I guess quick hack like this can also be applied here for now (both set to false) |
did you confirm that is solves your font issue ? I had a look at a diffoscope between this PR and this pr plus disabling structured attrs and separatedebuginfo and the diff does has no significant matches for "font". Sometimes mixing font cache from stable with fontconfig from unstable fails, could it be the issue here ? |
Yep, basically rolling back to how it was makes the JDK usable (aka no changes from this PR at all):
I only use nixos-unstable flake, so mixing channels is not possible. LLM mentions that the I don't have any mental energy to check if it makes sense right now |
It seems I am not alone with this issue.
So this is the only working solution for now Edit: alternative PR with some jdk fix #419026 |
the fontconfig addition solves the following runtime error: Exception in thread "main" java.lang.RuntimeException: Fontconfig head is null, check your fonts or fonts configuration which surfaced during review. How is it caused by the switch to __structiredAttrs ? Good question.
|
98b27c2 to
4cfb945
Compare
|
I pushed something that appears to fix the font issue. please review. |
4cfb945 to
0bfaccd
Compare
PyCharm builds and works, and jcef does not segfault in markdown! (unlike the fix from the alternative PR) However, there is a cursor theme bug (no theme), like in the days when this stuff was not built from source. I never figured root cause of it. This feels so hackish overall :c |
|
@symphorien Thanks for the patch. @jys1670 Thanks for testing PyCharm! |
|
|
@jys1670 sorry I'm a bit unfamiliar with the matters so maybe all this should be obvious, but please be more precise in your comments.
what alternative PR. What steps do you use to trigger the segfault ?
what does that mean ? steps to reproduce ? Screenshot ?
why ? |
|
the aarch64 failures are due to libxml2 having changed its soname from .so.2 to .so.16 so I won't fix those. I think this PR is ready. |
|
Sorry, perhaps my English is lacking.
This PR #419026 fixes the JDK build too, but takes a slightly different approach.
This means that inside PyCharm you get the default X11 mouse pointer/cursor, while all other applications use whatever the user has set globally. To reproduce: just build an IDE for your favorite language and open a project with it. Look around source files/markdown readmes and notice weird cursor.
Again, to fix the build in master without any side effects or problems, I just added two lines above this line: And it builds and works (just like K900 did with openjdk8 to fix build) My point is: it feels like what you're fixing here should normally be fixed in the original OpenJDK derivation first. For example, I don't understand why fontconfig is suddenly explicitly needed. It's in the buildInputs of the original OpenJDK and used to work, but now suddenly doesn't? It's just weird.
This is fixed in the alternative PR. In any case, I don't want to stop/nitpick anything. If people support merging either of two PRs, let it be so. |
See my PR - but in short: It was always explicit, moving to structured attrs had an unintended side effect though. The OpenJDK package explicitly sets As for the reason why its there in the first place: OpenJDK seems to use |
|
|
I got the following stack trace while trying to open idea-community-bin with option This can be fixed with the following patch: diff --git a/pkgs/development/compilers/jetbrains-jdk/default.nix b/pkgs/development/compilers/jetbrains-jdk/default.nix
index c8ee60822c7d..2729ffdd12ed 100644
--- a/pkgs/development/compilers/jetbrains-jdk/default.nix
+++ b/pkgs/development/compilers/jetbrains-jdk/default.nix
@@ -20,6 +20,7 @@
libX11,
libXext,
libxcb,
+ libxkbcommon,
nss,
nspr,
libdrm,
@@ -141,6 +142,7 @@ jdk.overrideAttrs (oldAttrs: rec {
libX11
libXext
libxcb
+ libxkbcommon
nss
nspr
libdrm
|
|
I'm waiting for a fix to land in nix-25.05. Does anybody have a workaround that I can apply without making my own fork of nixpkgs? The solutions that use an override for the jdk don't seem to work reliably. |
|
NixOS 25.05 shouldn't be affected, afaik this only affects unstable? Or did something change? I pull Jetbrains from unstable and can't test stable right now, so I have no clue. |
|
|
@theCapypara not at my computer right now, but AFAICT this jetbrains jdk doesn't build on stable right now. I was assuming that the change that broke it had propagated from unstable to stable. |
Signed-off-by: Patrizio Bekerle <[email protected]>
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.