-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fragile bootstrap (was cp: cannot stat 'obj/mbld/mbld': No such file or directory) #184
Comments
Hm. What platform? (The change you cited only affects plan 9). It's likely that the bootstrap just wasn't regenerated correctly. If you install, and then run |
Ah, I thought you may remember me. This is on Linux, the linked commit is the current commit I was using, and yes running This is the diff I get afterwards: diff --git a/mk/bootstrap/bootstrap+Linux-x86_64.sh b/mk/bootstrap/bootstrap+Linux-x86_64.sh
index 8bc30cc3..fcaa108c 100755
--- a/mk/bootstrap/bootstrap+Linux-x86_64.sh
+++ b/mk/bootstrap/bootstrap+Linux-x86_64.sh
@@ -1,6 +1,24 @@
#!/bin/sh
# This script is generated by genbootstrap.sh
# to regenerate, run "make bootstrap"
+mkdir -p obj/lib/bio
+mkdir -p obj/lib/bld.sub
+mkdir -p obj/lib/crypto
+mkdir -p obj/lib/date
+mkdir -p obj/lib/escfmt
+mkdir -p obj/lib/fileutil
+mkdir -p obj/lib/flate
+mkdir -p obj/lib/http
+mkdir -p obj/lib/inifile
+mkdir -p obj/lib/iter
+mkdir -p obj/lib/json
+mkdir -p obj/lib/math
+mkdir -p obj/lib/regex
+mkdir -p obj/lib/std
+mkdir -p obj/lib/sys
+mkdir -p obj/lib/testr
+mkdir -p obj/lib/thread
+mkdir -p obj/mbld
pwd=`pwd`
set -x
$pwd/6/6m -O obj -I obj/lib/sys -I obj/lib/std -I obj/lib/bio -I obj/lib/regex -I obj/lib/thread mbld/config.myr |
Something about this is just so sad... |
I've decided to just include |
Keep in mind that genbootstrap assumes you have a working compiler already available. Bootstrap is there only to get you to a working compiler and build system. At some point, I'm thinking of just having the bootstrap pull down prebuilt/presigned tarballs. |
Oh, that's no good then. Ideally the bootstrap should not download anything. It should be possible to download everything necessary for a build and then not require network access beyond that point. edit: some packaging systems will enforce this by using a separate network namespace. |
The root of the problem is that the libraries are built with mbld; Mbld depends on the libraries. The bootstrap script hard codes a line by line replay of what the mbld that generated the bootstrap script did. We need some way of getting a working mbld to build things. That mbld can come from anywhere, but it needs to come from somewhere. Options include a I'm not sure what's the least painful. The bootstrap script keeps getting broken when the libraries change, though, and I'm becoming less of a fan of keeping it up to date. |
(Also, I definitely remember you, but I don't memorize what platform everyone uses -- and even if I did, people sometimes molt, and come back with a new computer.) |
Heh, fair enough. Not sure what to suggests here but keeping tarballs in the git repo sounds like a bad call. The chezscheme guys did this and eventually ended up with a repo over 1G in size. |
What I'm starting to lean towards is that when I do That's a bit inconvenient for someone to build git and demand no internet accesss, but it's probably workable, and a lot easier to maintain. Including bootstrap scripts with the releases would probably be a solution. |
...huh. that's another thought: Adding a commit id to the bootstrap script; when I bootstrap from git, I check out the commit and build that code, which should be in sync with the script. Once I do that, I'd have a working mbld, and can check out the previous branch and rebuild using the bootstrapped mbld. |
What about just doing a pre-commit hook that makes sure the bootstrap is up to date? |
https://github.com/oridb/mc#build
Probably a stupid question, but what is the alternative to building from git that doesn't require running |
Have an old version available.
…On Fri, Dec 14, 2018, 20:43 Kartik Agaram ***@***.*** wrote:
https://github.com/oridb/mc#build
If you are building from development then issue make bootstrap after the
call to ./configure.
https://myrlang.org
When running from git, you may need to first run make bootstrap on the
first installation, or upon significant changes to mbld.
Probably a stupid question, but what is the alternative to building from
git that doesn't require running make bootstrap?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#184 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFIphDMvmnF-Ea_kEGkb6i6VAGqo5nA_ks5u5H4LgaJpZM4Y6V7K>
.
|
You don't distribute binaries of old versions, right? So there's no way for someone coming in now to build it? Is this just not a priority? |
@akkartik AFAIK the bootstrap scripts were already fixed/regenerated on master; this bug is more about the long-term solving of the issue of the build scripts constantly going out of sync. Of course, even if they weren't, the stable releases still work. Building the last release and then Git isn't really that much harder than in languages that are self-hosted. |
Correct: For robustness, I'll probably figure out some sort of continuous integration + commit hook that rewrites the bootstrap soon. The annoyance is that it's going to have to be an external system, because there are a number of platforms that need this. I'll try to get to that in the next week or to. |
Ah, that makes sense thanks. I found this issue because I ran into that
The steps I ran were:
As you can see, rerunning |
The same commit hash (2619187) bootstraps fine on Ubuntu 18.04.1. I hadn't tried that before, thanks. |
The issue has occurred again. I like the suggestion by @kirbyfan64 of using commit hooks or something of that nature because it would be a great shame to loose such an effortless bootstrap, one better than any other language and runtime I've had to compile. As a workaround I've decided to make |
I think that in the next few days, I'll set up a few machines to do the build and regeneration on. |
Should be 90% done now -- the bootstrap script to regenerate across all platforms is committed, but it needs a build farm to run the bootstrap. Some of the machines are local -- partly because I haven't yet set them up on a vultr node, but the OSX machine will probably stay where it is because, well, there are no good hosting providers for mac infrastructure. It may end up in a colo at some point. |
I'm seeing a related issue on OS X:
The build sequence was:
which then failed with the above |
@oridb Perhaps consider using https://man.sr.ht/builds.sr.ht/ for generating bootstraps on multiple platforms? |
Yeah, that's a good idea. I'll probably try to get to it next weekend. |
Building after a clean clone with the following:
Yields a new error:
Interestingly, if I run
make bootstrap
again, it completes without issue.The text was updated successfully, but these errors were encountered: