www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - make AUTO_BOOTSTRAP=1 fails and suggests to use AUTO_BOOTSTRAP=1

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
I mentioned this in the past, apparently it hasn't been resolved.

Tried to install a dev tree for dmd from complete scratch. So:

$ curl https://raw.githubusercontent.com/dlang/tools/master/setup.sh 
/tmp/setup.sh
$ /tmp/setup.sh The script gets everything from github nice and fast but then fails to download http://downloads.dlang.org/releases/2.x/2.095.0/dmd.2.095.0.linux.tar.xz for some reason. Anyway, I then try to run: $ cd dmd $ make AUTO_BOOTSTRAP=1 -f posix.mak As mentioned in the title, the command fails and confusingly suggest using AUTO_BOOTSTRAP=1, which is already there. If the plan is to give up boostrapping, fine but let's eliminate the code. The way things are now we both pay for the technical debt and we don't profit from it. Of course it would be much better if bootstrapping actually worked.
Apr 30 2021
next sibling parent reply MoonlightSentinel <moonlightsentinel disroot.org> writes:
On Friday, 30 April 2021 at 19:22:57 UTC, Andrei Alexandrescu 
wrote:
 As mentioned in the title, the command fails and confusingly 
 suggest using AUTO_BOOTSTRAP=1, which is already there.
What's the error message? `make AUTO_BOOTSTRAP=1 -f posix.mak` builds just fine for me
Apr 30 2021
next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 4/30/21 3:31 PM, MoonlightSentinel wrote:
 On Friday, 30 April 2021 at 19:22:57 UTC, Andrei Alexandrescu wrote:
 As mentioned in the title, the command fails and confusingly suggest 
 using AUTO_BOOTSTRAP=1, which is already there.
What's the error message? `make AUTO_BOOTSTRAP=1 -f posix.mak` builds just fine for me
Something like "Cannot find the D compiler, download one or use AUTO_BOOTSTRAP=1". To repro, you'd need to make your current dmd installation temporarily invisible.
Apr 30 2021
parent reply MoonlightSentinel <moonlightsentinel disroot.org> writes:
On Friday, 30 April 2021 at 21:49:12 UTC, Andrei Alexandrescu 
wrote:
 To repro, you'd need to make your current dmd installation 
 temporarily invisible.
I've sucessfully built dmd in a fresh Ubuntu container using `make -f posix.mak AUTO_BOOTSTRAP=1`... What system are you on?
Apr 30 2021
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 4/30/21 9:06 PM, MoonlightSentinel wrote:
 On Friday, 30 April 2021 at 21:49:12 UTC, Andrei Alexandrescu wrote:
 To repro, you'd need to make your current dmd installation temporarily 
 invisible.
I've sucessfully built dmd in a fresh Ubuntu container using `make -f posix.mak AUTO_BOOTSTRAP=1`... What system are you on?
WSL2 running Ubuntu under Windows. So your experiment found dmd, or didn't find it and downloaded it automatically?
Apr 30 2021
next sibling parent MoonlightSentinel <moonlightsentinel disroot.org> writes:
On Saturday, 1 May 2021 at 01:07:33 UTC, Andrei Alexandrescu 
wrote:
 So your experiment found dmd, or didn't find it and downloaded 
 it automatically?
Automatically downloaded [1] and sucessfully compiled build.d & dmd. [1] http://downloads.dlang.org/releases/2.x/2.095.0/dmd.2.095.0.linux.tar.xz
Apr 30 2021
prev sibling next sibling parent MoonlightSentinel <moonlightsentinel disroot.org> writes:
On Saturday, 1 May 2021 at 01:07:33 UTC, Andrei Alexandrescu 
wrote:
 WSL2 running Ubuntu under Windows.
