Thread overview
Unable to build std_data_json with LDC 0.14.0
Aug 26, 2014
Entusiastic user
Aug 26, 2014
Kai Nacke
Aug 26, 2014
Entusiastic user
August 26, 2014
I am having problems building std_data_json [1] with LDC 0.14.0. DMD 2.066.0
seems to work fine (all unit tests pass). I was suggested [2] that link-time stripping of dead code (--gc-sections) can be the cause, but "-disable-linker-strip-dead" flag didn't help. Any ideas would be useful.

I am using Ubuntu 13.10 (Linux 3.11.0-15-generic x86_64).

Master was at 6a9f8e62e456c3601fe8ff2e1fbb640f38793d08.
$ dub fetch std_data_json --version=~master
$ cd std_data_json-master/
$ dub test --compiler=ldc2

Generating test runner configuration '__test__library__' for
'library' (library).
Building std_data_json ~master configuration "__test__library__",
build type unittest.
Running ldc2...
source/stdx/data/json/parser.d(77): Error: safe function
'stdx.data.json.parser.__unittestL68_22' cannot call system
function 'object.AssociativeArray!(string,
JSONValue).AssociativeArray.length'
source/stdx/data/json/parser.d(124): Error: safe function
'stdx.data.json.parser.__unittestL116_24' cannot call system
function 'object.AssociativeArray!(string,
JSONValue).AssociativeArray.length'
source/stdx/data/json/parser.d(341): Error: function
stdx.data.json.parser.JSONParserRange!(JSONLexerRange!string).JSONParserRange.opAssign
is not callable because it is annotated with @disable
source/stdx/data/json/parser.d(341): Error: safe function
'stdx.data.json.parser.__unittestL318_32' cannot call system
function
'stdx.data.json.parser.JSONParserRange!(JSONLexerRange!string).JSONParserRange.opAssign'
source/stdx/data/json/parser.d(633): Error: function
stdx.data.json.lexer.JSONToken.opAssign is not callable because
it is annotated with @disable
source/stdx/data/json/parser.d(633): Error:
'stdx.data.json.lexer.JSONToken.opAssign' is not nothrow
source/stdx/data/json/parser.d(630): Error: function
'stdx.data.json.parser.JSONParserNode.literal' is nothrow yet may
throw
FAIL
.dub/build/__test__library__-unittest-linux.posix-x86_64-ldc2-0F620B217010475A5A4E545A57CDD09A/
__test__library__ executable
Error executing command test: ldc2 failed with exit code 1.

[1] http://forum.dlang.org/thread/lt5s76$is$1@digitalmars.com
[2] http://forum.dlang.org/thread/lt5s76$is$1@digitalmars.com?page=12#post-lthbbk:241sbk:241:40digitalmars.com

Thanks
August 26, 2014
Hi Entusiastic!

On Tuesday, 26 August 2014 at 09:40:34 UTC, Entusiastic user wrote:
> I am having problems building std_data_json [1] with LDC 0.14.0. DMD 2.066.0
> seems to work fine (all unit tests pass).

Does it work with dmd 2.065? This is the front end version of ldc.

Regards,
Kai
August 26, 2014
I've just tested std_data_json with DMD 2.065 on Windows and it worked correctly.
Could the problem be that I have not installed LDC properly on my Ubuntu? Both DMD 2.066 and LDC 0.14.0 compile my existing projects (and other DUB packages that I tested) without any issues.


On Tuesday, 26 August 2014 at 10:56:46 UTC, Kai Nacke wrote:
> Hi Entusiastic!
>
> On Tuesday, 26 August 2014 at 09:40:34 UTC, Entusiastic user wrote:
>> I am having problems building std_data_json [1] with LDC 0.14.0. DMD 2.066.0
>> seems to work fine (all unit tests pass).
>
> Does it work with dmd 2.065? This is the front end version of ldc.
>
> Regards,
> Kai