Bug 12205 – Tools build process cannot find druntime and phobos

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
tools
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-19T14:19:00Z
Last change time
2017-06-26T00:37:42Z
Assigned to
nobody
Creator
joseph.wakeling

Comments

Comment #0 by joseph.wakeling — 2014-02-19T14:19:53Z
The tools posix.mak has recently been updated to use DMD=../dmd/src/dmd instead of assuming an already-installed system-wide dmd. However, this has been done without also adding appropriate paths for druntime and phobos, so the build will fail: $ make -f posix.mak ../dmd/src/dmd -m64 -ofgenerated/linux/64/rdmd rdmd.d Error: cannot find source code for runtime library file 'object.d' dmd might not be correctly installed. Run 'dmd -man' for installation instructions. Specify path to file 'object.d' with -I switch make: *** [generated/linux/64/rdmd] Error 1 For discussion thread (and a partial patch) see: http://forum.dlang.org/thread/[email protected] Tweak to DMD value in posix.mak was made in this commit: https://github.com/D-Programming-Language/tools/commit/385f9959bab520af92722b1ad4f7ce428079c02c ... almost 2 months ago, so I don't know why no one has screamed 'til now. :-P
Comment #1 by code — 2014-02-19T15:31:04Z
It's dmd which needs to know how to find druntime and phobos, so I think it would be better to check-in a default dmd.conf/sc.ini to dmd/src that works for the default folder layout.
Comment #2 by joseph.wakeling — 2014-02-20T15:22:37Z
(In reply to comment #1) > It's dmd which needs to know how to find druntime and phobos, > so I think it would be better to check-in a default dmd.conf/sc.ini to dmd/src > that works for the default folder layout. I'm not opposed to this solution, but can you comment on the potential for such a dmd.conf/sc.ini to interfere with the druntime and phobos builds which also make use of ../dmd/src/dmd ... ? Meanwhile, I have fixed the patch I proposed to the tools' posix.mak: it works, although it could perhaps do with a bit of design thought.
Comment #3 by joseph.wakeling — 2014-02-22T13:00:12Z
Just to note, there is now a working fix that only alters posix.mak and doesn't impose changes on any other project: https://github.com/D-Programming-Language/tools/pull/117
Comment #4 by github-bugzilla — 2014-02-26T10:27:55Z
Commits pushed to master at https://github.com/D-Programming-Language/tools https://github.com/D-Programming-Language/tools/commit/0db18906c8dcc5dbb13b701ed37eaec2012a2bd7 Fix Issue 12205: update posix.mak to use local, recently-built druntime and phobos. This fixes https://d.puremagic.com/issues/show_bug.cgi?id=12205 by adding library/include paths to the locations where druntime and phobos have been built, plus a flag to prevent/suppress alignment errors in one of the builds. In the event that the user wishes to build using the system dmd instead of the locally-built ../dmd/src/dmd, this is trivial to achieve by overriding with DMD=dmd. DFLAGS will also then be overridden with those from the system dmd.conf. https://github.com/D-Programming-Language/tools/commit/d306f7ffde9e8d97efe5f03a55f50ba8f681352a Merge pull request #117 from WebDrake/makefile-dflags Fix Issue 12205: update posix.mak to use local, recently-built druntime and phobos
Comment #5 by dlang-bugzilla — 2017-06-26T00:37:42Z
Closing per merged pull comment above.