openlane2 icon indicating copy to clipboard operation
openlane2 copied to clipboard

klayout having unexpected behavior in nix shell

Open link422 opened this issue 6 months ago • 1 comments

Description

I am on Ubuntu 24.04 And was following the newcomers guide from the read the docs. After setting up nix using curl as advised I launched the nix shell using: nix-shell --pure ~/openlane2/shell.nix All of the setup went smoothly until I got to where I needed to run the command: openlane --last-run --flow openinklayout ~/my_designs/pm32/config.json When I run that command I am met with:

[18:29:16] INFO     Loading the design configuration file has      config.py:716
                    generated the following warnings:                           
[18:29:16] WARNING  Key 'VERILOG_FILES' provided is unused by the  config.py:720
                    current flow.                                               
[18:29:16] INFO     Using existing run at 'RUN_2025-06-16_15-01-36'  flow.py:578
                    with the 'Opening in KLayout' flow.                         
[18:29:18] VERBOSE  Using state at                                   flow.py:617
                    '/home/carrot/my_designs/pm32/runs/RUN_2025-06-1            
                    6_15-01-36/84-klayout-opengui/state_out.json'.              
[18:29:18] INFO     Starting…                                  sequential.py:294
───────────────────────────────── Open In GUI ──────────────────────────────────
[18:29:18] VERBOSE  Running 'KLayout.OpenGUI' at                    step.py:1122
                    '../my_designs/pm32/runs/RUN_2025-06-16_15-01-3             
                    6/85-klayout-opengui'…                                      
Opening in KLayout - Stage 1 - Open In GUI ━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1 0:00:00Authorization required, but no authorization protocol specified

Info: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Opening in KLayout - Stage 1 - Open In GUI ━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1 0:00:01
[18:29:19] ERROR    The flow has encountered an unexpected       __main__.py:183
                    error:                                                      
                    Open In GUI: Interrupted (SIGABRT)                          
[18:29:19] ERROR    OpenLane will now quit.                      __main__.py:184

Expected Behavior

klayout should launch as normal. After messing around I have noticed that using the command nix-shell rather than nix-shell --pure ~/openlane2/shell.nix seems to allow klayout to launch. That might be the solution to my problem however I was curious if not having the --pure would cause any issues later down the road.

Environment report

openlane/env_info.py
openlane.env_info: command not found
Failed to get Docker info: [Errno 2] No such file or directory: 'docker'
kernel: Linux
kernel_version: 6.11.0-19-generic
supported: True
distro: ubuntu
distro_version: 24.04
python_version: 3.12.3
python_path:
  - /home/carrot/openlane2/openlane
  - /usr/lib/python312.zip
  - /usr/lib/python3.12
  - /usr/lib/python3.12/lib-dynload
  - /usr/local/lib/python3.12/dist-packages
  - /usr/lib/python3/dist-packages
tkinter: False
container_info: None
nix_info:
  version_string: nix (Nix) 2.29.0
  channels:
  nix_command: True
  flakes: True

Reproduction material

Sorry I am not sure what to do for this but I detailed what I did above

Relevant log output

[18:29:16] INFO     Loading the design configuration file has      config.py:716
                    generated the following warnings:                           
[18:29:16] WARNING  Key 'VERILOG_FILES' provided is unused by the  config.py:720
                    current flow.                                               
[18:29:16] INFO     Using existing run at 'RUN_2025-06-16_15-01-36'  flow.py:578
                    with the 'Opening in KLayout' flow.                         
[18:29:18] VERBOSE  Using state at                                   flow.py:617
                    '/home/carrot/my_designs/pm32/runs/RUN_2025-06-1            
                    6_15-01-36/84-klayout-opengui/state_out.json'.              
[18:29:18] INFO     Starting…                                  sequential.py:294
───────────────────────────────── Open In GUI ──────────────────────────────────
[18:29:18] VERBOSE  Running 'KLayout.OpenGUI' at                    step.py:1122
                    '../my_designs/pm32/runs/RUN_2025-06-16_15-01-3             
                    6/85-klayout-opengui'…                                      
Opening in KLayout - Stage 1 - Open In GUI ━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1 0:00:00Authorization required, but no authorization protocol specified

Info: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Opening in KLayout - Stage 1 - Open In GUI ━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1 0:00:01
[18:29:19] ERROR    The flow has encountered an unexpected       __main__.py:183
                    error:                                                      
                    Open In GUI: Interrupted (SIGABRT)                          
[18:29:19] ERROR    OpenLane will now quit.                      __main__.py:184

link422 avatar Jun 16 '25 23:06 link422

Hi link422, Efabless has ceased operations. If you would like a maintained fork of OpenLane by the same authors, please try https://github.com/librelane/librelane. Thank you!

donn avatar Jun 27 '25 11:06 donn