Your message dated Sun, 20 Jul 2025 22:56:37 +0200 with message-id <w7m6zds6rhh54p24b63ooewim6q325wrcgt4oxteuo4buoa6bs@w3hzp4vjk5ni> and subject line Re: Bug#1103550: Broken libghdl-5-0-1 has caused the Debian Bug report #1103550, regarding Broken libghdl-5-0-1 to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 1103550: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103550 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: libghdl-5-0-1 Version: 5.0.1+dfsg-1+b1 Hi, the libghdl package is broken. According to my research from 4.1.0, the paths inside of libghdl haven't been adjusted to find the library files of GHDL. I couldn't test this with 5.0.1 because it doesn't locate the libghdl.so file. When running ghdl-dom, libghdl-5_0_1.so can't be found. Using environment variable GHDL_PREFIX: ------------------------------------------------------------------------------------------- root@4af06a855805:~/ghdl# GHDL_PREFIX=/usr/lib/ghdl ghdl-dom Traceback (most recent call last): File "/usr/local/bin/ghdl-dom", line 5, in <module> from pyGHDL.cli.dom import main File "/usr/local/lib/python3.13/dist-packages/pyGHDL/cli/dom.py", line 48, in <module> from pyGHDL.libghdl import LibGHDLException File "/usr/local/lib/python3.13/dist-packages/pyGHDL/libghdl/__init__.py", line 206, in <module> libghdl = _initialize() File "/usr/local/lib/python3.13/dist-packages/pyGHDL/libghdl/__init__.py", line 187, in _initialize _libghdl_path = _get_libghdl_path() File "/usr/local/lib/python3.13/dist-packages/pyGHDL/libghdl/__init__.py", line 181, in _get_libghdl_path raise ex pyGHDL.libghdl.LibGHDLException: Cannot find pyGHDL shared library 'libghdl-5_0_1.so'. Tried variable 'GHDL_PREFIX': /usr/lib/ghdl Checked variable 'GHDL': not set. Checked variable 'VUNIT_GHDL_PATH': not set. Tried pyGHDL.lib resource directory: /usr/local/lib/python3.13/dist-packages/pyGHDL/lib/libghdl-5_0_1.so Relative to build directory: /usr/local/lib/python3.13/dist-packages/lib ------------------------------------------------------------------------------------------- root@4af06a855805:~/ghdl# GHDL_PREFIX=/usr/lib/ghdl/mcode ghdl-dom Traceback (most recent call last): File "/usr/local/bin/ghdl-dom", line 5, in <module> from pyGHDL.cli.dom import main File "/usr/local/lib/python3.13/dist-packages/pyGHDL/cli/dom.py", line 48, in <module> from pyGHDL.libghdl import LibGHDLException File "/usr/local/lib/python3.13/dist-packages/pyGHDL/libghdl/__init__.py", line 206, in <module> libghdl = _initialize() File "/usr/local/lib/python3.13/dist-packages/pyGHDL/libghdl/__init__.py", line 187, in _initialize _libghdl_path = _get_libghdl_path() File "/usr/local/lib/python3.13/dist-packages/pyGHDL/libghdl/__init__.py", line 181, in _get_libghdl_path raise ex pyGHDL.libghdl.LibGHDLException: Cannot find pyGHDL shared library 'libghdl-5_0_1.so'. Tried variable 'GHDL_PREFIX': /usr/lib/ghdl/mcode Checked variable 'GHDL': not set. Checked variable 'VUNIT_GHDL_PATH': not set. Tried pyGHDL.lib resource directory: /usr/local/lib/python3.13/dist-packages/pyGHDL/lib/libghdl-5_0_1.so Relative to build directory: /usr/local/lib/python3.13/dist-packages/lib ------------------------------------------------------------------------------------------- Using environment variable GHDL: ------------------------------------------------------------------------------------------- root@4af06a855805:~/ghdl# GHDL=$(which ghdl) ghdl-dom Traceback (most recent call last): File "/usr/local/bin/ghdl-dom", line 5, in <module> from pyGHDL.cli.dom import main File "/usr/local/lib/python3.13/dist-packages/pyGHDL/cli/dom.py", line 48, in <module> from pyGHDL.libghdl import LibGHDLException File "/usr/local/lib/python3.13/dist-packages/pyGHDL/libghdl/__init__.py", line 206, in <module> libghdl = _initialize() File "/usr/local/lib/python3.13/dist-packages/pyGHDL/libghdl/__init__.py", line 187, in _initialize _libghdl_path = _get_libghdl_path() File "/usr/local/lib/python3.13/dist-packages/pyGHDL/libghdl/__init__.py", line 181, in _get_libghdl_path raise ex pyGHDL.libghdl.LibGHDLException: Cannot find pyGHDL shared library 'libghdl-5_0_1.so'. Checked variable 'GHDL_PREFIX': not set Tried variable 'GHDL': /usr/bin/ghdl Checked variable 'VUNIT_GHDL_PATH': not set. Tried pyGHDL.lib resource directory: /usr/local/lib/python3.13/dist-packages/pyGHDL/lib/libghdl-5_0_1.so Tried 'which ghdl': /usr/bin/ghdl Relative to build directory: /usr/local/lib/python3.13/dist-packages/lib ------------------------------------------------------------------------------------------- Some investigations: libghdl is located in /usr/lib/x86_64-linux-gnu, which is a directory for multiarch support. >From Debians documentation: Multiarch is the term being used to refer to the capability of a system to install and run applications of multiple different binary targets on the same system. For example running a i386-linux-gnu application on an amd64-linux-gnu system. This example is the most common case, but many other working combinations are possible, such as armel and armhf. Multiarch also simplifies cross-building, where foreign-architecture libraries and headers are needed on a system during building. GHDL is not cross-compiling. It generates code for the host platform. So on x86-64 it generates x86-64 code and on aarch64 it generates aarch64 code. Moreover, libghdl doesn't generate any code at all. It just supports parsing, analysis, etc. but no code generation. Thus, the classification as a multiarch code generator isn't correct, right? One of the biggest usecases of libghdl is the Python binding via pyGHDL/libghdl. Therefore a matching Python package installation is required, What is the plan of Debian providing a matching pyGHDL 5.0.1 version for libghdl 5.0.1? Instead of a Debian package providing libghdl, I suggest to provide a python3-pyGHDL package containing an embedded and matching libghdl-5.0.1.so. This is how we deliver pyGHDL via our GitHub pipeline. setup.py can handle this usecase. Just provide the so file in pyGHDL/lib/... The so file will become a package resource file. Kind regards Patrick
--- End Message ---
--- Begin Message ---Am Sat, Apr 19, 2025 at 12:00:15AM +0200, schrieb Paebbels: > Package: libghdl-5-0-1 > Version: 5.0.1+dfsg-1+b1 > > Hi, > > the libghdl package is broken. According to my research from 4.1.0, > the paths inside of libghdl haven't been adjusted to find the library > files of GHDL. I couldn't test this with 5.0.1 because it doesn't > locate the libghdl.so file. The packaged ghdl binaries report the correct paths for libghdl with the --libghdl-name, --libghdl-library-path and --libghdl-include-dir. In fact, the test suite contains gna/issue2005 which does a link test against libghdl. In Debian, the test suite is run during the package build and through the CI framework using autopkgtest against installed packages. According to the logs the test suites do in fact run issue2005 and it always reports "ok." > When running ghdl-dom, libghdl-5_0_1.so can't be found. > Using environment variable GHDL_PREFIX: > ------------------------------------------------------------------------------------------- [...] > Using environment variable GHDL: > ------------------------------------------------------------------------------------------- > root@4af06a855805:~/ghdl# GHDL=$(which ghdl) ghdl-dom > Traceback (most recent call last): I see this uses pyGHDL and looking at the implementation of the libghdl search function, it appears to not query the correct path and instead makes a number of guesses using some incorrect assumptions. This is a good reminder for me that I need to patch it if it isn't fixed yet by the time I get to that. However, pyGHDL isn't yet part of the Debian packaging and it is pyGHDL's inadequate libghdl search function that is failing to find the library. If pyGHDL were packaged and this issue would still be current, I would have patched it. Therefore this is not a bug in the Debian package and I'm closing this bug. > Some investigations: > libghdl is located in /usr/lib/x86_64-linux-gnu, which is a directory > for multiarch support. > > From Debians documentation: > Multiarch is the term being used to refer to the capability of a > system to install and run applications of multiple > different binary targets on the same system. For example running a > i386-linux-gnu application on an amd64-linux-gnu > system. This example is the most common case, but many other > working combinations are possible, such as armel > and armhf. > > Multiarch also simplifies cross-building, where > foreign-architecture libraries and headers are needed on a system > during > building. > > GHDL is not cross-compiling. It generates code for the host platform. > So on x86-64 it generates x86-64 code and on aarch64 it generates > aarch64 code. Moreover, libghdl doesn't generate any code at all. It > just supports parsing, analysis, etc. but no code generation. Thus, > the classification as a multiarch code generator isn't correct, right? Libraries need to be installed in multiarch locations to enable installing and running applications of multiple different binary targets on the same system, as you quoted above. Not using the multiarch location in the future would be a regression in terms of multiarch support. > One of the biggest usecases of libghdl is the Python binding via > pyGHDL/libghdl. Therefore a matching Python package installation is > required, What is the plan of Debian providing a matching pyGHDL 5.0.1 > version for libghdl 5.0.1? > > Instead of a Debian package providing libghdl, I suggest to provide a > python3-pyGHDL package containing an embedded and matching > libghdl-5.0.1.so. This is how we deliver pyGHDL via our GitHub > pipeline. setup.py can handle this usecase. Just provide the so file > in pyGHDL/lib/... The so file will become a package resource file. I initially did not provide a libghdl package in Debian as I did not see any user except pyGHDL, which I hadn't enabled. In the meantime the yosys maintainer asked for libghdl to be provided for the use of the yosys GHDL plugin. As libghdl is now a package for that use case, it makes no sense for the future pyGHDL package to embed another copy. Especially since all that needs to be fixed is just the pyGHDL library search function, as far as I can see.
--- End Message ---

