Xen currently does not build on x86_64-linux 
(http://ci.guix.gnu.org/search?query=xen+system:x86_64-linux). It will build if 
all instances of .note.gnu.build-id are quoted in xen/arch/x86/xen.lds.S. This 
is because of the hyphen in the symbol in the argument to ADDR. I tested this 
by placing the following into a file named xen.scm and running guix build -f 
xen.scm:

```(use-modules (gnu)             (guix build utils)             (guix 
packages)             (srfi srfi-1))(use-package-modules virtualization)

(define (transform-keyword-value search-key transformer input output)  (let 
((next-key (first input))        (next-value (second input))        (remaining 
(drop input 2)))    (if (eq? search-key next-key)        (append (list 
search-key (transformer next-value)) remaining output)        
(transform-keyword-value search-key transformer remaining (cons* next-key 
next-value output)))))

(define (add-quotation-phase original-phases)  `(modify-phases ,original-phases 
   (add-before 'patch 'quotation-phase      (lambda (arg . args)        (format 
#t "PWD: ~A~%" (getcwd))        (substitute* "xen/arch/x86/xen.lds.S"          
((".note.gnu.build-id")           "\".note.gnu.build-id\""))))))

(package  (inherit xen)  (arguments (transform-keyword-value #:phases 
add-quotation-phase (package-arguments xen) '())))```

This produces the output path 
gnu/store/jzv2s5d01g7cz136xjcc9d27sdkjpdjd-xen-4.14.1 on this system:

```$ guix describeGeneration 6 Feb 25 2022 08:10:38 (current)  guix ed8d236    
repository URL: https://git.savannah.gnu.org/git/guix.git    branch: master    
commit: ed8d236eb938bc123a9ca8a079fea95edf7df6cd```

I'm not sure if this should be reported elsewhere. It might be that it's 
intended that symbols with hyphens need to be quoted when used in numeric 
expressions (which would make sense, it could be confused with subtraction) in 
which case Xen's script needs to be updated. It might be that ld is supposed to 
be able to understand that it's part of the symbol, in which case there's a bug 
in ld. But neither makes sense to me. Xen's package definition (including the 
source form) has not changed since the successful builds in December, so it 
worked before. Quoting the symbol seems reasonable based on how other languages 
behave, but .note.gnu.build-id seems like a standard practice based on some 
searches, and it's mentioned in ld's man page, so I would expect it to work 
easily. If the hyphen was going to cause issues, would the standard practice 
not use an underscore? I don't understand enough to know where else this should 
be reported, but the above code fixes the guix build which is what I care about 
most.

Attachment: signature.asc
Description: OpenPGP digital signature

  • Fixing xen build Development of GNU Guix and the GNU System distribution.

Reply via email to