Subject: bug#28094: closed (Re: bug#28094: cuirass doesn’tbuild i686 things)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 26 Aug 2017 08:52:02 +0000

Your bug report

#28094: cuirass doesn’t build i686 things

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
28094: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28094
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#28094: cuirass doesn’t build i686 things
From: [email-masked] (Ludovic Courtès)
To: Ricardo Wurmus <[email-masked]>
Cc: [email-masked]
Date: Sat, 26 Aug 2017 10:51:13 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello!

Ricardo Wurmus <[email-masked]> skribis:

>> diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
>> index 91133c2..9c7e69a 100644
>> --- a/src/cuirass/database.scm
>> +++ b/src/cuirass/database.scm
>> @@ -181,15 +181,30 @@ string."
>>              ((char=? char #\')  (loop (cons* char char chars)))
>>              (else (loop (cons char chars)))))))
>>
>> +;; Extended error codes (see <sqlite3.h>).
>> +;; XXX: This should be defined by (sqlite3).
>> +(define SQLITE_CONSTRAINT 19)
>> +(define SQLITE_CONSTRAINT_PRIMARYKEY
>> +  (logior SQLITE_CONSTRAINT (ash 6 8)))
>> +
>>  (define (db-add-build db build)
>> -  "Store BUILD in database DB."
>> -  (sqlite-exec db "\
>> +  "Store BUILD in database DB.  This is idempotent."
>> +  (catch 'sqlite-error
>> +    (lambda ()
>> +      (sqlite-exec db "\
>>  INSERT INTO Builds (derivation, evaluation, log, output)\
>>    VALUES ('~A', '~A', '~A', '~A');"
>> -               (assq-ref build #:derivation)
>> -               (assq-ref build #:eval-id)
>> -               (assq-ref build #:log)
>> -               (assq-ref build #:output))
>> +                   (assq-ref build #:derivation)
>> +                   (assq-ref build #:eval-id)
>> +                   (assq-ref build #:log)
>> +                   (assq-ref build #:output)))
>> +    (lambda (key who code . rest)
>> +      ;; If we get a primary-key-constraint-violated error, that means we have
>> +      ;; already inserted the same (derivation,eval-id,log) tuple, which we
>> +      ;; can safely ignore.
>> +      (unless (= code SQLITE_CONSTRAINT_PRIMARYKEY)
>> +        (apply throw key who code rest))))
>> +
>
> Unfortunately, re-throwing the error doesn’t print any meaningful error
> message.  To get the error message that I showed above I caught any
> sqlite errors and re-threw the exception only after printing the
> arguments to sqlite-exec:
>
>     (format (current-error-port) "Database error with ~a and ~a~%" msg args)
>
> I think it would be good to include a line like this right after
> “(unless (= code SQLITE_CONSTRAINT_PRIMARYKEY)”.

Good idea.  Pushed with a test case as
72f2b6b77cc4e3d7629bdf34e6daee05398b8de1.

Thanks,
Ludo’.

Subject: cuirass doesn’t build i686 things
From: Ricardo Wurmus <[email-masked]>
To: [email-masked]
Date: Tue, 15 Aug 2017 09:43:47 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Guix,

it looks like Cuirass refuses to build i686 things because that would
violate a UNIQUE constraint:

--8<---------------cut here---------------start------------->8---
@ build-started /gnu/store/2qpglj9ylcb72c51m1qr8qfmdi20aa16-grub-2.02.drv - i686-linux /var/log/guix/drvs/2q//pglj9ylcb72c51m1qr8qfmdi20aa16-grub-2.02.drv.bz2
In ice-9/boot-9.scm:
   230:29 19 (map1 (((#:eval-id . 5) (#:duration . 102000.0) # # ?) ?))
   230:29 18 (map1 (((#:eval-id . 5) (#:duration . 69000.0) # # ?) ?))
   230:29 17 (map1 (((#:eval-id . 5) (#:duration . 86000.0) # # ?) ?))
   230:29 16 (map1 (((#:eval-id . 5) (#:duration . 81000.0) # # ?) ?))
   230:29 15 (map1 (((#:eval-id . 5) (#:duration . 82000.0) # # ?) ?))
   230:29 14 (map1 (((#:eval-id . 5) (#:duration . 68000.0) # # ?) ?))
   230:29 13 (map1 (((#:eval-id . 5) (#:duration . 74000.0) # # ?) ?))
   230:29 12 (map1 (((#:eval-id . 5) (#:duration . 77000.0) # # ?) ?))
   230:29 11 (map1 (((#:eval-id . 5) (#:duration . 98000.0) # # ?) ?))
   230:29 10 (map1 (((#:eval-id . 5) (#:duration . 103000.0) # # ?) ?))
   230:29  9 (map1 (((#:eval-id . 5) (#:duration . 75000.0) # # ?) ?))
   230:29  8 (map1 (((#:eval-id . 5) (#:duration . 74000.0) # # ?) ?))
   230:29  7 (map1 (((#:eval-id . 5) (#:duration . 75000.0) # # ?) ?))
   230:29  6 (map1 (((#:eval-id . 5) (#:duration . 64000.0) # # ?) ?))
   230:17  5 (map1 (((#:eval-id . 5) (#:duration . 147000.0) # # ?) ?))
In cuirass/base.scm:
    145:6  4 (register _)
In ice-9/boot-9.scm:
   268:13  3 (for-each #<procedure 4a51ae0 at cuirass/base.scm:145:?> ?)
In cuirass/database.scm:
    186:2  2 (db-add-build #<<sqlite-db> pointer: #<pointer 0x23455?> ?)
    54:28  1 (sqlite-exec _ _ . _)
In ice-9/eval.scm:
    619:8  0 (_ #(#(#(#(#<directory (sqlite3) 23c0a00> #<?>) #) #) #))
ice-9/eval.scm:619:8: ice-9/eval.scm:619:8: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE const
raint failed: Builds.derivation, Builds.evaluation, Builds.output")'.
--8<---------------cut here---------------end--------------->8---

https://berlin.guixsd.org is configured to provide substitutes for
x86_64 and i686 yet it has barely built any i686 packages so far.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net