freehdl - qucs - segfault fix?
Forum rules
Before you post please read how to get help
Before you post please read how to get help
freehdl - qucs - segfault fix?
Hi all,
I've been playing with qucs for several years and used it seriously through my 4 year BEng but I never had any serious use for digital simulation. With the latest versions I have not been able to get even the simplest digital simulation to run and I have narrowed it down to the freehdl-v2cc component which segfaults. I have tried to compile from scratch but I run into errors that I have no idea how to tackle. Asking for help from the qucs mailing list has just resulted in a single snarky replay and stackexchange has not returned any results, nor replies to a question. So, I'm turning to the experts here to see if anyone has a solution.
Thanks in advance,
Statik
I've been playing with qucs for several years and used it seriously through my 4 year BEng but I never had any serious use for digital simulation. With the latest versions I have not been able to get even the simplest digital simulation to run and I have narrowed it down to the freehdl-v2cc component which segfaults. I have tried to compile from scratch but I run into errors that I have no idea how to tackle. Asking for help from the qucs mailing list has just resulted in a single snarky replay and stackexchange has not returned any results, nor replies to a question. So, I'm turning to the experts here to see if anyone has a solution.
Thanks in advance,
Statik
Re: freehdl - qucs - segfault fix?
Hello!
I seem to have "fixed" the problem with FreeHDL recently. I applied multiple patches from different places, and some of my own, and somehow I managed to build the DEB-package for Linux Mint 19 (Tara). I attached my patches and build scripts to this bug-repot. Using the 'debian' catalog in the
I hope this information is not too late for you, and it will be useful.
I seem to have "fixed" the problem with FreeHDL recently. I applied multiple patches from different places, and some of my own, and somehow I managed to build the DEB-package for Linux Mint 19 (Tara). I attached my patches and build scripts to this bug-repot. Using the 'debian' catalog in the
freehdl_0.0.8-2.2ubuntu3.debian.tar.xz
file, and the FreeHDL sources from Ubuntu repository, one can build the DEB-package for any Ubuntu- or Debian-based distribution, I guess.I hope this information is not too late for you, and it will be useful.
Re: freehdl - qucs - segfault fix?
I'm using Mint 19.3 Tricia and have just compile Qucs 0.20
Installed in /usr/local its working fine for analalog.
freehdl is in the Mint sources, but sure enough a simple 2 input AND circuit truth table segfauts.
Can you explain where to install the patches for freehdl source code please?
If you want to try installing version 20 then after compiling admsXml
run sudio ldconfig
the final sudo make install should then install admsXml with no problems.
The only other thing with v20 is I compiled without documentation (as its online anyway).
Installed in /usr/local its working fine for analalog.
freehdl is in the Mint sources, but sure enough a simple 2 input AND circuit truth table segfauts.
Can you explain where to install the patches for freehdl source code please?
If you want to try installing version 20 then after compiling admsXml
run sudio ldconfig
the final sudo make install should then install admsXml with no problems.
The only other thing with v20 is I compiled without documentation (as its online anyway).
Re: freehdl - qucs - segfault fix?
I would not recommend installing viahal8000 wrote: ↑Thu Apr 02, 2020 8:02 amI'm using Mint 19.3 Tricia and have just compile Qucs 0.20
Installed in /usr/local its working fine for analalog.
freehdl is in the Mint sources, but sure enough a simple 2 input AND circuit truth table segfauts.
Can you explain where to install the patches for freehdl source code please?
make install
. It would be better to build a DEB-package instead.In order to build the DEB-package it is necessary to perform the following steps:
- First of all we need to install some tools and dependencies:
Code: Select all
sudo apt-get install libtool-bin guile-2.0 pkg-config devscripts debhelper dh-autoreconf
- Go to Ubuntu repository and download the FreeHDL sources for version 0.0.8. (As an option, the source file may also be downloaded from QUCS project). Then unpack this file into some folder.
Code: Select all
mkdir freehdl-build cd freehdl-build wget -c http://archive.ubuntu.com/ubuntu/pool/universe/f/freehdl/freehdl_0.0.8.orig.tar.gz tar -xvf freehdl_0.0.8.orig.tar.gz
- Go to the mentioned Launchpad bugreport and download the archive with patches and build scripts. Unpack the archive into the same folder.
Code: Select all
wget -c https://bugs.launchpad.net/ubuntu/+source/freehdl/+bug/1781054/+attachment/5358031/+files/freehdl_0.0.8-2.2ubuntu4.debian.tar.xz tar -xvf freehdl_0.0.8-2.2ubuntu4.debian.tar.xz
- Copy the extracted
debian
folder into the earlier unpackedfreehdl-0.0.8
folder:Code: Select all
cp -r debian/ freehdl-0.0.8/
- Go to the
freehdl-0.0.8
folder and rundebuild
in it:Code: Select all
cd freehdl-0.0.8 debuild -uc -us
- If everything goes well, you will obtain the
freehdl_0.0.8-2.2ubuntu4_amd64.deb
,libfreehdl0_0.0.8-2.2ubuntu4_amd64.deb
andlibfreehdl0-dev_0.0.8-2.2ubuntu4_amd64.deb
files in thefreehdl-build
folder. So you can just go there and install those files:Code: Select all
cd ../ sudo dpkg -i freehdl_0.0.8-2.2ubuntu4_amd64.deb libfreehdl0_0.0.8-2.2ubuntu4_amd64.deb libfreehdl0-dev_0.0.8-2.2ubuntu4_amd64.deb
make install
by hand.I hope I have not forgotten any missing dependencies or steps, and I hope it will work for you. Please let me know if there are some errors during this procedure, I will try to help resolving them.
Last edited by v_2e on Wed Apr 22, 2020 2:38 pm, edited 2 times in total.
Re: freehdl - qucs - segfault fix?
Hi v_2e
Excellent Work, freehdl now working.
Screebshot on Imgmur:
https://imgur.com/a/zelq3Wf
At one stage running debuild, I encountered another unsatisfied dependency:
***Error****
dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper (>= 5.0.0) dh-autoreconf
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1152:
However after installing dh-autoreconf debuild then compiled without further errors.
Thanks again for solving this and a comprehensive reply.
Excellent Work, freehdl now working.
Screebshot on Imgmur:
https://imgur.com/a/zelq3Wf
At one stage running debuild, I encountered another unsatisfied dependency:
***Error****
dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper (>= 5.0.0) dh-autoreconf
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1152:
However after installing dh-autoreconf debuild then compiled without further errors.
Thanks again for solving this and a comprehensive reply.
Re: freehdl - qucs - segfault fix?
I'm glad to hear it works!
I updated my original post accordingly, for the people searching this solution in the future.hal8000 wrote: ↑Mon Apr 20, 2020 1:14 pmAt one stage running debuild, I encountered another unsatisfied dependency:
***Error****
dpkg-checkbuilddeps: error: Unmet build dependencies: debhelper (>= 5.0.0) dh-autoreconf
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1152:
However after installing dh-autoreconf debuild then compiled without further errors.
Thanks again for solving this and a comprehensive reply.
Re: freehdl - qucs - segfault fix?
Thank you for this! I can finally do digital simulation in Qucs!
Re: freehdl - qucs - segfault fix?
I made an account to thank you.
Solution works under Ubuntu 18, if you have problems with the
debuild -uc -us
Command enforce it by adding -d
It worked for me.
Solution works under Ubuntu 18, if you have problems with the
debuild -uc -us
Command enforce it by adding -d
It worked for me.
Re: freehdl - qucs - segfault fix?
Well, I have a new system running Linux Mint 20 Ulyana Mate and I cannot get Qucs 0.0.20 to make (no installation candidates for libqt5-dev, etc. And I get the following error trying your instructions for freehdl:
Any ideas? Or maybe a deb? 
Statik
Code: Select all
vital_timing.vhdl:1929: +++ - type of MsgOn is BOOLEAN
free(): double free detected in tcache 2
free(): double free detected in tcache 2
/bin/bash: line 1: 76719 Aborted (core dumped) ../v2cc/freehdl-v2cc -lieee -L .. math_real.vhdl > math_real.cc.tmp
make[2]: *** [Makefile:736: math_real.cc] Error 134
make[2]: *** Waiting for unfinished jobs....

Statik