bindbc-sdl
bindbc-sdl copied to clipboard
Build error on ARM
Hi
I just wanted to try this library on a Raspberry Pi 400.
- Created a new dub package using
dub init
- Added
bindbc-sdl
as dependency - Added some example code to app.d
...and i got this error when trying to run dub build
:
Fetching bindbc-loader 1.0.1 (getting selected version)...
Fetching bindbc-sdl 1.2.1 (getting selected version)...
Performing "debug" build using /usr/bin/gdc for arm, arm_hardfloat.
bindbc-loader 1.0.1: building configuration "noBC"...
bindbc-sdl 1.2.1: building configuration "dynamic"...
../../.dub/packages/bindbc-sdl-1.2.1/bindbc-sdl/source/bindbc/sdl/bind/sdlatomic.d:29:29: error:
template instance atomicFence!() atomicFence is not a template declaration, it is a function
29 | alias SDL_CompilerBarrier = atomicFence!();
| ^
/usr/bin/gdc failed with exit code 1.
Is there something I'm missing?
I've never attempted to build any of my bindbc packages on a Pi, so it's unsurprising to see an error like this.
The error says atomicFence
is not a template, but you can see in the DRuntime repo that it really is. So this suggests that the DRuntime implementation you're using on Pi differs from the main repo. I'll have a look at the GDC version of DRuntime to see how it's configured and then special case it in the binding in one form or another.
But I have to ask for your patience. I'm just coming off a three-week vacation, and I have a lot of higher priority work to get done (SAOC applications, DConf videos, meeting summaries). It may be a few days before I get to it.
Looking at the history of GDC, about 2 years ago it used a version of Phobos where atomicFence
was a function instead of a template. Have you tried this with the latest version of GDC?
I'll try that, thanks!
I tried with ldc2 this time and I can confirm that it works now. I'll try gdc again when I have some time later.
Thank you for confirming that. If you get a chance to test it with a recent version of GDC I'll close this issue.
As of 1.3.0, BindBC-SDL no longer uses atomicFence, so this issue should be alleviated.