Compilation Error when trying mir-optim BetterC
vladislavp
vladislavp at outlook.com
Thu Jul 18 21:09:53 UTC 2019
Hello,
I am trying to create a 'boiler plate' project
that's essentially uses only betterC libraries
(and itself is betterC)
for my needs I would like to use mir-optim
(this is a linear optimization betterC lib)
However, I cannot seem to get passed compilation errors
when including mir-optim library.
I do not have any problem including mir-cpuid library.
So I am somewhat confused what I might be doing wrong.
Thank you in advance for any help.
On Linux Mint Tessa (based on Ubuntu 18)
--
LDC - the LLVM D compiler (1.8.0):
based on DMD v2.078.3 and LLVM 5.0.1
built with LDC - the LLVM D compiler (0.17.5)
Default target: x86_64-pc-linux-gnu
Host CPU: sandybridge
--
~/dlang/dmd-2.087.0/linux/bin64/dub --compiler=ldc2
--build=release
--
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/ndslice/slice.d(1450,14): Error: function type 'pure nothrow @nogc @property return @trusted float()' has 'return' bu
t does not return any indirections
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/numeric.d(670,26): Error: template instance mir.ndslice.slice.Slice!(FieldIterator!(LinspaceField!float), 1LU, cast(m
ir_slice_kind)2).mir_slice.front!0 error instantiating
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/numeric.d(358,12): instantiated from here: findRootImplGen!float
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/algorithm/iteration.d(2170,54): Error: template instance mir.algorithm.iteration.allImpl!(naryFun, Slice!(FieldIterat
or!(LinspaceField!float), 1LU, cast(mir_slice_kind)2),
Slice!(FieldIterator!(LinspaceField!float), 1LU,
cast(mir_slice_kind)2)) error instantiating
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/algorithm/iteration.d(2424,24): instantiated from here: all!(Slice!(FieldIterator!(LinspaceField!float), 1LU,
cast(mir_slice_kind)2),
Slice!(FieldIterator!(LinspaceField!float), 1LU,
cast(mir_slice_kind)2))
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/ndslice/slice.d(1947,25): instantiated from here: equal!(Slice!(FieldIterator!(LinspaceField!float), 1LU, cast
(mir_slice_kind)2), Slice!(FieldIterator!(LinspaceField!float),
1LU, cast(mir_slice_kind)2))
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/ndslice/slice.d(385,1): instantiated from here: Slice!(FieldIterator!(LinspaceField!float), 1LU, cast(mir_slic
e_kind)2)
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/ndslice/slice.d(398,24): ... (2 instantiations, -v to show) ...
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/numeric.d(640,26): instantiated from here: linspace!(float, 1LU)
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/numeric.d(358,12): instantiated from here: findRootImplGen!float
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/ndslice/slice.d(1450,14): Error: function type 'pure nothrow @nogc @property return @trusted double()' has 'return' b
ut does not return any indirections
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/numeric.d(670,26): Error: template instance mir.ndslice.slice.Slice!(FieldIterator!(LinspaceField!double), 1LU, cast(
mir_slice_kind)2).mir_slice.front!0 error instantiating
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/numeric.d(376,12): instantiated from here: findRootImplGen!double
/home/v/.dub/packages/mir-algorithm-3.4.19/mir-algorithm/source/mir/algorithm/iteration.d(2170,54): Error: template instance mir.algorithm.iteration.allImpl!(naryFun, Slice!(FieldIterat
or!(LinspaceField!double), 1LU, cast(mir_slice_kind)2),
Slice!(FieldIterator!(LinspaceField!double), 1LU,
cast(mir_slice_kind)2)) error instantiating
ldc2 failed with exit code 1.
---
dub.json
{
"authors": [
"test at localhost"
],
"copyright": "Copyright © 2019, test at localhost",
"dependencies": {
"mir-cpuid": "~>1.2.2",
"mir-optim": "~>1.4.5"
},
"dflags-ldc":["-mcpu=native", "-betterC"],
"description": "user front end for Jitro controls",
}
More information about the Digitalmars-d-learn
mailing list