-
Notifications
You must be signed in to change notification settings - Fork 6
Upload to Debian upstream #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Shouldn't Bintray sunsetting be a separate issue from this? |
I'm a Debian Developer interested in making this happen. I know there's an existing ITP for zig, let me find it... https://lists.debian.org/debian-mentors/2022/06/msg00023.html here we go it looks like current zig is 0.14.0, whereas most of this work was from the 0.9.1 era. let me take a look and see if the copyright situation has improved since 2022. |
Source bootstrapping Zig requires a little bit more effort now as the upstream checks in the WASM build artifact as the bootstrapping mechinism which is updated rather regularly between releases. This indicates the Zig compiler has to be built roughly that number of times to reach the latest version. Guix's demonstrated this boostrapping path is certainly possible though. |
i definitely wouldn't want to be doing the full bootstrapping procedure (despite claims from back in the day); that's just for if you're missing builddeps, right? we'd want to be pulling anything vendored out and using debian-packaged LLVM and glibc. i just built ziglang/zig.git on debian unstable just fine in a single go...am i missing something? |
The stage1/zig1.wasm file (used in bootstrap.c) is the build result of some previous version of the source code. Using it would be akin to using a gcc binary included in its source tarball to build gcc.
|
thanks, grokked |
[schwarzgerat](0) $ file stage1/zig1.wasm
stage1/zig1.wasm: WebAssembly (wasm) binary module version 0x1 (MVP)
[schwarzgerat](0) $ yeah |
so (not having looked at this in any depth) i'm thinking the way to go is a we keep all the hairy multistage stuff in we could do it all as one package, but that would add load to the build servers in the case of frequent |
so it looks like in |
alright i've got |
so it looks like guix is bootstrapping 0.13 by pulling down their 0.12 zig compiler, and using that to build things, if i understand correctly: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/zig.scm#n1572 i'm stuck at the moment trying to build |
so the main sticking point is building this zig1.wasm. i don't see from @andrewrk's blog post how this was done. looking again tonight... |
hopefully this is the key to things. but to do that we need some initial zig, right?
possibly i can build a |
going backwards looking for a zig-bootstrap without an embedded 12.1 -- has it |
initial experiments suggest that 0.10.1 is pretty closely tied to LLVM15 (see llvm-14: [ 82%] Building CXX object CMakeFiles/zigcpp.dir/src/zig_llvm-ar.cpp.o
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp: In function ‘bool isValidInBitMode(const A&)’:
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp:697:24: error: ‘getDefaultKindForHost’ is not a member of ‘llvm::object::Archive’
697 | if (object::Archive::getDefaultKindForHost() != object::Archive::K_AIXBIG)
| ^~~~~~~~~~~~~~~~~~~~~
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp: In function ‘void performWriteOperation(ArchiveOperation, llvm::object::Archive*, std::unique_ptr<llvm::MemoryBuffer>, std::vector<llvm::NewArchiveMember>*)’:
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp:1047:47: error: ‘__gnu_cxx::__alloc_traits<std::allocator<llvm::NewArchiveMember>, llvm::NewArchiveMember>::value_type’ {aka ‘struct llvm::NewArchiveMember’} has no member named ‘detectKindFromObject’
1047 | InferredKind = NewMembersP->front().detectKindFromObject();
| ^~~~~~~~~~~~~~~~~~~~
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp:1049:45: error: ‘__gnu_cxx::__alloc_traits<std::allocator<llvm::NewArchiveMember>, llvm::NewArchiveMember>::value_type’ {aka ‘struct llvm::NewArchiveMember’} has no member named ‘detectKindFromObject’
1049 | InferredKind = NewMembers.front().detectKindFromObject();
| ^~~~~~~~~~~~~~~~~~~~
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp:1054:59: error: ‘__gnu_cxx::__alloc_traits<std::allocator<llvm::NewArchiveMember>, llvm::NewArchiveMember>::value_type’ {aka ‘struct llvm::NewArchiveMember’} has no member named ‘detectKindFromObject’
1054 | Kind = !NewMembersP->empty() ? NewMembersP->front().detectKindFromObject()
| ^~~~~~~~~~~~~~~~~~~~
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp:1055:55: error: ‘getDefaultKindForHost’ is not a member of ‘llvm::object::Archive’
1055 | : object::Archive::getDefaultKindForHost();
| ^~~~~~~~~~~~~~~~~~~~~
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp:1057:55: error: ‘__gnu_cxx::__alloc_traits<std::allocator<llvm::NewArchiveMember>, llvm::NewArchiveMember>::value_type’ {aka ‘struct llvm::NewArchiveMember’} has no member named ‘detectKindFromObject’
1057 | Kind = !NewMembers.empty() ? NewMembers.front().detectKindFromObject()
| ^~~~~~~~~~~~~~~~~~~~
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp:1058:53: error: ‘getDefaultKindForHost’ is not a member of ‘llvm::object::Archive’
1058 | : object::Archive::getDefaultKindForHost();
| ^~~~~~~~~~~~~~~~~~~~~
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp: In function ‘int ar_main(int, char**)’:
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp:1330:24: error: ‘getDefaultKindForHost’ is not a member of ‘llvm::object::Archive’
1330 | if (object::Archive::getDefaultKindForHost() == object::Archive::K_AIXBIG) {
| ^~~~~~~~~~~~~~~~~~~~~
/home/dank/src/dsscaw/zig-10-bootstrap-0.10.1+dfsg.1/zig/src/zig_llvm-ar.cpp:1391:28: error: ‘getDefaultKindForHost’ is not a member of ‘llvm::object::Archive’
1391 | if (object::Archive::getDefaultKindForHost() ==
| ^~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/zigcpp.dir/build.make:93: CMakeFiles/zigcpp.dir/src/zig_llvm-ar.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/zigcpp.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
[schwarzgerat](2) $ |
17+ lack |
the commit is ziglang/zig-bootstrap@d3e821f but it looks like this has always been "specify the major version". |
alright, i got zig-10-bootstrap compiling using LLVM17 by copying back zig-13-bootstrap's |
this does not appear to work with llvm19, at least not easily (all the code in |
hrmmm, |
so it's looking like we'll need:
this will require getting ftpmasters (and probably llvm team) to buy in to introducing llvm-15 (but as noted, we already have llvm-14 in sid, but this still isn't a good thing), in addition to introducing and we'd need to carry all this forward through eternity, it seems. if any of this toolchain gets knocked out, we lose everything up through let me take another look at guix, knowing what i know now, and make sure they're not doing something i'm missing. alternatively, we could dump this into contrib =]. |
there's a new bug in DBTS for this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1092895 we're not going to have to use contrib, nor mess with i expect this to be in the NEW queue by the end of this week. |
honestly this repo ought probably be archived up. it talks about the 0.6.0 release on the front page, and this ought be in debian+ubuntu very soon. but do as you will! |
Reflections on trusting trust aside, you can't recreate zig1.wasm from Zig 0.13's source since the one included with that version was created from the source code a few weeks before. |
right, but we could use the resulting zig to build a fresh |
Bintray is sunsetting, and even if another hosting facility is found, it'll still be better if zig is available in Debian's repo. I understand that the uploading process to Debian is tedious, but I'd love to see it happens 🥺
The text was updated successfully, but these errors were encountered: