help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bootstrappable Release Build of Rust Application


From: Antoine Poinsot
Subject: Re: Bootstrappable Release Build of Rust Application
Date: Thu, 18 Apr 2024 08:07:47 +0000

Thanks for sharing.

Unfortunately the very same `make-gcc-toolchain` keeps failing to compile for 
me, even with the same gcc and glibc versions as you:
```
In file included from ../include/pthread.h:1,                                   
                                                                                
                                                                                
                                                                                
                                                                                
                        
                 from ../sysdeps/nptl/thread_db.h:25,                           
                                                                                
                                                                                
                                                                                
                                                                                
                        
                 from ../nptl/descr.h:32,                                       
                                                                                
                                                                                
                                                                                
                                                                                
                        
                 from ../sysdeps/x86_64/nptl/tls.h:130,                         
                                                                                
                                                                                
                                                                                
                                                                                
                        
                 from ../include/link.h:51,                                     
                                                                                
                                                                                
                                                                                
                                                                                
                        
                 from ../include/dlfcn.h:4,                                     
                                                                                
                                                                                
                                                                                
                                                                                
                        
                 from ../sysdeps/generic/ldsodefs.h:32,                         
                                                                                
                                                                                
                                                                                
                                                                                
                        
                 from ../sysdeps/x86/ldsodefs.h:64,                             
                                                                                
                                                                                
                                                                                
                                                                                
                        
                 from ../sysdeps/gnu/ldsodefs.h:46,                             
                                                                                
                                                                                
                                                                                
                                                                                
                        
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,                 
                                                                                
                                                                                
                                                                                
                                                                                
                        
                 from <stdin>:2:                                                
                                                                                
                                                                                
                                                                                
                                                                                
                        
../sysdeps/nptl/pthread.h:719:47: error: argument 1 of type ‘struct 
__jmp_buf_tag *’ declared as a pointer [-Werror=array-parameter=]               
                                                                                
                                                                                
                                                                                
                                    
  719 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) 
__THROWNL;                                                                      
                                                                                
                                                                                
                                                                                
                           
      |                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~
```

Code is basically the same as yours:
```
(define gcc-toolchain-2.31
  (make-gcc-toolchain gcc glibc-2.31))

(package-with-c-toolchain rust-liana_gui-5.0.0 `(("gcc-toolchain" 
,gcc-toolchain-2.31)))
```


On Wednesday, April 17th, 2024 at 5:17 PM, Philip McGrath 
<philip@philipmcgrath.com> wrote:

> Hi,
> 
> On Wed, Apr 17, 2024, at 6:28 AM, Antoine Poinsot wrote:
> 
> > Good morning all,
> > 
> > I've been working on using Guix for the reproducible builds of my Rust
> > software. My main question is about linking my program against an older
> > glibc version (or better yet, statically linking it against musl).
> > 
> > [...]
> > 
> > Now this links against glibc 2.35. I need to target ideally 2.29 or at
> > most 2.31. That's what i'm seeking help for. I've tried the obvious:
> > `guix build -f test2.scm --with-input=glibc=glibc@2.29`
> 
> 
> My knowledge in this area is very shallow, but I also have wanted to link 
> against old glibc versions, for somewhat similar purposes. The best I've got 
> so far is at [1], in which I successfully use `make-gcc-toolchain` to use 
> `gcc` with `glibc-2.31` and define a helper function 
> `package-with-old-stable-libc` to supply it to `package-with-c-toolchain`. I 
> use that in [2] to compile the library I'm interested in against the old 
> glibc version. While this is the best solution I've found so far, I'm still 
> not entirely happy with it! While the code I'm pointing you to isn't too bad, 
> other parts of the overall setup are overly complex (in fairness, largely to 
> also build for Apple platforms), and I haven't managed to build against Glibc 
> 2.23 to fix [3]. But hopefully some of this might be useful, or, better yet, 
> someone might suggest a better solution!
> 
> Philip
> 
> [1]: 
> https://github.com/libgit2-racket/native-libs/blob/bd400daed8d4e38db6fc472d4ec82b99a884303c/guix/old-stable-libc.scm
> [2]: 
> https://github.com/libgit2-racket/native-libs/blob/bd400daed8d4e38db6fc472d4ec82b99a884303c/guix/extracted/non-apple.scm
> [3]: https://github.com/libgit2-racket/libgit2/issues/2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]