October 26, 2022

The workaround is to compile without --release mode, but using the "O3" ldc flag instead does the job - the binary is fast, yet the try - catch block executes properly.

On Wednesday, 26 October 2022 at 20:13:37 UTC, Yura wrote:

>

OK, got the problem solved by adding the following lines in my dub.sdl file:

lflags "-lopenblas" "-lgfortran"
dflags "--static"

However, one problem still remains. Apparently, when compiled with dub --release mode I got segfault in my try - catch block. Any solution to this?

On Wednesday, 26 October 2022 at 12:24:47 UTC, Yura wrote:

>

I am now trying to compile the code statically using the dub manager via the following command line:

dub build --force --build=release --compiler=path_to_ldc2/ldc2

and having these lines in my dub.sdl file:

dependency "mir" version="~>3.2.3"
dependency "lubeck" version="~>1.5.1"
dflags "-static"

For some reasons it does not work:

(.text+0x2f2): undefined reference to _gfortran_concat_string' /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libopenblas.a(dormlq.o):(.text+0x784): more undefined references to _gfortran_concat_string' follow
collect2: error: ld returned 1 exit status
Error: /usr/bin/cc failed with status: 1

Any idea of what I am doing wrong? Should I also specify something in my dub.sdl via lflags?

Thank you in advance!

On Tuesday, 18 October 2022 at 17:01:53 UTC, Yura wrote:

>

Yes, did the same and it worked. The amazing thing is that the system solver turned out to be natively parallel and runs smoothly!

On Tuesday, 18 October 2022 at 15:22:02 UTC, mw wrote:

>

On Tuesday, 18 October 2022 at 09:56:09 UTC, Siarhei Siamashka wrote:

>

On Monday, 17 October 2022 at 20:05:24 UTC, mw wrote:

>

On Monday, 17 October 2022 at 19:54:12 UTC, Yura wrote:

>

it is possible to install the most recent ldc and gdc compilers on Ubuntu 18.04?

Yes, I used LDC on the same system.

What's the recommended way to have up to date D compilers in Ubuntu?

I just download the official prebuilt binary from the ldc github repo.

1 2 3
Next ›   Last »