Bootstrapping build

David Nadlinger via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Thu Feb 25 08:28:14 PST 2016


On 25 Feb 2016, at 12:05, Joakim via digitalmars-d-ldc wrote:
> The issue, which David might have missed, is that the ldc binary 
> itself is linked against the phobos shared library that comes with the 
> D compiler that compiles the ddmd frontend in 2.069+, really the 
> druntime portion I guess.  If that shared library is not in a standard 
> path, ie if you just downloaded the dmd tar for linux, ldc won't know 
> where to find it and will fail with a strange error when building 
> druntime.

There may be multiple issues here. If I understand Russel correctly, his 
problem was that he needs to set the library path for executables 
compiled with LDC. In your case, if I understand correctly, the issue is 
that the LDC binary itself does not load correctly.

The latter might be a consequence of the fact that the initial D build 
setup Johan rigged up for us does not actually use the D compiler for 
linking, but instead tries to guess the library to use. What we should 
be doing instead is to use the D compiler for the final linking step. 
Then, all we require is that there is a D compiler installed for which 
`echo "void main() {}" > foo.d && $DMD foo.d && ./foo` works. If that is 
not the case, the user needs to fix their setup. We should probably also 
put that test into the CMake scripts as a sanity check.

  — David


More information about the digitalmars-d-ldc mailing list