Compilation Error when trying mir-optim BetterC
vladislavp
vladislavp at outlook.com
Sat Jul 20 00:12:18 UTC 2019
On Thursday, 18 July 2019 at 21:09:53 UTC, vladislavp wrote:
> 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.
>
>
> --
>
> ~/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' but does not return any indirections
> .....
Replying to my own question.
I resolved previously reported ldc2 error.
I removed distro (Ubuntu/Mint) version of ldc , and instead
installed 1.16 from the
release page ( https://github.com/ldc-developers/ldc/releases ).
The compilation error is now gone.
I also created the 'activate' script to setup paths (it was not
avaialble in the LDC tar)
in case is anyone interested it is attached below (just modify
LDC2_ROOT variable)
---
$ cat dlang/ldc2-1.16.0-linux-x86_64/activate
# copied form dmd version of the script
deactivate() {
export PATH="$_OLD_D_PATH"
export LIBRARY_PATH="$_OLD_D_LIBRARY_PATH"
export LD_LIBRARY_PATH="$_OLD_D_LD_LIBRARY_PATH"
unset _OLD_D_LIBRARY_PATH
unset _OLD_D_LD_LIBRARY_PATH
unset DMD
unset DC
export PS1="$_OLD_D_PS1"
unset _OLD_D_PATH
unset _OLD_D_PS1
unset -f deactivate
}
_OLD_D_PATH="${PATH:-}"
_OLD_D_LIBRARY_PATH="${LIBRARY_PATH:-}"
_OLD_D_LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}"
# modify this
export LDC2_ROOT=~/dlang/ldc2-1.16.0-linux-x86_64
export
LIBRARY_PATH="${LDC2_ROOT}/lib${LIBRARY_PATH:+:}${LIBRARY_PATH:-}"
export
LD_LIBRARY_PATH="${LDC2_ROOT}/lib${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH:-}"
_OLD_D_PATH="${PATH:-}"
_OLD_D_PS1="${PS1:-}"
export PS1="(ldc2-1.16)${PS1:-}"
export PATH="${LDC2_ROOT}/bin${PATH:+:}${PATH:-}"
export DMD=ldmd2
export DC=ldc2
export DUB=dub
More information about the Digitalmars-d-learn
mailing list