NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.29k stars 14.27k forks source link

Can't start DrRacket on Darwin #230299

Open fabianpage opened 1 year ago

fabianpage commented 1 year ago

Describe the bug

DrRacket installed with nix on aarch64-darwin doesn't work. If i use the installer from the racket homepage i can use DrRacket.

Steps To Reproduce

❯ nix-shell -p racket
❯ drracket
ffi-lib: could not load foreign library
  path: libX11.6.dylib
  system error: dlopen(libX11.6.dylib, 0x0006): tried: '/nix/store/8kq5m3j1nqf1118ll5lprggmc2rg37xx-cairo-1.16.0/lib/libX11.6.dylib' (no such file), '/nix/store/3hffhbrpwb076lgw38k6ldmmlm1i5ghz-fontconfig-2.14.0-lib/lib/libX11.6.dylib' (no such file), '/nix/store/9q3ad0i1fdc5cflpbk4hdb5x7m4kc9v2-glib-2.74.3/lib/libX11.6.dylib' (no such file), '/nix/store/8168yxjpx7wnsl91dr55msc7v9hb7b27-gmp-with-cxx-6.2.1/lib/libX11.6.dylib' (no such file), '/nix/store/phyzpb3z28xvxwlz3ww1ny21bw5ml6hx-gtk+3-3.24.35/lib/libX11.6.dylib' (no such file), '/nix/store/p5xlanmacx2k69s7pz6a3m76n5r06ygi-gsettings-desktop-schemas-43.0/lib/libX11.6.dylib' (no such file), '/nix/store/hn8rwp8sql3k54z36r67f0qjlw60pbyx-libedit-20210910-3.1/lib/libX11.6.dylib' (no such file), '/nix/store/7wjpi9v1m7rrn634j3a49cfkp2lmr2yh-libGL-1.5.0/lib/libX11.6.dylib' (no such file), '/nix/store/mfnjf29vn5nvchzz15r5w050xjmpwjqh-glu-9.0.2/lib/libX11.6.dylib' (no such file), '/nix/store/n9hpanvncbxv41vbm7nihnrwfl4rxfc1-libjpeg-turbo-2.1.4/lib/libX11.6.dylib' (no such file), '/nix/store/4i9pz422rr054hca1br95c9yg2zamk4l-libpng-apng-1.6.39/lib/libX11.6.dylib' (no such file), '/nix/store/11awq79gngasy2qz0rprwxnjg2mv6sn4-mpfr-4.1.1/lib/libX11.6.dylib' (no such file), '/nix/store/n7l5af9vqrjsxzlbaiyzkkjp9qrcpmfc-ncurses-6.3-p20220507/lib/libX11.6.dylib' (no such file), '/nix/store/c9jj7sx78vb1qrmkmz0dycm6ij0kibbf-openssl-3.0.7/lib/libX11.6.dylib' (no such file), '/nix/store/gxlpsrfpnp0ki5i94glqbl5gz3w6xmc6-pango-1.50.12/lib/libX11.6.dylib' (no such file), '/nix/store/kan6dm4zszr4lsxqf6qa77gabrhmp2i0-poppler-glib-22.11.0/lib/libX11.6.dylib' (no such file), '/nix/store/8qh026xnz2qbkskf23vfjbdfmgxxn40p-readline-8.2p1/lib/libX11.6.dylib' (no such file), '/nix/store/11qwahzi3ydd0jknck2pf3q6kqn8s77q-sqlite-3.40.1/lib/libX11.6.dylib' (no such file), 'libX11.6.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibX11.6.dylib' (no such file), '/nix/store/wzfrrcy9bawjvmz7wm4ms7mcymxw81bg-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/libX11.6.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/nix/store/wzfrrcy9bawjvmz7wm4ms7mcymxw81bg-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/libX11.6.dylib' (no such file), '/nix/store/wzfrrcy9bawjvmz7wm4ms7mcymxw81bg-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/libX11.6.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/nix/store/wzfrrcy9bawjvmz7wm4ms7mcymxw81bg-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/libX11.6.dylib' (no such file), '/usr/lib/libX11.6.dylib' (no such file, not in dyld cache), 'libX11.6.dylib' (no such file), '/usr/local/lib/libX11.6.dylib' (no such file), '/usr/lib/libX11.6.dylib' (no such file, not in dyld cache)
  context...:
   /nix/store/wc0amcdn7rsnvwxdkh98fd0349g27f6h-racket-8.7/share/racket/collects/ffi/unsafe.rkt:131:0: get-ffi-lib
   body of "/nix/store/wc0amcdn7rsnvwxdkh98fd0349g27f6h-racket-8.7/share/racket/pkgs/gui-lib/mred/private/wx/gtk/x11.rkt"
   body of "/nix/store/wc0amcdn7rsnvwxdkh98fd0349g27f6h-racket-8.7/share/racket/pkgs/gui-lib/mred/private/wx/platform.rkt"

Expected behavior

DrRacket runs

Notify maintainers

@henrytill @vrthra

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 22.4.0, macOS 13.3.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.13.1`
 - channels(root): `"nixpkgs"`
 - channels(fabian): `"darwin"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
lunik1 commented 7 months ago

I get a bit further when adding a libX11 dependency to racket. Now fails with

invalid memory reference.  Some debugging context lost
  context...:
   body of "/nix/store/l4aab8bz6wmdy0x80yw02mz748v4xhyl-racket-8.12/share/racket/pkgs/gui-lib/mred/private/wx/gtk/style.rkt"
   body of "/nix/store/l4aab8bz6wmdy0x80yw02mz748v4xhyl-racket-8.12/share/racket/pkgs/gui-lib/mred/private/wx/platform.rkt"