Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong library reference in a default install #150

Open
r2com opened this issue Feb 18, 2023 · 3 comments
Open

Wrong library reference in a default install #150

r2com opened this issue Feb 18, 2023 · 3 comments

Comments

@r2com
Copy link

r2com commented Feb 18, 2023

I have built and installed ghdl in: /home/r2com/eda/install/ghdl/

Then I went back to the source ghdl folder and ran:
pip install .

That did install the ghdl which I was able to run in command line.

However, when in Sublime I configured LSP to use it, I got error:

  File "/home/r2com/.local/lib/python3.11/site-packages/pyGHDL/libghdl/__init__.py", line 155, in _get_libghdl_path
    raise Exception(f"Cannot find libghdl {basename}")
Exception: Cannot find libghdl libghdl-3_0_0_dev.so

I know that this file is located after ghdl-ls install in:
/home/r2com/.local/lib/python3.11/site-packages/

The init.py at line 155 tries to look in ../../lib folder for this file, but if executed from ghdl-ls location there is No such folder (although there is just necessary .so file)

So the way I fixed it, is just created a symbolic link "lib" which points to:
/home/r2com/eda/install/ghdl/lib

The above folder is the install folder of ghdl, which has lib folder where necessary .so file located.

After that my ghdl-ls works OK in Sublime.

So... reason I posted this is to show you what exists, and whether there is more proper way to fix it? or did I miss some step during install?

@tgingold
Copy link
Member

tgingold commented Feb 19, 2023 via email

@r2com
Copy link
Author

r2com commented Mar 18, 2023

Here are the printouts:

r2com@eda1:~/projects/temp/ghdl-cosim/vhpidirect/shared/shghdl$ ghdl --dispconfig
Paths at configuration:
compiler command: libexec/gcc/x86_64-pc-linux-gnu/12.2.0/ghdl1
assembler command (--AS= or as): as
linker command (--LINKER=, CC, or cc): cc
default lib prefix: lib

command line prefix (--PREFIX): (not set)
environment prefix (GHDL_PREFIX): (not set)
exec prefix (from program name): /home/r2com/eda/install/ghdl

library prefix: /home/r2com/eda/install/ghdl/lib/ghdl
library directory: /home/r2com/eda/install/ghdl/lib/ghdl
compiler path: /home/r2com/eda/install/ghdl/libexec/gcc/x86_64-pc-linux-gnu/12.2.0/ghdl1
assembler path: /usr/bin/as
linker path: /usr/bin/cc

default library paths:
 /home/r2com/eda/install/ghdl/lib/ghdl/ieee/v93/
 /home/r2com/eda/install/ghdl/lib/ghdl/

And another:

r2com@eda1:~/projects/temp/ghdl-cosim/vhpidirect/shared/shghdl$ ghdl-ls --disp-config
command line prefix (--PREFIX): (not set)
environment prefix (GHDL_PREFIX): (not set)
exec prefix (from program name): /home/r2com/eda/install/ghdl

library prefix: /home/r2com/eda/install/ghdl/lib/ghdl
library directory: /home/r2com/eda/install/ghdl/lib/ghdl
python:
sys.platform: linux, os.name: posix
3.11.1 (main, Dec 31 2022, 10:23:59) [GCC 12.2.0]

@tgingold
Copy link
Member

tgingold commented Mar 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants