LDC build procedure [was: Re: std.net.curl and ldc v1.0.0+]
Joseph Rushton Wakeling via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Sat Oct 15 12:22:42 PDT 2016
On Tuesday, 27 September 2016 at 21:00:03 UTC, kinke wrote:
> On Tuesday, 27 September 2016 at 18:34:41 UTC, Joseph Rushton
> Wakeling wrote:
>> If I replace druntime with the pre-built one, then things work
>> OK with the built curl-using program. Switching out phobos
>> makes no difference.
>
> Oh this may make things clearer. druntime features C parts, so
> the pre-built one and yours probably differ in the used C(++)
> runtime; the malloc issue also points in this direction. As we
> seem to be using libstdc++, are you sure you're using that one
> too?
I've come back to this after a little while of not being able to
work on it. Anyway, a few questions.
First, the build scripts for LDC:
https://github.com/ldc-developers/ldc-scripts/tree/master/ldc2-packaging
There are 3 noticeable things about them:
(i) a backported g++-4.9 is used (the default gcc/g++ version on
Ubuntu 16.04 is 5.4)
(ii) LLVM is built from source
(iii) the build script uses two cmake config flags related to the
choice of standard library:
-DCMAKE_EXE_LINKER_FLAGS='-stdlib=libc++'
-DCMAKE_EXE_LINKER_FLAGS='-static-libstdc++
My own builds fail for LDC 1.0.0 if I use these exact cmake
flags, because they are not recognized as valid flags by LDC
itself. Using instead:
-DCMAKE_EXE_LINKER_FLAGS='-L-stdlib=libc++'
-DCMAKE_EXE_LINKER_FLAGS='-L-static-libstdc++
... builds, but makes no difference.
So, first, can I confirm that these scripts are really used as-is
to build LDC 1.0.0 and later LDC versions?
Second, since I use Ubuntu 16.04's native ldc 0.17.1 package as
the D compiler to build ldc 1.0.0, how is the need for an
existing D compiler dealt with via LDC's own build scripts? Is
there an automated bootstrapping process?
Third, is it possible that the use of a pre-built LLVM could be
affecting things? Are there parts of LLVM used in LDC's
druntime, particularly related to the GC?
Fourth, are there any known issues related to the libc/libstdc++
version and druntime? Is there a reason why you didn't backport
gcc 5 for building LDC?
Thanks & best wishes,
-- Joe
More information about the digitalmars-d-ldc
mailing list