wilzbach / tools-test

1 stars 0 forks source link

Tools build process cannot find druntime and phobos #101

Closed wilzbach closed 7 years ago

wilzbach commented 10 years ago

Note: the issue was created automatically migrated from https://issues.dlang.org

Original bug ID: BZ#12205 From: Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> Reported version: D2 CC: code@dawg.eu, dlang-bugzilla@thecybershadow.net

wilzbach commented 10 years ago

Comment author: Joseph Rushton Wakeling <joseph.wakeling@webdrake.net>

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/mailman.3.1392153392.6445.digitalmars-d-learn@ puremagic.com

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

wilzbach commented 10 years ago

Comment author: Martin Nowak <code@dawg.eu>

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.

wilzbach commented 10 years ago

Comment author: Joseph Rushton Wakeling <joseph.wakeling@webdrake.net>

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.

wilzbach commented 10 years ago

Comment author: Joseph Rushton Wakeling <joseph.wakeling@webdrake.net>

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

wilzbach commented 10 years ago

Comment author: github-bugzilla@puremagic.com

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 BZ#117 from WebDrake/makefile-dflags

Fix Issue 12205: update posix.mak to use local, recently-built druntime and phobos

wilzbach commented 7 years ago

Comment author: Vladimir Panteleev <dlang-bugzilla@thecybershadow.net>

Closing per merged pull comment above.