Sign up

Building on Raspberry Pi

I am using dub to build a Gtkd (3.8.3) application on the Raspberry Pi. I only have ldc2 and gdc available but the Phobos for these do not appear to be as complete as dmd (hasStaticMember is missing from std.traits).

Is there a way of getting Gtkd to build with ldc2 or gdc? Would it be worth trying to use an older version of Gtkd?

Any help would be appreciated.

Re: Building on Raspberry Pi

On 9/23/18 8:55 PM, David Orchard wrote:

I am using dub to build a Gtkd (3.8.3) application on the Raspberry Pi. I only have ldc2 and gdc available but the Phobos for these do not appear to be as complete as dmd (hasStaticMember is missing from std.traits).

Is there a way of getting Gtkd to build with ldc2 or gdc? Would it be worth trying to use an older version of Gtkd?

Any help would be appreciated.

If you don't have a newer version of ldc or gdc available, you can use
GtkD 3.7.5 or replace the hasStaticMember in gobject/ObjectG.d with
hasMember.

Re: Building on Raspberry Pi

On Mon, 24 Sep 2018 19:09:36 +0200, Mike Wey wrote:

On 9/23/18 8:55 PM, David Orchard wrote:

I am using dub to build a Gtkd (3.8.3) application on the Raspberry Pi. I only have ldc2 and gdc available but the Phobos for these do not appear to be as complete as dmd (hasStaticMember is missing from std.traits).

Is there a way of getting Gtkd to build with ldc2 or gdc? Would it be worth trying to use an older version of Gtkd?

Any help would be appreciated.

If you don't have a newer version of ldc or gdc available, you can use
GtkD 3.7.5 or replace the hasStaticMember in gobject/ObjectG.d with
hasMember.

Thanks a lot. I have changed 'hasStaticMember' to 'hasMember' as you suggested and it now get further. However, after several hours building ldc2 through a segmentation fault. I will try again with gdc and let you know.

Re: Building on Raspberry Pi

On Fri, 28 Sep 2018 20:41:16 GMT, David Orchard wrote:

On Mon, 24 Sep 2018 19:09:36 +0200, Mike Wey wrote:

On 9/23/18 8:55 PM, David Orchard wrote:

I am using dub to build a Gtkd (3.8.3) application on the Raspberry Pi. I only have ldc2 and gdc available but the Phobos for these do not appear to be as complete as dmd (hasStaticMember is missing from std.traits).

Is there a way of getting Gtkd to build with ldc2 or gdc? Would it be worth trying to use an older version of Gtkd?

Any help would be appreciated.

If you don't have a newer version of ldc or gdc available, you can use
GtkD 3.7.5 or replace the hasStaticMember in gobject/ObjectG.d with
hasMember.

Thanks a lot. I have changed 'hasStaticMember' to 'hasMember' as you suggested and it now get further. However, after several hours building ldc2 through a segmentation fault. I will try again with gdc and let you know.

I have just tried gdc-6. It crashed out with a load of compiler errors. ldc2 gets further but I think it is struggling with the limited resources. I will keep plugging away at this.

Re: Building on Raspberry Pi

I have just tried gdc-6. It crashed out with a load of compiler errors. ldc2 gets further but I think it is struggling with the limited resources. I will keep plugging away at this.

By default dub builds all the source files together in one go. But the Pi can't cope. Compiling with 'dub build --build-mode=singleFile' gets the objects to build but the link fails with:

Separate linking not supported for ldc

I can link the objects manually using ldc but I am not sure what the name and location of the output file should be to keep dub happy. I assume its should be gtkd-3 something in the same directory as the objects.

I need this so dub will move on to build the other output files.

Can anyone help.

Thanks.

Re: Building on Raspberry Pi

On Sun, 30 Sep 2018 15:36:00 GMT, David Orchard wrote:

I have just tried gdc-6. It crashed out with a load of compiler errors. ldc2 gets further but I think it is struggling with the limited resources. I will keep plugging away at this.

By default dub builds all the source files together in one go. But the Pi can't cope. Compiling with 'dub build --build-mode=singleFile' gets the objects to build but the link fails with:

Separate linking not supported for ldc

I can link the objects manually using ldc but I am not sure what the name and location of the output file should be to keep dub happy. I assume its should be gtkd-3 something in the same directory as the objects.

I need this so dub will move on to build the other output files.

Can anyone help.

Thanks.

This is the only thread when searching raspberry in the forum. I needed to use gtk-d with rp3, and here is how I did it simply without having to build gtkd.

sudo apt-get install libgtkd-3-dev

add those in dub.json of your test app:

"dflags": ["-I/usr/include/d/gtkd-3"],
"lflags": ["-lgtkd-3"]

Re: Building on Raspberry Pi

On Fri, 12 Mar 2021 12:00:16 GMT, stormy wrote:

This is the only thread when searching raspberry in the forum. I needed to use gtk-d with rp3, and here is how I did it simply without having to build gtkd.

sudo apt-get install libgtkd-3-dev

add those in dub.json of your test app:

"dflags": ["-I/usr/include/d/gtkd-3"],
"lflags": ["-lgtkd-3"]

I was about to suggest the same, as GtkD is in Fedora (which I use), I suspected there is a build for Debian and its derivatives as well! :)

Another alternative is to cross-compile on some "beefy" machine.