unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: Guillaume Le Vaillant <glv@posteo.net>
Cc: 49161@debbugs.gnu.org, Brice Waegeneire <brice@waegenei.re>
Subject: bug#49161: kicad-5.1.6 fails to build
Date: Tue, 22 Jun 2021 13:29:21 +0000	[thread overview]
Message-ID: <8dbc4cb415de97178817c7736a7152353f0366f0.camel@posteo.net> (raw)
In-Reply-To: <87tulqds5s.fsf@kitej>

[-- Attachment #1: Type: text/plain, Size: 899 bytes --]

Em ter, 2021-06-22 às 12:01 +0000, Guillaume Le Vaillant escreveu:
> Vinicius Monego <monego@posteo.net> skribis:
> 
> > > In particular the /gnu/store/...-libngspice-34/include/config.h
> > > seems suspicious.
> > 
> > Good catch. Indeed, that file should be removed.
> > 
> > Kicad takes a long time to build on my machine. I am attaching a
> > diff
> > that removes config.h and should fix the compilation if anyone can
> > confirm.
> 
> I tried applying your diff and with it kicad compiles fine and works.
> Could you send a formatted patch?

Done.

I am sending the two changes in different patches because I read in [1]
that KiCad uses config.h to extract version information about ngspice.
If simulations are working without config.h, then both patches can be
pushed. The history_file problem in the KiCad compilation is related to
readline only.

[1] https://bugs.archlinux.org/task/70569

[-- Attachment #2: 0001-gnu-libngspice-Fix-KiCad-compilation.patch --]
[-- Type: text/x-patch, Size: 1095 bytes --]

From 7722427a3f150f5e2249ba2ea8a0c024b4bbf02d Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Tue, 22 Jun 2021 09:46:32 -0300
Subject: [PATCH 1/2] gnu: libngspice: Fix KiCad compilation.

* gnu/packages/engineering.scm (libngspice)[arguments]<#:configure-flags>:
Pass "--with-readline=no".
---
 gnu/packages/engineering.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 5b1c8b7938..302b5c715e 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1721,7 +1721,9 @@ high-performance parallel differential evolution (DE) optimization algorithm.")
              "--enable-ciderlib"
              "--enable-xspice"
              "--with-ngshared"
-             "--with-readline=yes")))
+             ;; Readline must be disabled to build KiCad with ngspice 34.  See
+             ;; https://bugs.archlinux.org/task/70563 for reference.
+             "--with-readline=no")))
     (native-inputs
      `(("bison" ,bison)
        ("flex" ,flex)))
-- 
2.32.0


[-- Attachment #3: 0002-gnu-libngspice-Delete-autogenerated-config.h.patch --]
[-- Type: text/x-patch, Size: 1768 bytes --]

From d980b5bcea3fd7afc3f1e094dbef3c2426e645e8 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Tue, 22 Jun 2021 09:53:41 -0300
Subject: [PATCH 2/2] gnu: libngspice: Delete autogenerated config.h.

* gnu/packages/engineering.scm (libngspice)[arguments]<#:phases>: Rename phase
'delete-script-files to 'delete-scripts-and-config and delete config.h.
---
 gnu/packages/engineering.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 302b5c715e..b2b9d54238 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1711,11 +1711,16 @@ high-performance parallel differential evolution (DE) optimization algorithm.")
              (substitute* "man/man1/Makefile.in"
                (("^man_MANS = ngspice\\.1 ngnutmeg\\.1 ngsconvert\\.1 ngmultidec\\.1")
                 "man_MANS = "))))
-         (add-after 'install 'delete-script-files
+         (add-after 'install 'delete-scripts-and-config
            (lambda* (#:key outputs #:allow-other-keys)
              (delete-file-recursively
               (string-append (assoc-ref outputs "out")
-                             "/share/ngspice/scripts")))))
+                             "/share/ngspice/scripts"))
+             ;; This file is autogenerated by the configure script and should
+             ;; not be distributed.  It could be removed in ngspice 35.  See
+             ;; https://bugs.archlinux.org/task/70569 for reference.
+             (delete-file (string-append (assoc-ref outputs "out")
+                                         "/include/config.h")))))
        #:configure-flags
        (list "--enable-openmp"
              "--enable-ciderlib"
-- 
2.32.0


  reply	other threads:[~2021-06-22 13:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 16:23 bug#49161: kicad-5.1.6 fails to build bdju via Bug reports for GNU Guix
2021-06-22  6:36 ` Brice Waegeneire
2021-06-22  9:42   ` Vinicius Monego
2021-06-22  9:42   ` Vinicius Monego
2021-06-22 11:04   ` Vinicius Monego
2021-06-22 12:01     ` Guillaume Le Vaillant
2021-06-22 13:29       ` Vinicius Monego [this message]
2021-06-22 13:39       ` Vinicius Monego
2021-06-22 14:54         ` Guillaume Le Vaillant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8dbc4cb415de97178817c7736a7152353f0366f0.camel@posteo.net \
    --to=monego@posteo.net \
    --cc=49161@debbugs.gnu.org \
    --cc=brice@waegenei.re \
    --cc=glv@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).