IRC channel logs


back to list of logs

<VedantT>I was wondering if I could get assistance with this?
<VedantT>damo22 we used hurd/ from your patch in 2021:
<VedantT>Auto generated from bindgen:
<VedantT>Given this:
<VedantT>extern "C" {
<VedantT>    pub fn stat64(
<VedantT>        __file: *const ::c_char,
<VedantT>        __buf: *mut stat64,
<VedantT>    ) -> ::c_int;
<VedantT>    pub struct stat64 {
<VedantT>        pub st_fstype: ::c_int,
<VedantT>        pub st_fsid: __fsid_t,
<VedantT>        pub st_ino: __ino64_t,
<VedantT>        pub st_gen: ::c_uint,
<VedantT>        pub st_rdev: __dev_t,
<VedantT>        pub st_mode: __mode_t,
<VedantT>        pub st_nlink: __nlink_t,
<VedantT>Is there a way I can modify this fix the casting issue?
<damo22>VedantT: the is wrong, i copied it from some other port
<VedantT>Is there a place I can send my current so you can take a look at it?
<damo22>you can put your fork of the project online somewhere?
<damo22>i dont know what the correct values should be, that is part of the scope of the project
<damo22>what i gave you was an example and it compiles up to libstd
<damo22>but you need to change it so its correct
<damo22>and add anything that is missing
<damo22>bindgen is a tool that can help you create the missing bits
<damo22>but i doubt it will make a complete port
<VedantT>I emailed the file to you for review, I need to set a local repo to track changes my commits are not up to date on my fork
<damo22>better email it to the mailing list
<damo22>then more people can discuss
<damo22>VedantT: if you modified my patch, you should provide only a diff of what you changed that applies to some base branch
<damo22>otherwise nobody can review it
<damo22>and please compose some kind of message in the body that asks what you would like people to do with your message
<damo22>see examples in the mailing list archives
<damo22>VedantT: did you get a development environment working and compile my branch?
<VedantT>yes I was able to
<damo22>ok, what happened?
<damo22>i assume it compiled mostly and failed somewhere
<VedantT>same thing that you mentioned in the email tons of errors
<damo22>so what is your plan
<damo22>do you know how to fix errors one by one?
<VedantT>so we added most of the files in your patch, auto gen using input.h to compile stage 1, and that is where we are. Fixing errors, recompiling and adding missing include directives to generate the appropriate missing structs, fns. As of now, we are mostly done
<damo22>oh ok thats great
<damo22>did you rebase my work onto latest rust and continue working on top of that?
<VedantT>we have most of the required includes, the needed functions and I am following how linux-like has it through and through in libc and hurd
<damo22>so where are you at now with it
<damo22>perhaps you can share your branch somewhere
<damo22>are there a few errors left?
<VedantT>I had a lot of errors in std, fixed them, not a a casting error in libc
<damo22>maybe you can write up a summary of this conversation to describe where you are, and the remaining challenges along with a link to your branch somewhere, and send that to the mailing list
<damo22>that would be very useful
<damo22>is there anything specific you need help with now
<damo22>who is "we"? do you have other people helping you work on this too?
<VedantT>can I send you the libc and rust folders as zip so you can run it on your end?
<VedantT>I am being assisted by my mentor for this project youpi
<damo22>i dont think its helpful to send a zip, can you push your fork somewhere public and share the link to the git repo with your branch?
<damo22>you can ask youpi if that is acceptable, but since the code is free software i dont think you need permission
<damo22>as i suggested earlier, a summary with the link would be great
<youpi>VedantT: you shouldn't need to modify the stat64 struct: see that linux has something very similar
<youpi>you just need to enable the codepaths similar to linux, to get the plumbing done the same
<damo22>i may have copied it from bsd
<damo22>unless you guys changed it
<youpi>we did
<youpi>we took it from the binding output
<VedantT>all the modifications
<VedantT>Will take a look youpi thank you for clarifying that!
<youpi>(and it's the same for dirent64)
<damo22>you probably didnt need to commit all the hurd headers
<damo22>also your rust branch is 3440 commits behind master
<VedantT>that branch needs to be included for the report I have to work on for this project so I thought it might be a better option to include, or maybe I could have provided the commands to add them :)
<VedantT>youpi sure I got a similar error for dirent due to the same issue will keep note of it
<damo22>VedantT: ok, your rust branch looks very old base commit, from 2022?
<damo22>or is that on purpose
<solid_black>hello :)
<solid_black>hi damo22!
<youpi>damo22: ? I see it rather based on eee6b31c0c3b7c3ad8733957eaa122ae1a07e299 ?
<damo22>mod-hurd branch says "This branch is 7 commits ahead, 3441 commits behind rust-lang:master."
<youpi>well, yes, there have been 3441 since early july
<youpi>rust is a *VERY* moving thing :)
<damo22>that would make it difficult to get a large patch in
<VedantT>I forked from main a month ago
<damo22>VedantT: yes, my bad, sorry
<damo22>i didnt realise there are so many commits in rust
<VedantT>I just noticed as well when I pushed all my changes :)
<youpi>damo22: we'll have to rebase, yes
<youpi>but let's get something working for a start :)
<damo22>can you retarget the compiler for x86_64 to hurd once you have a working port?
<damo22>then you dont need to compile hurd's rust from scratch
<damo22>or i386
<youpi>not sure what you mean, but we can have canadian builds with rust
<youpi>i.e. cross-build a hurd-for-hurd rustc
<damo22>i know llvm lets you lower IR to different targets
<damo22>so you could compile the rustc to IR and then target it to hurd?
<youpi>again, not sure what you mean
<youpi>eventually we want a rustc that runs on hurd and targets hurd
<youpi>setting host and target to hurd in stage2 does achieve that
<youpi>and then we'll be able to just build rustc on hurd, natively
<youpi>using the cross-built rustc
<damo22>i think there may be a shortcut if you have a i686-unknown-linux rustc you can run rustc on itself and output a i686-unknown-hurd rustc binary if your original one knows about hurd (?)
<youpi>well, that's what we are doing ?
<youpi>(actually not even need to use a i686-unknown-linux, x86_64-unknown-linux can build i686-unknown-hurd fine)
<VedantT>damo22 Stage1 Built