Open gralco opened 10 months ago
Hello,
you need to update libghdl: just re-install ghdl.
Your issue is a little bit weird: you have updated ghdl-language-server, you have update pyGHDL from ghdl, but the libghdl dll has not been updated.
I managed to build ghdl from source, but I first had to fix this:
$HOME/ghdl/src/grt/config/win32.c:183: undefined reference to `__intrinsic_setjmpex'
collect2.exe: error: ld returned 1 exit status
gnatlink: error when calling C:\msys64\mingw64\bin\gcc.exe
gnatmake: *** link failed.
make: *** [Makefile:217: ghdl_mcode.exe] Error 4
By changing #include <setjmp.h>
with #include <setjmpex.h>
in ghdl/src/grt/config/win32.c (as suggested here).
For reference, in order to make ghdl-ls
to function within neovim I needed to add the following in my init.lua file:
if not require'lspconfig.configs'.ghdl_ls then
require'lspconfig.configs'.ghdl_ls = {
default_config = {
cmd = {"ghdl-ls"};
filetypes = {"vhdl"};
root_dir = function(fname)
local util = require'lspconfig'.util
return vim.fs.dirname(vim.fs.find({'hdl-prj.json'}, {upward=true})[1]) or util.root_pattern('hdl-prj.json')(fname) or util.find_git_ancestor(fname) or vim.fn.getcwd() or util.path.dirname(fname)
end;
settings = {};
};
}
end
require'lspconfig'.ghdl_ls.setup{}
Otherwise it the LSP will not be able to find / hook onto the root directory where the vhdl code is located. Doing single_file_mode = true
is not enough to make it work.
Is the dll path correct and does it exist?
If yes, the error is probably due to a dependency (libgcc or libgnat). You need to update PATH.
Is the dll path correct and does it exist? If yes, the error is probably due to a dependency (libgcc or libgnat). You need to update PATH.
I managed to fix that by building ghdl from source.
I somehow ran into this issue again. As it turns out, what I needed to do was to copy over my built libghdl-4_0_0_dev.dll
into /c/msys64/mingw64/lib/libghdl-4_0_0_dev.dll
, that's where it's looking for libghdl (where there was an old libghdl.dll that wasn't updated when doing make install
).
On Fedora 38 the libghdl-4_0_0_dev.so
that's built needs to be in ~/.local/lib/
.
Description After installing ghdl using the latest commit, attempting to run
ghdl-ls
on Windows fails (tested on Fedora and it works fine).Context
71287d46036e45f2bcafbc06e4b1ca1b37d48b85
Here's the traceback I get when trying to run
ghdl-ls
: