YosysHQ / oss-cad-suite-build

Multi-platform nightly builds of open source digital design and verification tools
ISC License
774 stars 70 forks source link

Issue running nextpnr-ice40 with GUI in oss-cad-suite #45

Open mattyoung101 opened 1 year ago

mattyoung101 commented 1 year ago

Hi,

When trying to run nextpnr-ice40 --gui inside the oss-cad-suite environment, it seems it can't load the Mesa GPU driver, which causes a blank window to show up and then ImGui to crash.

Here's an example:

$ source environment
$ nextpnr-ice40 --gui
/home/matt/tools/oss-cad-suite/bin/nextpnr-ice40: line 22: /home/matt/.config/yosyshq/fonts.conf: No such file or directory
Warning: Use of default value for --package is deprecated. Please add '--package ' to arguments.
Fontconfig error: Cannot load default config file
libGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
nextpnr-ice40: /work/_builds/linux-x64/nextpnr-ice40/nextpnr/3rdparty/imgui/imgui.cpp:2861: ImGuiIO& ImGui::GetIO(): Assertion `GImGui != __null && "No current context. Did you call ImGui::CreateContext() or ImGui::SetCurrentContext()?"' failed.
Aborted (core dumped)

However, if I run the nextpnr-ice40 executable directly (located in "oss-cad-suite/libexec/nextpnr-ice40"), it works just fine.

I'm guessing there may be an issue in the nextpnr-ice40 shell script in the bin directory? I tried to have a look myself, but I'm not too familiar with your packaging setup works.

Thanks!