October 17, 2022

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

>

Dear All, Thank you so much for your replies and hints! I got it working today. All the libraries are properly linked and the Equation solver runs smoothly.

The compilers turned out to be problematic though. The "Mir" library does not work with the Ubuntu 18.04 gdc and ldc compilers. I have managed to install the latest version dmd, and it works. But I suspect that the dmd compiler is not optimal in terms of performance. The question becomes whether it is possible to install the most recent ldc and gdc compilers on Ubuntu 18.04?

[snip]

If you have a problem with support for mir, submit a bug report. I don't think gdc is supported, but ldc should be.

October 17, 2022

On Monday, 17 October 2022 at 20:22:47 UTC, jmh530 wrote:

>

If you have a problem with support for mir, submit a bug report. I don't think gdc is supported, but ldc should be.

The latest version of Mir can only be compiled with latest Ldc 1.30, 1.29 doesn't work.

Maybe Mir should add static check for supported complier versions, rather than let user try and error.

October 18, 2022
On 18/10/2022 9:37 AM, mw wrote:
> Maybe Mir should add static check for supported complier versions, rather than let user try and error.

Dub has dependency checks for compiler/dub in it.

It doesn't need to be in code.
October 17, 2022
On Monday, 17 October 2022 at 20:39:10 UTC, rikki cattermole wrote:
> On 18/10/2022 9:37 AM, mw wrote:
>> Maybe Mir should add static check for supported complier versions, rather than let user try and error.
>
> Dub has dependency checks for compiler/dub in it.
>
> It doesn't need to be in code.

Not everyone use dub to build.
October 18, 2022

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'm using Gentoo Linux and there's a 'dlang' overlay for various recent versions of DMD and LDC. I can also compile any version of GDC myself either via portage or just from a GCC sources tarball or git.

October 18, 2022

On Monday, 17 October 2022 at 20:22:47 UTC, jmh530 wrote:

>

If you have a problem with support for mir, submit a bug report. I don't think gdc is supported, but ldc should be.

GDC12 has finally upgraded its D language frontend version to 2.100 and I have successfully compiled a simple lubeck example by it after applying this patch: https://github.com/libmir/mir-core/pull/72 (it's merged now and the next version of mir-core will probably have it included).

But GDC isn't officially supported yet and isn't even getting tested by the current libmir's CI pipeline. Maybe GDC12 can be added to it now?

There's an open issue about troubles with LDC 1.24.0 from Debian 11: https://github.com/libmir/mir-core/issues/64

Libmir developers seem to be very eager to try every new language feature and break compatibility with D compilers unless these compilers are always super fresh.

That said, it's still possible to specify older versions of mir libraries in dub.sdl and compile the lubeck example by LDC 1.24.0 or DMD 2.091.1 with something like this:

/+dub.sdl:
dependency "lubeck" version="==1.5.1"
dependency "mir-core" version="==1.1.85"
dependency "mir-algorithm" version="==3.11.7"
+/
October 18, 2022

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.

October 18, 2022

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.

October 26, 2022

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.

October 26, 2022

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.