digitalmars.D - dmd build instructions from source don't work anymore
- Timothee Cour via Digitalmars-d (10/10) May 11 2015 git clone git://github.com/D-Programming-Language/dmd.git
- John Colvin (9/20) May 11 2015 Do you
- Daniel Murphy (2/4) May 11 2015 Yeah, it's this. Which page is this that needs updating?
- John Colvin (3/9) May 11 2015 I don't see the necessary info in
- Timothee Cour via Digitalmars-d (11/23) May 11 2015 NOTE: it's on a new laptop; not sure whether build rules implicitly assu...
- Timothee Cour via Digitalmars-d (6/18) May 11 2015 note, that this seems to be only happening on master:
- Daniel Murphy (7/13) May 11 2015 It's not a regression. Shortly after 2.067 was released, dmd got the ne...
- Laeeth Isharc (13/28) May 11 2015 I wonder what the long term plan for porting to new platforms
- Timothee Cour via Digitalmars-d (7/21) May 11 2015 I still think it is a regression.
- Daniel Murphy (6/12) May 12 2015 DMD uses 'CC' as the linker, but I'm not sure why settings CC would gene...
- Timothee Cour via Digitalmars-d (4/20) May 12 2015 Try setting it, it fails when I do.
- Daniel Murphy (3/5) May 13 2015 I don't know what's going on. It 'make's no sense.
- Timothee Cour via Digitalmars-d (11/23) May 11 2015 NOTE:
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (5/7) May 11 2015 That is required because although all implementation files are C++, they...
- John Colvin (2/11) May 12 2015 Same for clang IIRC.
-
Timothee Cour via Digitalmars-d
(6/13)
May 12 2015
On Mon, May 11, 2015 at 11:20 PM, Ali =C3=87ehreli
- Timothee Cour via Digitalmars-d (7/28) May 11 2015 I found the culprit by bisection:
- Jacob Carlborg (4/9) May 11 2015 I guess that's the first commit that requires a D compiler to build DMD.
- Daniel Murphy (2/12) May 11 2015 Yep.
- Andrei Alexandrescu (3/19) May 11 2015 Can we automate installation of the last C++-based dmd via scripting? --...
- Daniel Murphy (3/5) May 12 2015 Can't people just use dvm? I suppose we could add a makefile target tha...
- Andrei Alexandrescu (6/12) May 12 2015 dvm is fine as long as its installation itself is automated.
- Andrei Alexandrescu (3/16) May 12 2015 Please destroy: https://github.com/D-Programming-Language/dmd/pull/4645
- Jacob Carlborg (8/9) May 12 2015 The installation is a one-liner command:
- Laeeth Isharc (30/46) May 12 2015 Automating the installation of the last C++-based dmd is one
- Andrei Alexandrescu (5/11) May 12 2015 Yah, that's a classic. Usually multi-stage bootstrapping is used. One
- Laeeth Isharc (7/24) May 12 2015 I guess that is fine if the binaries exist for the new platform.
- Vladimir Panteleev (2/7) May 12 2015 https://github.com/CyberShadow/Digger/commit/cf1ae944c1ff82ddcc8c5adf35f...
git clone git://github.com/D-Programming-Language/dmd.git cd dmd make -f posix.mak MODEL=64 /Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f posix.mak no cpu specified, assuming X86 dmd idgen.d g++ -m64: No such file or directory --- errorlevel 255 make[1]: *** [idgen] Error 255 make: *** [all] Error 2
May 11 2015
On Monday, 11 May 2015 at 08:31:19 UTC, Timothee Cour wrote:git clone git://github.com/D-Programming-Language/dmd.git cd dmd make -f posix.mak MODEL=64 /Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f posix.mak no cpu specified, assuming X86 dmd idgen.d g++ -m64: No such file or directory --- errorlevel 255 make[1]: *** [idgen] Error 255 make: *** [all] Error 2Do you 1) already have a version of dmd installed (relatively new requirement) and 2) have a working g++, whether of clang or gcc variety? On my machine g++ is in /usr/bin and is actually clang, although not as a symbolic link, as a slightly differently configured executable. Don't really know what apple's thinking here was.
May 11 2015
"John Colvin" wrote in message news:jsnuhemrispqiwvwlfde forum.dlang.org...Do you 1) already have a version of dmd installed (relatively new requirement)Yeah, it's this. Which page is this that needs updating?
May 11 2015
On Monday, 11 May 2015 at 12:25:27 UTC, Daniel Murphy wrote:"John Colvin" wrote in message news:jsnuhemrispqiwvwlfde forum.dlang.org...I don't see the necessary info in http://wiki.dlang.org/Building_DMD, but I might have missed it.Do you 1) already have a version of dmd installed (relatively new requirement)Yeah, it's this. Which page is this that needs updating?
May 11 2015
NOTE: it's on a new laptop; not sure whether build rules implicitly assume (maybe by error?) that something should be there beyond g++/clang/dmd but the error message i get isn't helpful. 1) already have a version of dmd installed (relatively new requirement) yes (via homebrew; on a new laptop): dmd --version DMD64 D Compiler v2.067 2) have a working g++, whether of clang or gcc variety? yes, I've built llvm from source, etc; both g++ and clang seem to work. On Mon, May 11, 2015 at 5:55 AM, John Colvin via Digitalmars-d < digitalmars-d puremagic.com> wrote:On Monday, 11 May 2015 at 12:25:27 UTC, Daniel Murphy wrote:"John Colvin" wrote in message news:jsnuhemrispqiwvwlfde forum.dlang.org. .. Do youI don't see the necessary info in http://wiki.dlang.org/Building_DMD, but I might have missed it.1) already have a version of dmd installed (relatively new requirement)Yeah, it's this. Which page is this that needs updating?
May 11 2015
note, that this seems to be only happening on master: if I checkout another tag (git checkout v2.067.1-b1 or any other I've tried) it builds fine. So it must be a very recent regression On Mon, May 11, 2015 at 5:55 AM, John Colvin via Digitalmars-d < digitalmars-d puremagic.com> wrote:On Monday, 11 May 2015 at 12:25:27 UTC, Daniel Murphy wrote:"John Colvin" wrote in message news:jsnuhemrispqiwvwlfde forum.dlang.org. .. Do youI don't see the necessary info in http://wiki.dlang.org/Building_DMD, but I might have missed it.1) already have a version of dmd installed (relatively new requirement)Yeah, it's this. Which page is this that needs updating?
May 11 2015
"Timothee Cour via Digitalmars-d" <digitalmars-d puremagic.com> wrote in message > news:mailman.875.1431359641.4581.digitalmars-d puremagic.com... note, that this seems to be only happening on master: if I checkout another tag (git checkout v2.067.1-b1 or any other I've tried) it builds fine. So it must be a very recent regressionIt's not a regression. Shortly after 2.067 was released, dmd got the new requirement of a host D compiler to build. You can explicitly set which compiler to use by setting the HOST_DC environment variable. If you also want to build ddmd, then 2.067 is recommended as it is known to work on all autotester platforms. In posix.mak HOST_DC defaults to 'dmd' which will correctly pick up a dmd installation in path, as long as you don't have a sc.ini file in the dmd src dir.
May 11 2015
On Tuesday, 12 May 2015 at 03:35:34 UTC, Daniel Murphy wrote:I wonder what the long term plan for porting to new platforms will be. Currently you compile dmd 2.066 (or whatever the tag of breakage was) which is pure C++ so you have an outdated DMD binary, which you can then use to compile the latest dmd and phobos. But as time passes - and when I tried it seemed we are already there - phobos and DMD may no longer be compileable using earlier versions of Dmd. So you need to repeatedly bootstrap over breaking changes in the source (eg using dip25) until you have caught up. Unless you hack up the source by hand. Is this correct, or am I missing something ? If accurate, maybe it is worth automating the process..."Timothee Cour via Digitalmars-d" <digitalmars-d puremagic.com> wrote in message > news:mailman.875.1431359641.4581.digitalmars-d puremagic.com... note, that this seems to be only happening on master: if I checkout another tag (git checkout v2.067.1-b1 or any other I've tried) it builds fine. So it must be a very recent regressionIt's not a regression. Shortly after 2.067 was released, dmd got the new requirement of a host D compiler to build. You can explicitly set which compiler to use by setting the HOST_DC environment variable. If you also want to build ddmd, then 2.067 is recommended as it is known to work on all autotester platforms. In posix.mak HOST_DC defaults to 'dmd' which will correctly pick up a dmd installation in path, as long as you don't have a sc.ini file in the dmd src dir.
May 11 2015
On Mon, May 11, 2015 at 8:35 PM, Daniel Murphy via Digitalmars-d < digitalmars-d puremagic.com> wrote:"Timothee Cour via Digitalmars-d" <digitalmars-d puremagic.com> wrote inI still think it is a regression. I did have dmd (2.067) in the path, see the whole thread for my diagnostic: http://forum.dlang.org/thread/mailman.861.1431333078.4581.digitalmars-d puremagic.com#post-mailman.878.1431365007.4581.digitalmars-d:40puremagic.com (cf message 'I had 'export'...)message > news:mailman.875.1431359641.4581.digitalmars-d puremagic.com... note, that this seems to be only happening on master: if I checkout another tag (git checkout v2.067.1-b1 or any other I've tried) it builds fine. So it must be a very recent regressionIt's not a regression. Shortly after 2.067 was released, dmd got the new requirement of a host D compiler to build. You can explicitly set which compiler to use by setting the HOST_DC environment variable. If you also want to build ddmd, then 2.067 is recommended as it is known to work on all autotester platforms. In posix.mak HOST_DC defaults to 'dmd' which will correctly pick up a dmd installation in path, as long as you don't have a sc.ini file in the dmd src dir.
May 11 2015
"Timothee Cour via Digitalmars-d" <digitalmars-d puremagic.com> wrote in message news:mailman.896.1431405519.4581.digitalmars-d puremagic.com...I still think it is a regression. I did have dmd (2.067) in the path, see the whole thread for my diagnostic: http://forum.dlang.org/thread/mailman.861.1431333078.4581.digitalmars-d puremagic.com#post-mailman.878.1431365007.4581.digitalmars-d:40puremagic.com (cf message 'I had 'export'...)DMD uses 'CC' as the linker, but I'm not sure why settings CC would generate that error.This should mean that there is no g++ in path, but it does look like CC is being set correctly by the makefile.g++ -m64: No such file or directory
May 12 2015
On Tue, May 12, 2015 at 4:45 AM, Daniel Murphy via Digitalmars-d < digitalmars-d puremagic.com> wrote:"Timothee Cour via Digitalmars-d" <digitalmars-d puremagic.com> wrote in message news:mailman.896.1431405519.4581.digitalmars-d puremagic.com... I still think it is a regression.Try setting it, it fails when I do.I did have dmd (2.067) in the path, see the whole thread for my diagnostic: http://forum.dlang.org/thread/mailman.861.1431333078.4581.digitalmars-d puremagic.com#post-mailman.878.1431365007.4581.digitalmars-d:40puremagic.com (cf message 'I had 'export'...)DMD uses 'CC' as the linker, but I'm not sure why settings CC would generate that error. g++ -m64: No such file or directoryThis should mean that there is no g++ in path, but it does look like CC is being set correctly by the makefile.g++ is in the path.
May 12 2015
"Timothee Cour via Digitalmars-d" <digitalmars-d puremagic.com> wrote in message news:mailman.928.1431451389.4581.digitalmars-d puremagic.com...g++ -m64: No such file or directoryTry setting it, it fails when I do.I don't know what's going on. It 'make's no sense.
May 13 2015
NOTE: I had 'export CC=gcc' in my environment, leading to this behavior (ie breaks after that pull request is merged). If I 'unset CC' it works. But IMO it should work even when user has set CC (or at least provide a better error message) Also I notice CC is set to 'g++' in posix.mak which is untypical (instead of gcc for example) Other users could face the same issue which is hard to debug. On Mon, May 11, 2015 at 5:55 AM, John Colvin via Digitalmars-d < digitalmars-d puremagic.com> wrote:On Monday, 11 May 2015 at 12:25:27 UTC, Daniel Murphy wrote:"John Colvin" wrote in message news:jsnuhemrispqiwvwlfde forum.dlang.org. .. Do youI don't see the necessary info in http://wiki.dlang.org/Building_DMD, but I might have missed it.1) already have a version of dmd installed (relatively new requirement)Yeah, it's this. Which page is this that needs updating?
May 11 2015
On 05/11/2015 10:23 AM, Timothee Cour via Digitalmars-d wrote:I notice CC is set to 'g++' in posix.mak which is untypical (instead of gcc for example)That is required because although all implementation files are C++, they have extension .c. If CC were gcc, it would assume C compilation. Therefore, g++ is needed to make it C++ compilation. Ali
May 11 2015
On Tuesday, 12 May 2015 at 06:20:12 UTC, Ali Çehreli wrote:On 05/11/2015 10:23 AM, Timothee Cour via Digitalmars-d wrote:Same for clang IIRC.I notice CC is set to 'g++' in posix.mak which is untypical(insteadof gcc for example)That is required because although all implementation files are C++, they have extension .c. If CC were gcc, it would assume C compilation. Therefore, g++ is needed to make it C++ compilation. Ali
May 12 2015
On Mon, May 11, 2015 at 11:20 PM, Ali =C3=87ehreli <digitalmars-d puremagic= .com> wrote:On 05/11/2015 10:23 AM, Timothee Cour via Digitalmars-d wrote:That seems like a hacky patch to fix issue with wrong extension. why not use this: 'g++ -x c++ ' (ie treats input file as c++) That looks cleaner than assigning CC=3Dg++I notice CC is set to 'g++' in posix.mak which is untypical (instead of gcc for example)That is required because although all implementation files are C++, they have extension .c. If CC were gcc, it would assume C compilation. Therefore, g++ is needed to make it C++ compilation. Ali
May 12 2015
I found the culprit by bisection: hash: 50b7697... https://github.com/D-Programming-Language/dmd/commit/aa8a7b3dcf985c8332783961c1dd7bc598ec36c5 it builds fine right before this, and fails with this On Mon, May 11, 2015 at 1:56 AM, John Colvin via Digitalmars-d < digitalmars-d puremagic.com> wrote:On Monday, 11 May 2015 at 08:31:19 UTC, Timothee Cour wrote:git clone git://github.com/D-Programming-Language/dmd.git cd dmd make -f posix.mak MODEL=64 /Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f posix.mak no cpu specified, assuming X86 dmd idgen.d g++ -m64: No such file or directory --- errorlevel 255 make[1]: *** [idgen] Error 255 make: *** [all] Error 2Do you 1) already have a version of dmd installed (relatively new requirement) and 2) have a working g++, whether of clang or gcc variety? On my machine g++ is in /usr/bin and is actually clang, although not as a symbolic link, as a slightly differently configured executable. Don't really know what apple's thinking here was.
May 11 2015
On 2015-05-11 18:08, Timothee Cour via Digitalmars-d wrote:I found the culprit by bisection: hash: 50b7697... https://github.com/D-Programming-Language/dmd/commit/aa8a7b3dcf985c8332783961c1dd7bc598ec36c5 it builds fine right before this, and fails with thisI guess that's the first commit that requires a D compiler to build DMD. -- /Jacob Carlborg
May 11 2015
"Jacob Carlborg" wrote in message news:miqqqu$2g75$2 digitalmars.com...On 2015-05-11 18:08, Timothee Cour via Digitalmars-d wrote:Yep.I found the culprit by bisection: hash: 50b7697... https://github.com/D-Programming-Language/dmd/commit/aa8a7b3dcf985c8332783961c1dd7bc598ec36c5 it builds fine right before this, and fails with thisI guess that's the first commit that requires a D compiler to build DMD.
May 11 2015
On 5/11/15 8:31 PM, Daniel Murphy wrote:"Jacob Carlborg" wrote in message news:miqqqu$2g75$2 digitalmars.com...Can we automate installation of the last C++-based dmd via scripting? -- AndreiOn 2015-05-11 18:08, Timothee Cour via Digitalmars-d wrote:Yep.I found the culprit by bisection: hash: 50b7697...yebblies/idgend2https://github.com/D-Programming-Language/dmd/commit/aa8a7b3dcf985c8332783961c1dd7bc598ec36c5it builds fine right before this, and fails with thisI guess that's the first commit that requires a D compiler to build DMD.
May 11 2015
"Andrei Alexandrescu" wrote in message news:mis2ub$j0s$1 digitalmars.com...Can we automate installation of the last C++-based dmd via scripting? -- AndreiCan't people just use dvm? I suppose we could add a makefile target that grabs the zip or something...
May 12 2015
On 5/12/15 4:47 AM, Daniel Murphy wrote:"Andrei Alexandrescu" wrote in message news:mis2ub$j0s$1 digitalmars.com...dvm is fine as long as its installation itself is automated. Sadly I just hit this matter head-on after updating dmd last night. It seems to me unacceptable to leave the build process flapping in the wind like that. Guess I'll need to work on that. AndreiCan we automate installation of the last C++-based dmd via scripting? -- AndreiCan't people just use dvm? I suppose we could add a makefile target that grabs the zip or something...
May 12 2015
On 5/12/15 8:03 AM, Andrei Alexandrescu wrote:On 5/12/15 4:47 AM, Daniel Murphy wrote:Please destroy: https://github.com/D-Programming-Language/dmd/pull/4645 Andrei"Andrei Alexandrescu" wrote in message news:mis2ub$j0s$1 digitalmars.com...dvm is fine as long as its installation itself is automated. Sadly I just hit this matter head-on after updating dmd last night. It seems to me unacceptable to leave the build process flapping in the wind like that. Guess I'll need to work on that.Can we automate installation of the last C++-based dmd via scripting? -- AndreiCan't people just use dvm? I suppose we could add a makefile target that grabs the zip or something...
May 12 2015
On 2015-05-12 17:03, Andrei Alexandrescu wrote:dvm is fine as long as its installation itself is automated.The installation is a one-liner command: curl -L -o dvm https://github.com/jacob-carlborg/dvm/releases/download/v0.4.3/dvm-0.4.3-osx && chmod +x dvm && ./dvm install dvm Binaries are available on Windows, Linux (32 and 64bit) and OS X. -- /Jacob Carlborg
May 12 2015
On Tuesday, 12 May 2015 at 15:03:59 UTC, Andrei Alexandrescu wrote:On 5/12/15 4:47 AM, Daniel Murphy wrote:Automating the installation of the last C++-based dmd is one (good and necessary thing). But either I am mistaken, or in future years you shall still face a choice between manually hacking up Phobos and DMD so they compile under this last C++-based dmd (a gulf which will widen increasingly) or you need to iteratively build compilers to cross the multiple-version bridges where changes to the source of dmd+phobos mean that they no longer compile with the last but one version. Thought experiment (I am making up the numbers, and in practice the gap between incompatible compilers and dmd+phobos source will be several releases): suppose the last C++-based dmd is 2.05. and suppose 2.05 dmd compiles 2.06 but not 2.07 and suppose 2.06 dmd compiles 2.07 but not 2.08 If you are porting dmd to a new platform (and I suppose this is true for all other D compilers since they, too, will move to using ddmd), then it's not just enough to download dmd 2.05. You have to download 2.05, compile it using a C++ compiler. Now you can download the 2.06 source, compile it so you have a dmd 2.06. You can't compile the latest release 2.08 so you either need to hack the source, or download 2.07, compile it with 2.06 and _then_ compile 2.08. Over time this will become more of a nuisance, because it's not necessarily the case on a new platform that it all just works. So unless I have got it wrong, it's worth changing tools now so the bootstrap from the last c++ dmd to the latest ddmd is done for you."Andrei Alexandrescu" wrote in message news:mis2ub$j0s$1 digitalmars.com...dvm is fine as long as its installation itself is automated. Sadly I just hit this matter head-on after updating dmd last night. It seems to me unacceptable to leave the build process flapping in the wind like that. Guess I'll need to work on that. AndreiCan we automate installation of the last C++-based dmd via scripting? -- AndreiCan't people just use dvm? I suppose we could add a makefile target that grabs the zip or something...
May 12 2015
On 5/12/15 10:32 AM, Laeeth Isharc wrote:But either I am mistaken, or in future years you shall still face a choice between manually hacking up Phobos and DMD so they compile under this last C++-based dmd (a gulf which will widen increasingly) or you need to iteratively build compilers to cross the multiple-version bridges where changes to the source of dmd+phobos mean that they no longer compile with the last but one version.Yah, that's a classic. Usually multi-stage bootstrapping is used. One simpler way to accelerate that is to just download the last version's binaries (which is what https://github.com/D-Programming-Language/dmd/pull/4645 does). -- Andrei
May 12 2015
On Tuesday, 12 May 2015 at 17:41:16 UTC, Andrei Alexandrescu wrote:On 5/12/15 10:32 AM, Laeeth Isharc wrote:I guess that is fine if the binaries exist for the new platform. Otherwise it should be just a screenful of code to iterate through the chain of versions required, calling the build process each time - either update_sh or perhaps it could be added to Cybershadow's tool.But either I am mistaken, or in future years you shall still face a choice between manually hacking up Phobos and DMD so they compile under this last C++-based dmd (a gulf which will widen increasingly) or you need to iteratively build compilers to cross the multiple-version bridges where changes to the source of dmd+phobos mean that they no longer compile with the last but one version.Yah, that's a classic. Usually multi-stage bootstrapping is used. One simpler way to accelerate that is to just download the last version's binaries (which is what https://github.com/D-Programming-Language/dmd/pull/4645 does). -- Andrei
May 12 2015
On Tuesday, 12 May 2015 at 19:58:02 UTC, Laeeth Isharc wrote:I guess that is fine if the binaries exist for the new platform. Otherwise it should be just a screenful of code to iterate through the chain of versions required, calling the build process each time - either update_sh or perhaps it could be added to Cybershadow's tool.https://github.com/CyberShadow/Digger/commit/cf1ae944c1ff82ddcc8c5adf35f9e7140231ea81
May 12 2015