huge stack of __dmd_personality_v0 when static libraries are used.

Basile B. via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Sun Jun 5 17:13:26 PDT 2016


On Sunday, 5 June 2016 at 23:37:16 UTC, David Nadlinger wrote:
> On 1 Jun 2016, at 19:27, Basile B. via digitalmars-d-ldc wrote:
>> The second is quite un-understandable.
>>
>> "...src/kheops/canvas.d:(.text.std.typecons.Tuple!(double, 
>> double).Tuple 
>> kheops.canvas.Canvas.textSize(immutable(char)[])[std.typecons.Tuple!(double, double).Tuple kheops.canvas.Canvas.textSize(immutable(char)[])]+0x1c): référence indéfinie vers « deimos.cairo.cairo.cairo_text_extents_t.__init »"
>>
>> Is it possible that LDC does not emit the 
>> "cairo_text_extents_t"'s initializer for a reason or another ?
>
> Are you including the Deimos modules in the compilation command 
> line, one way or another? If not, this might be a reason why 
> the initialiser is not emitted at all.
>
> Deimos used to be intended as a "header-only library" – i.e., 
> no need to ever actually build the modules –, and I am still 
> very much a proponent of that idea, but people (Walter amongst 
> them, IIRC) have recently argued that all modules should always 
> be included in the compilation.
>
>  — David

No, the cairo deimos binding is passed as a static library: so 
the *.a file as a source then only the search path (-I). Then LDC 
is called via LDMD2 (with exactly the same command line that's 
passed when I use DMD).

The project also does the same (*.a + I<source root>) with libX11 
(which is several order of magnitude bigger then cairo) and no 
similar error has occured.

On the other hand I've already found several issues in the old 
cairo binding so I really don't accuse LDC to have a bug, 
furthemore the real problem I had is now fixed 
(dmd_personnality). I'll report a bug if it happens with another 
library.


More information about the digitalmars-d-ldc mailing list