January 04, 2022
On Tuesday, 4 January 2022 at 21:22:26 UTC, Ben Jones wrote:
>>   * frame #0: 0x0000000000000000

That's null, meaning the library wasn't loaded.

simpledisplay actually doesn't need -lX11 since it always dynamic loads the libraries. Normally it throws when this fails though instead of keeping null but that check is also initialized in a static constructor....

With your different build process though, do you still have a D main? If druntime is not fully initialized these libs won't load nor will it set the success flag. So that'd leave null.

You can also quite possibly try to load it yourself:

        xlib.loadDynamicLibrary();
        xext.loadDynamicLibrary();

in your main and see if it works. Then the variable to check is `if(!librariesSuccessfullyLoaded)` and see if it set it up.
January 04, 2022

On Tuesday, 4 January 2022 at 21:34:46 UTC, Adam D Ruppe wrote:

>

On Tuesday, 4 January 2022 at 21:22:26 UTC, Ben Jones wrote:

> >
  • frame #0: 0x0000000000000000

That's null, meaning the library wasn't loaded.

simpledisplay actually doesn't need -lX11 since it always dynamic loads the libraries. Normally it throws when this fails though instead of keeping null but that check is also initialized in a static constructor....

With your different build process though, do you still have a D main? If druntime is not fully initialized these libs won't load nor will it set the success flag. So that'd leave null.

You can also quite possibly try to load it yourself:

    xlib.loadDynamicLibrary();
    xext.loadDynamicLibrary();

in your main and see if it works. Then the variable to check is if(!librariesSuccessfullyLoaded) and see if it set it up.

Ah, that was the issue. I had a linker error when I had a normal d main, so I made main extern(C). Looks like that wasn't actually necessary (I think maybe I had actually just put the .o with main in the wrong place so the symbol was missing). Reverting it to extern(D) fixed it on mac and linux. Thanks so much for the help!

January 05, 2022

On Tuesday, 4 January 2022 at 18:13:56 UTC, Ben Jones wrote:

>

The tricky part is that the lab machines that the students will be using don't have a D compiler installed (they're Fedora machines, and I didn't see a dmd package in their repos, or I would have asked the admins to install it).

I'm using Fedora 34

sudo dnf install ldc works and gives ldc version 1.25.0(based on dmd 2.095.1)(but you invoke via ldc2 or ldmd2)
name of rpm:
Source : ldc-1.25.1-2.fc34.src.rpm

sudo dnf install gcc-gdc also works(but it's not the recent one with the D frontend)(you don't even need to write gdc <input_file>.d, gcc <infut_file>.d also works.)
name of rpm:
Source : gcc-11.2.1-1.fc34.src.rpm

January 05, 2022

On Wednesday, 5 January 2022 at 03:38:54 UTC, Tejas wrote:

>

On Tuesday, 4 January 2022 at 18:13:56 UTC, Ben Jones wrote:

>

The tricky part is that the lab machines that the students will be using don't have a D compiler installed (they're Fedora machines, and I didn't see a dmd package in their repos, or I would have asked the admins to install it).

I'm using Fedora 34

sudo dnf install ldc works and gives ldc version 1.25.0(based on dmd 2.095.1)(but you invoke via ldc2 or ldmd2)
name of rpm:
Source : ldc-1.25.1-2.fc34.src.rpm

sudo dnf install gcc-gdc also works(but it's not the recent one with the D frontend)(you don't even need to write gdc <input_file>.d, gcc <infut_file>.d also works.)
name of rpm:
Source : gcc-11.2.1-1.fc34.src.rpm

good to know. What about dub?

January 06, 2022

On Wednesday, 5 January 2022 at 16:14:02 UTC, Ben Jones wrote:

>

On Wednesday, 5 January 2022 at 03:38:54 UTC, Tejas wrote:

>

On Tuesday, 4 January 2022 at 18:13:56 UTC, Ben Jones wrote:

>

The tricky part is that the lab machines that the students will be using don't have a D compiler installed (they're Fedora machines, and I didn't see a dmd package in their repos, or I would have asked the admins to install it).

I'm using Fedora 34

sudo dnf install ldc works and gives ldc version 1.25.0(based on dmd 2.095.1)(but you invoke via ldc2 or ldmd2)
name of rpm:
Source : ldc-1.25.1-2.fc34.src.rpm

sudo dnf install gcc-gdc also works(but it's not the recent one with the D frontend)(you don't even need to write gdc <input_file>.d, gcc <infut_file>.d also works.)
name of rpm:
Source : gcc-11.2.1-1.fc34.src.rpm

good to know. What about dub?

I can't say for sure, since I installed dmd from the website before installing the other two, but dub should be bundled with the other two as well

Regardless, know that I didn't install dub seperately, it got installed with either the dmd rpm, or the LDC or GDC one

1 2
Next ›   Last »