You are not logged in.

#1 2025-01-18 16:55:06

woolgatherer
Member
Registered: 2025-01-18
Posts: 4

Encountering Weird Error When Trying to Build Package From AUR

Hello. I'm trying to install the Project IceStorm toolchain to do some FPGA  work. I downloaded and built IceStorm and Arachne-PNR without any problems, but I'm encountering a weird error when I try to build Yosys.

Here is what the terminal outputs:

Build successful.
==> Starting check()...
[Makefile.conf] CONFIG := gcc
[Makefile.conf] ENABLE_LIBYOSYS=1
[Makefile.conf] ENABLE_LIBYOSYS=1
[Makefile.conf] ABCPULL=0
cd tests/arch/anlogic/ && bash run-test.sh
make -C tests/arch/anlogic -f run-test.mk
make[1]: Entering directory '/home/*/Downloads/git/yosys-git/src/yosys/tests/arch/anlogic'
double free or corruption (out)
make[1]: *** [run-test.mk:6: anlogic-add_sub.ys] Aborted (core dumped)
make[1]: Leaving directory '/home/*/Downloads/git/yosys-git/src/yosys/tests/arch/anlogic'
make: *** [Makefile:897: makefile-tests/tests/arch/anlogic] Error 2
rm tests/arch/anlogic/run-test.mk
==> ERROR: A failure occurred in check().
    Aborting...

I can forgo the check by including the

--nocheck

option, but that means removing iverilog as a dependency, which as far as I can tell is something that I need. Help?

Offline

#2 2025-01-18 17:16:28

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,245

Re: Encountering Weird Error When Trying to Build Package From AUR

Iverilog appears to be used only during the check() function, it shouldn't be needed at runtime.

Welcomne to arch forums, please post full build output.

Moderator Note
Moving to AUR issues.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2025-01-18 18:00:06

woolgatherer
Member
Registered: 2025-01-18
Posts: 4

Re: Encountering Weird Error When Trying to Build Package From AUR

Lone_Wolf wrote:

Iverilog appears to be used only during the check() function, it shouldn't be needed at runtime.

In that case I'll build with the

--nocheck

option.

Lone_Wolf wrote:

Welcomne to arch forums, please post full build output.

I would've, but the full build output spans many, many lines. The package took quite some time to build.

Offline

#4 2025-01-18 18:28:57

loqs
Member
Registered: 2014-03-06
Posts: 18,227

Re: Encountering Weird Error When Trying to Build Package From AUR

Seems to be an issue with LTO. I was able to pass check with the following changes:

diff --git a/PKGBUILD b/PKGBUILD
index d4c0d12..6a11792 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,7 +17,8 @@ conflicts=("yosys")
 depends=('tcl' 'libffi' 'python' 'boost-libs')
 optdepends=('graphviz: Schematics display support' 'xdot: Design netlist display support')
 makedepends=('git' 'mercurial' 'boost')
-checkdepends=('iverilog' 'clang')
+checkdepends=('iverilog' 'clang' 'gtkwave')
+options=(!lto)
 source=('git+https://github.com/YosysHQ/yosys.git'
         'git+https://github.com/YosysHQ/abc.git')
 

Offline

#5 2025-01-18 20:01:01

woolgatherer
Member
Registered: 2025-01-18
Posts: 4

Re: Encountering Weird Error When Trying to Build Package From AUR

loqs wrote:

Seems to be an issue with LTO. I was able to pass check with the following changes:

diff --git a/PKGBUILD b/PKGBUILD
index d4c0d12..6a11792 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,7 +17,8 @@ conflicts=("yosys")
 depends=('tcl' 'libffi' 'python' 'boost-libs')
 optdepends=('graphviz: Schematics display support' 'xdot: Design netlist display support')
 makedepends=('git' 'mercurial' 'boost')
-checkdepends=('iverilog' 'clang')
+checkdepends=('iverilog' 'clang' 'gtkwave')
+options=(!lto)
 source=('git+https://github.com/YosysHQ/yosys.git'
         'git+https://github.com/YosysHQ/abc.git')
 

How can I make these changes?

Offline

#6 2025-01-18 21:06:22

loqs
Member
Registered: 2014-03-06
Posts: 18,227

Re: Encountering Weird Error When Trying to Build Package From AUR

I uplooaded the diff to a pastebin to make it easier for you to apply. You can apply it with:

$ cd yosys-git
$ git reset --hard
HEAD is now at 4fb837c bump .SRCINFO
$ git clean -fx
$ curl -o PKGBUILD.diff http://0x0.st/8HPG.diff
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   513  100   513    0     0   3447      0 --:--:-- --:--:-- --:--:--  3466
$ git apply -v PKGBUILD.diff
Checking patch PKGBUILD...
Applied patch PKGBUILD cleanly.

Then build the package as you would normally.

Offline

#7 2025-01-19 19:01:31

woolgatherer
Member
Registered: 2025-01-18
Posts: 4

Re: Encountering Weird Error When Trying to Build Package From AUR

loqs wrote:

I uplooaded the diff to a pastebin to make it easier for you to apply. You can apply it with:

$ cd yosys-git
$ git reset --hard
HEAD is now at 4fb837c bump .SRCINFO
$ git clean -fx
$ curl -o PKGBUILD.diff http://0x0.st/8HPG.diff
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   513  100   513    0     0   3447      0 --:--:-- --:--:-- --:--:--  3466
$ git apply -v PKGBUILD.diff
Checking patch PKGBUILD...
Applied patch PKGBUILD cleanly.

Then build the package as you would normally.

That seemed to have worked. Thanks.

Offline

#8 2025-01-20 11:52:10

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,245

Re: Encountering Weird Error When Trying to Build Package From AUR

If you're satisified with the outcome, please prepend [Solved] to the thread title (edit first post)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB