On 29.01.2013 21:25, Philippe Sigaud wrote: > On Mon, Jan 28, 2013 at 10:14 PM, H. S. Teoh <[email protected]> wrote: >> On Mon, Jan 28, 2013 at 09:24:46PM +0100, Philippe Sigaud wrote: >>>>> Besides the wiki, see: >>>>> https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/ >>>> >>>> Would you kindly add this info to the wiki? :-) >>> >>> Where on the page? >> >> Ideally, integrate it into the current page structure. Or reorg the page >> as you see fit. > > OK, I integrated some explanations on dmd.conf. I also added > /tools.git and explanations at the end. >
Hi all, this thread helped me much, but I ran into some trouble during bootstrapping dmd, because of some todos, not mentioned in the wiki. First I will give you a field report, explaining my way, I installed dmd from source (not really a shortstory ;-)) ..) and then, I hope, I will ask some not so silly questions. I use gentoo and installed dmd-2.60, because that's actually the last version in portage (the gentoo packagemanager). All went ok, I tested some little d-examples and then I wanted to get dmd-2.61 to run. Now the trouble begun: First I followed the wiki, tried to use the actual git version: dmd compiles, but the druntime and phobos don't do the same. Much warnings and some errors were shown. Ok, I'll go the same way with the last release: dmd.2.61.zip But mostly the same happened, some other warnings and errors, but the libraries won't compile. It took me some time to realize, that it was dmd-2.60 that caused the errors: To compile the libraries out of 2.61 or git, one needs a recent compiler. Nice: I found it as binary in the linux directory in the root of 'dmd.2.61.zip'. Luck: My PATH-Variable points to /usr/local/bin:/usr/bin:..., The portage version of dmd-2.60 was installed in /usr/bin, so I copied the 2.61-binaries to /usr/local/bin without need to delete the old version before. druntime and phobos now compiled without errors, but even the tools made some trouble again. The phobos- and druntime-sources were not found at the right places. This time there's even a reasonable hint, so I know, where the sources are searched for. After copying to the right path, now even the tools got compiled. Until now I'm not convinced, that the result of my work is a clean dmd v.2.62 (git) compiler environment or a mix out of v.2.60 (the gentoo-package), v.2.61 (out of the zip) and the git-sources and compilations itself. Why? There's a dmd.conf in /etc, which points to the libraries and include-files of version 2.60. There's another one in /usr/local/bin which I copied there together with the binaries I mentioned above and in the wiki is mentioned, to create a dmd.conf in /usr/src/d/dmd/src/ and it seems to me, that dmd looks at some default places to find what it needs. Now my questions / suggestions: At what places and in which order dmd searches for dmd.conf files? What files should be placed in what linux-directories? It can't be reasonable, to set the "PATH"-Variable to /usr/src/dmd/src, to get the latest dmd-compiler running, even so for Library- and Include-Paths. Whith next git-update, there will be a newly generated mix of versions again. So what files do one need to copy to the standard-directories of Linux, so that all functionality of dmd will be reachable for daily use? In the wiki it should be mentioned, that one needs a recent enough dmd-compiler, to get this stuff running, where to get it and with what steps to install it. An idea: Like in the dmd.2.61.zip, there could be a directory "linux" in the git-repository, with the needed bin-files in it. I would even appreciate, if there would be the whole compiler-environment with bins, libraries, includes and sources all of the same version, so one has a clean environment for bootstrapping dmd2 / druntime / phobos from git-sources. My problem was, that gentoo isn't able, to install .deb- or .rpm-files. That's why I wanted to create it from source, but whithout knowing what I know now, that was a bad task. I hope this report points out, what problems occur for people dealing new with dmd. It's not already a checklist, howto bootstrap dmd, but this report together with your knowledge of dmd, can help improve the wiki and the bootstrapping itself. Sorry, that it got so long, but leaving anything out wouldn't point out, what I wanted to say. Thanks all for your work on dmd. Maybe - and I hope so - I can help a bit in the future and do some of the work myself. Greetings, Timewulf
