NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.07k stars 14.13k forks source link

factor is not runnable #136400

Open kephas opened 3 years ago

kephas commented 3 years ago

Describe the bug

When installed, factor fails with warnings and an error.

Steps To Reproduce

Steps to reproduce the behavior:

  1. install factor-lang
  2. run factor

Expected behavior

factor's UI appears.

Screenshots

$ nix-shell '<nixpkgs>' -A factor-lang
[nix-shell:~/]$ /nix/store/l4k3np765pki61gd25h9vx7gni3ns42y-factor-lang-0.98/bin/factor     
Gtk-Message: 18:16:18.483: Failed to load module "atk-bridge"

(factor:627002): Gtk-WARNING **: 18:16:18.636: Unable to locate theme engine in module_path: "adwaita",
Error in thread 23 (UI update, [ self ui-thread set-global update-ui-loop ]):

invalid-pixel-format-attributes
world      T{ world f ~array~ ~array~ f f ~vector~ ~array~ ~debugger~ t t f...
attributes { windowed double-buffered }

(U) Quotation: [ set-namestack init-catchstack self quot>> call => stop ]
(O) Word: update-ui-loop
(O) Word: update-ui
(O) Word: notify-queued
(O) Method: M\ world graft*
(O) Method: M\ gtk-ui-backend (open-window)
(O) Word: configure-gl
(O) Word: <pixel-format>
(O) Word: invalid-pixel-format-attributes
(O) Method: M\ object throw
(U) Quotation: [
        OBJ-CURRENT-THREAD special-object error-thread set-global
        current-continuation => error-continuation set-global
        [ original-error set-global ] [ rethrow ] bi
    ]

Notify maintainers

@vrthra @spacefrogg

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: `"x86_64-linux"`
 - host os: `Linux 5.10.0-7-amd64, Debian GNU/Linux, 11 (bullseye)`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.3.12`
 - channels(pierre): `"nixpkgs-21.11pre293448.2a1c29ef4ba"`
 - nixpkgs: `/home/pierre/.nix-defexpr/channels/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: factor-lang
spacefrogg commented 3 years ago

If able, please have a go with the PR and report there!

pierre-thierry commented 2 years ago

I installed factor from the PR and got the same error:

$ git checkout -b factor-lang-revamp e886a0d36a047bc11982ca1bf5f6fa0e7dcbbe84
$ nix-build ./. -A factor-lang
$ nix-env -i result
$ factor
Gtk-Message: 02:01:13.433: Failed to load module "atk-bridge"

(factor:654335): Gtk-WARNING **: 02:01:13.560: Unable to locate theme engine in module_path: "adwaita",
Error in thread 25 (UI update, [ self ui-thread set-global update-ui-loop ]):

invalid-pixel-format-attributes
world      T{ world f ~array~ ~array~ f f ~vector~ ~array~ ~debugger~ t t f...
attributes { windowed double-buffered }

(U) Quotation: [ set-namestack init-catchstack self quot>> call => stop ]
(O) Word: update-ui-loop
(O) Word: update-ui
(O) Word: notify-queued
(O) Method: M\ world graft*
(O) Method: M\ gtk-ui-backend (open-window)
(O) Word: configure-gl
(O) Word: <pixel-format>
(O) Word: invalid-pixel-format-attributes
(O) Method: M\ object throw
(U) Quotation: [
        OBJ-CURRENT-THREAD special-object error-thread set-global
        current-continuation => error-continuation set-global
        [ original-error set-global ] [ rethrow ] bi
    ]
kephas commented 2 years ago

I tried adding at-spi2-atk among the runtimeLibs in factor98.nix but it doesn't change the error…

spacefrogg commented 2 years ago

cc @timor

timor commented 2 years ago

I cannot reproduce this.

Running nix-build '<nixpkgs>' -A factor-lang; ./result/bin/factor works for me as expected on 22.05pre372012.bc41b01dd7a (Quokka)

Stekke commented 2 years ago

I gave this a try both on nixos-21.11 and e886a0d36a047bc11982ca1bf5f6fa0e7dcbbe84 and it works on both for me. (using nix shell nixpkgs/e886a0d36a047bc11982ca1bf5f6fa0e7dcbbe84#factor-lang)

  • system: "x86_64-linux"
  • host os: Linux 5.10.111, NixOS, 21.11 (Porcupine)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.5.0pre20211206_d1aaa7e
  • channels(root): "nixos-21.11.335288.3ddd960a3b5"
  • channels(stekke): "home-manager"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maybe the difference is in the multi-user / sandbox ?

kephas commented 2 years ago

On my system, I get this error with this nix shell:


 ~$ nix shell nixpkgs/e886a0d36a047bc11982ca1bf5f6fa0e7dcbbe84#factor-lang                                                                                                                                         ~$ factor                                                                                                                                                                                                        lun. 16 mai 2022 00:34:19
Gtk-Message: 00:34:27.909: Failed to load module "atk-bridge"
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/fonts.conf", line 9: unknown element "description"
Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf

(factor:225082): Gtk-WARNING **: 00:34:27.930: Impossible de trouver le moteur de thème dans module_path : « adwaita »
Error in thread 23 (UI update, [ self ui-thread set-global update-ui-loop ]):

invalid-pixel-format-attributes
world      T{ world f ~array~ ~array~ f f ~vector~ ~array~ ~debugger~ t t f...
attributes { windowed double-buffered }

(U) Quotation: [ set-namestack init-catchstack self quot>> call => stop ]
(O) Word: update-ui-loop
(O) Word: update-ui
(O) Word: notify-queued
(O) Method: M\ world graft*
(O) Method: M\ gtk-ui-backend (open-window)
(O) Word: configure-gl
(O) Word: <pixel-format>
(O) Word: invalid-pixel-format-attributes
(O) Method: M\ object throw
(U) Quotation: [
        OBJ-CURRENT-THREAD special-object error-thread set-global
        current-continuation => error-continuation set-global
        [ original-error set-global ] [ rethrow ] bi
    ]
 ~$
timor commented 2 years ago

Could this be a graphics card driver related issue?

kephas commented 2 years ago

It was, I guess. At least in part.

Part of the problem here was that nix shell puts the given package later in $PATH than my existing profile, where there was a broken factor. When I removed that one and tried nixGL factor inside nix shell, it worked. When I tried calling just factor inside nix shell -i, I get a working terminal REPL.

But when I try just factor inside nix shell without -i, I still got this error:

Gtk-Message: 18:48:26.661: Failed to load module "atk-bridge"

(factor:281854): Gtk-WARNING **: 18:48:26.782: Impossible de trouver le moteur de thème dans module_path : « adwaita »
Error in thread 25 (UI update, [ self ui-thread set-global update-ui-loop ]):

invalid-pixel-format-attributes
world      T{ world f ~array~ ~array~ f f ~vector~ ~array~ ~debugger~ t t f...
attributes { windowed double-buffered }

(U) Quotation: [ set-namestack init-catchstack self quot>> call => stop ]
(O) Word: update-ui-loop
(O) Word: update-ui
(O) Word: notify-queued
(O) Method: M\ world graft*
(O) Method: M\ gtk-ui-backend (open-window)
(O) Word: configure-gl
(O) Word: <pixel-format>
(O) Word: invalid-pixel-format-attributes
(O) Method: M\ object throw
(U) Quotation: [
        OBJ-CURRENT-THREAD special-object error-thread set-global
        current-continuation => error-continuation set-global
        [ original-error set-global ] [ rethrow ] bi
    ]
timor commented 2 years ago

@kephas I never used NixGL before. Do you think it is possible to track down which adjustments it makes for Factor to suddenly work?

kephas commented 2 years ago

If I'm reading the code right, it's basically putting the DRI libraries in $LD_LIBRARY_PATH.