libmir / mir

Mir (backports): Sparse tensors, Hoffman
http://mir.libmir.org
Boost Software License 1.0
210 stars 20 forks source link

mir-algorithm dependency fails to build because of mir-core with ldc2 and gdc #403

Closed tastyminerals closed 4 years ago

tastyminerals commented 4 years ago

I have a mir-algorithm dependency in the project defined as

dependency "mir-algorithm" version="~>3.9.2"

Building with dmd does not fail, buildng with either ldc2 or gdc throws:

 % dub build --compiler=ldc2
Performing "debug" build using ldc2 for x86_64.
pretty_array 1.0.1+commit.1.g3d16121: building configuration "library"...
../../.dub/packages/mir-core-1.1.7/mir-core/source/mir/functional.d(52,15): Error: module lifetime is in file 'core/lifetime.d' which cannot be read
import path[0] = /usr/include/d
import path[1] = /usr/lib/ldc/x86_64-linux-gnu/include/d/ldc
import path[2] = /usr/lib/ldc/x86_64-linux-gnu/include/d
import path[3] = source/
import path[4] = ../../.dub/packages/mir-algorithm-3.9.2/mir-algorithm/source/
import path[5] = ../../.dub/packages/mir-core-1.1.7/mir-core/source/
ldc2 failed with exit code 1.
9il commented 4 years ago

Probably you have an outdated version of ldc. And it may happen that GDC version with required front-end hasn't been published yet.

tastyminerals commented 4 years ago

ldc2 version is 1.8.0 on Ubuntu and it's the latest for this distro but the current ldc2 version is 1.22.0. So, we need to wait until the Debian ldc2 package maintainers update it :( Anyway, it's the update issue, closing.

9il commented 4 years ago

You can install the recent ldc yourself. Just unpack it and copy the folder to the required path or update the PATH variable.

tastyminerals commented 4 years ago

Yes, works with 1.22.0 version.