Weird, the same setup works for me using current master (I've purged my local DMD/LDC installations beforehand).
Apr 30 2021
prev sibling parent reply Petar Kirov [ZombineDev] <petar.p.kirov gmail.com> writes:
On Saturday, 1 May 2021 at 01:07:33 UTC, Andrei Alexandrescu 
wrote:
 WSL2 running Ubuntu under Windows.

 [..]
Something is definitely wrong with your computer. I installed a fresh instance of Ubuntu 20.04 on WSL2 and everything worked just fine. See for yourself: https://asciinema.org/a/Poq5VWHHDO7005UjIeQulb3Ye Here's information about my Windows installation: ```
 systeminfo
Host Name: DESKTOP-HPVQAA5 OS Name: Microsoft Windows 10 Pro OS Version: 10.0.19042 N/A Build 19042 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free ``` ```
 wsl --list -v
NAME STATE VERSION * Ubuntu-20.04 Running 2 Ubuntu Stopped 1 ``` After installing the Ubuntu and before starting the asciinema to record the, I just had to install `build-essential` and `python3-pip`: ``` $ history 1 sudo apt update && sudo apt install build-essential python3-pip 2 sudo pip3 install asciinema 3 asciinema rec 4 history ``` I also tried on another clean Ubuntu and just installing `build-essential` (without `python3-pip`) works as well.
May 01 2021
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 5/1/21 4:51 PM, Petar Kirov [ZombineDev] wrote:
 On Saturday, 1 May 2021 at 01:07:33 UTC, Andrei Alexandrescu wrote:
 WSL2 running Ubuntu under Windows.

 [..]
Something is definitely wrong with your computer.
Thanks to all who tested - the problem is indeed with WSL (or my installation thereof). For some reason, network connectivity from within WSL (at least on my machine) becomes really bad after a while and I need to shutdown and restart WSL in order to restore speed. At one point I couldn't push to git anymore. Because of that, the download performed by the installation script was not finished. When I tried to manually run make, the system was not provisioned properly. There would be the argument that that code should belong in the makefile as opposed to the installation script (as it was before) but no matter. Thanks!
May 02 2021
next sibling parent reply Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Sunday, 2 May 2021 at 11:49:06 UTC, Andrei Alexandrescu wrote:
 On 5/1/21 4:51 PM, Petar Kirov [ZombineDev] wrote:
 [...]
Thanks to all who tested - the problem is indeed with WSL (or my installation thereof). For some reason, network connectivity from within WSL (at least on my machine) becomes really bad after a while and I need to shutdown and restart WSL in order to restore speed. At one point I couldn't push to git anymore. Because of that, the download performed by the installation script was not finished. When I tried to manually run make, the system was not provisioned properly. There would be the argument that that code should belong in the makefile as opposed to the installation script (as it was before) but no matter. Thanks!
Are you running WSL1 or WSL2 btw? https://docs.microsoft.com/en-us/windows/wsl/compare-versions
May 02 2021
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 5/2/21 10:17 AM, Imperatorn wrote:
 On Sunday, 2 May 2021 at 11:49:06 UTC, Andrei Alexandrescu wrote:
 On 5/1/21 4:51 PM, Petar Kirov [ZombineDev] wrote:
 [...]
Thanks to all who tested - the problem is indeed with WSL (or my installation thereof). For some reason, network connectivity from within WSL (at least on my machine) becomes really bad after a while and I need to shutdown and restart WSL in order to restore speed. At one point I couldn't push to git anymore. Because of that, the download performed by the installation script was not finished. When I tried to manually run make, the system was not provisioned properly. There would be the argument that that code should belong in the makefile as opposed to the installation script (as it was before) but no matter. Thanks!
Are you running WSL1 or WSL2 btw? https://docs.microsoft.com/en-us/windows/wsl/compare-versions
WSL2. I had no idea it has these odd behaviors. Thought what our unittests do is fairly common.
May 06 2021
prev sibling parent reply Petar Kirov [ZombineDev] <petar.p.kirov gmail.com> writes:
On Sunday, 2 May 2021 at 11:49:06 UTC, Andrei Alexandrescu wrote:
 On 5/1/21 4:51 PM, Petar Kirov [ZombineDev] wrote:
 On Saturday, 1 May 2021 at 01:07:33 UTC, Andrei Alexandrescu 
 wrote:
 WSL2 running Ubuntu under Windows.

 [..]
Something is definitely wrong with your computer.
Thanks to all who tested - the problem is indeed with WSL (or my installation thereof).
Happy to help ;)
 For some reason, network connectivity from within WSL (at least 
 on my machine) becomes really bad after a while and I need to 
 shutdown and restart WSL in order to restore speed. At one 
 point I couldn't push to git anymore.
 
 Because of that, the download performed by the installation 
 script was not finished. When I tried to manually run make, the 
 system was not provisioned properly.
I haven't experienced this myself (though I haven't used WSL regularly since about 1-2 years - I just rebooted to Windows to try out the setup.sh script), but looking for similar issues online it seems your computer is likely not an exception: https://github.com/microsoft/WSL/issues/4901 From what I gather, it may have something to do with Large Send Offload, with some people reporting that disabling this feature fixed the problem for them (but it seems that you have to disable it after every reboot). You can try if that works for you like this: 1. Go to Control Panel -> Network and Internet -> Network Connections 2. Right click vEthernet (WSL) -> Properties 3. Click 'Configure' 4. Click 'Advanced' tab 5. Disable both 'Large Send Offload Version 2' If that fixes the issue, but you want to automate it, this PowerShell cmdlet should do the trick: https://docs.microsoft.com/en-us/powershell/module/netadapter/disable-netadapterlso?view=windowsserver2019-ps
 There would be the argument that that code should belong in the 
 makefile as opposed to the installation script (as it was 
 before) but no matter.
As far as I can see, the `AUTO_BOOTSTRAP` logic is still part of the `dmd/src/posix.mak` Makefile: https://github.com/dlang/dmd/blob/b8ffb017c8c802827be98722b838cb120b9d918b/src/posix.mak#L46-L52 Sebastian did [factor it out](https://github.com/dlang/dmd/commit/d42e0c7ccc73c484d4cfb222a97394bb0b50f964#diff-cc85afadd8729c6fb4462f47bb525ecc69d41137160be b4cfdab3edca3e5e9e) to a separate [`bootstrap.sh` script](https://github.com/dlang/dmd/blob/v2.096.1/src/bootstrap.sh), but other than that I think it should work the same as it did before.
May 02 2021
parent Petar Kirov [ZombineDev] <petar.p.kirov gmail.com> writes:
On Sunday, 2 May 2021 at 18:22:47 UTC, Petar Kirov [ZombineDev] 
wrote:
 For some reason, network connectivity from within WSL (at 
 least on my machine) becomes really bad after a while and I 
 need to shutdown and restart WSL in order to restore speed. At 
 one point I couldn't push to git anymore.
 
 Because of that, the download performed by the installation 
 script was not finished. When I tried to manually run make, 
 the system was not provisioned properly.
I haven't experienced this myself (though I haven't used WSL regularly since about 1-2 years - I just rebooted to Windows to try out the setup.sh script), but looking for similar issues online it seems your computer is likely not an exception: https://github.com/microsoft/WSL/issues/4901 From what I gather, it may have something to do with Large Send Offload, with some people reporting that disabling this feature fixed the problem for them (but it seems that you have to disable it after every reboot). [..]
P.S. As Imperatorn mentioned, you should check whether you're using WSL1 or 2. The difference is that WSL2 is a full Linux VM running under Hyper-V, whereas WSL1 is a Linux kernel syscall layer implemented on top of the Windows kernel. I think LSO issue is only related to WSL2, as it has the separate Hyper-V network interface.
May 02 2021
prev sibling parent reply bachmeier <no spam.net> writes:
On Friday, 30 April 2021 at 19:31:54 UTC, MoonlightSentinel wrote:
 On Friday, 30 April 2021 at 19:22:57 UTC, Andrei Alexandrescu 
 wrote:
 As mentioned in the title, the command fails and confusingly 
 suggest using AUTO_BOOTSTRAP=1, which is already there.
What's the error message? `make AUTO_BOOTSTRAP=1 -f posix.mak` builds just fine for me
I assume it's this same thing: https://forum.dlang.org/post/rc3uba$2d8q$1 digitalmars.com
Apr 30 2021
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 4/30/21 6:42 PM, bachmeier wrote:
 On Friday, 30 April 2021 at 19:31:54 UTC, MoonlightSentinel wrote:
 On Friday, 30 April 2021 at 19:22:57 UTC, Andrei Alexandrescu wrote:
 As mentioned in the title, the command fails and confusingly suggest 
 using AUTO_BOOTSTRAP=1, which is already there.
What's the error message? `make AUTO_BOOTSTRAP=1 -f posix.mak` builds just fine for me
I assume it's this same thing: https://forum.dlang.org/post/rc3uba$2d8q$1 digitalmars.com
Ah, gotta love build.d. I propose to deprecate build.d and stick with makefiles.
Apr 30 2021
prev sibling next sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Friday, 30 April 2021 at 19:22:57 UTC, Andrei Alexandrescu 
wrote:
 I mentioned this in the past, apparently it hasn't been 
 resolved.

 [...]
I'll try this in my WSL2 later today
May 01 2021
prev sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Friday, 30 April 2021 at 19:22:57 UTC, Andrei Alexandrescu 
wrote:
 I mentioned this in the past, apparently it hasn't been 
 resolved.

 Tried to install a dev tree for dmd from complete scratch. So:

 $ curl 
 https://raw.githubusercontent.com/dlang/tools/master/setup.sh
/tmp/setup.sh
$ /tmp/setup.sh The script gets everything from github nice and fast but then fails to download http://downloads.dlang.org/releases/2.x/2.095.0/dmd.2.095.0.linux.tar.xz for some reason. Anyway, I then try to run: $ cd dmd $ make AUTO_BOOTSTRAP=1 -f posix.mak As mentioned in the title, the command fails and confusingly suggest using AUTO_BOOTSTRAP=1, which is already there. If the plan is to give up boostrapping, fine but let's eliminate the code. The way things are now we both pay for the technical debt and we don't profit from it. Of course it would be much better if bootstrapping actually worked.
Just tried in WSL2 like this at ~: sudo rm -rf * apt install g++ wget https://raw.githubusercontent.com/dlang/tools/master/setup.sh && chmod +x setup.sh && ./setup.sh Everything worked as expected
May 01 2021