Thread overview
LDC 1.7.0 on NixOS/OSX dynamiccompile tests fail
Jan 06, 2018
Thomas Mader
Jan 06, 2018
Thomas Mader
Jan 07, 2018
Johan Engelen
Jan 13, 2018
Thomas Mader
January 06, 2018
I had similar problems with the asan tests in 1.5.0 and just removed them for now.

My guess is that the problem is the missing MACOSX_RPATH because I get a warning when configuring the build:

CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   ldc-jit-rt-so

Here is the error for array:

771: FAIL: LDC :: dynamiccompile/array.d (140 of 190)
771: ******************** TEST 'LDC :: dynamiccompile/array.d' FAILED ********************
771: Script:
771: --
771: /tmp/nix-build-ldcBuild-1.7.0.drv-0/ldc-1.7.0-src/build/bin/ldc2 -enable-dynamic-compile -run /private/tmp/nix-build-ldcBuild-1.7.0.drv-0/ldc-1.7.0-src/tests/dynamiccompile/array.d
771: --
771: Exit Code: 2
771:
771: Command Output (stdout):
771: --
771: $ "/tmp/nix-build-ldcBuild-1.7.0.drv-0/ldc-1.7.0-src/build/bin/ldc2" "-enable-dynamic-compile" "-run" "/private/tmp/nix-build-ldcBuild-1.7.0.drv-0/ldc-1.7.0-src/tests/dynamiccompile/array.d"
771: # command stderr:
771: dyld: Library not loaded: libldc-jit.77.dylib
771:   Referenced from: /var/folders/rw/hkyl0vdn02jfvt1s8_2wxvkr000x9j/T/array-30ec308-4bc080
771:   Reason: image not found
771: Error: /var/folders/rw/hkyl0vdn02jfvt1s8_2wxvkr000x9j/T/array-30ec308-4bc080 failed with status: -2
771: Error: message: Abort trap: 6
771: Error: program received signal 2 (Interrupt: 2)
771:
771: error: command failed with exit status: 2

...

771: Testing Time: 29.06s
771: ********************
771: Failing Tests (15):
771:     LDC :: dynamiccompile/array.d
771:     LDC :: dynamiccompile/calls.d
771:     LDC :: dynamiccompile/classes.d
771:     LDC :: dynamiccompile/dump_handler.d
771:     LDC :: dynamiccompile/empty_jit_modules.d
771:     LDC :: dynamiccompile/globals.d
771:     LDC :: dynamiccompile/globals_types.d
771:     LDC :: dynamiccompile/lambdas.d
771:     LDC :: dynamiccompile/params_ctors.d
771:     LDC :: dynamiccompile/recursive_call.d
771:     LDC :: dynamiccompile/simple.d
771:     LDC :: dynamiccompile/struct_init.d
771:     LDC :: dynamiccompile/thread_local.d
771:     LDC :: dynamiccompile/throw.d
771:     LDC :: dynamiccompile/tls_workaround_opt.d
771:
771:   Expected Passes    : 145
771:   Unsupported Tests  : 30
771:   Unexpected Failures: 15
1/1 Test #771: lit-tests ........................***Failed   30.71 sec


January 06, 2018
On Saturday, 6 January 2018 at 14:00:59 UTC, Thomas Mader wrote:
> I had similar problems with the asan tests in 1.5.0 and just removed them for now.

Can't reproduce the asan problems anymore, so I enabled the tests again but disabled the dynamiccompile tests for now.
January 07, 2018
On Saturday, 6 January 2018 at 19:32:12 UTC, Thomas Mader wrote:
> On Saturday, 6 January 2018 at 14:00:59 UTC, Thomas Mader wrote:
>> I had similar problems with the asan tests in 1.5.0 and just removed them for now.
>
> Can't reproduce the asan problems anymore, so I enabled the tests again but disabled the dynamiccompile tests for now.

The dynamiccompile shared lib probably needs the same rpath logic as ASan:
https://github.com/ldc-developers/ldc/blob/f338b559ffdb7b32e862596c44d8999dfa345b42/driver/linker-gcc.cpp#L213-L233

Can you open an issue about it?

Thanks,
  Johan

January 13, 2018
On Sunday, 7 January 2018 at 15:09:31 UTC, Johan Engelen wrote:
> Can you open an issue about it?

https://github.com/ldc-developers/ldc/issues/2497