claw icon indicating copy to clipboard operation
claw copied to clipboard

Add ppc64 and ppc64le support

Open fitzsim opened this issue 2 years ago • 6 comments

Can you please add support for the powerpc64-pc-linux-gnu and powerpc64le-pc-linux-gnu platforms? I can help test them, and I have some preliminary patches, but I don't know which branch or tag to start from (master appears to be ahead of the version available in Quicklisp). Thanks! (I noticed the support was missing when I attempted (ql:quickload :trivial-gamekit) on Debian ppc64le.)

fitzsim avatar Aug 26 '23 04:08 fitzsim

*features* will have :ppc64 and one of :little-endian (for powerpc64le-pc-linux-gnu) or :big-endian (for powerpc64-pc-linux-gnu).

fitzsim avatar Aug 26 '23 04:08 fitzsim

Unfortunately, support for PowerPC isn't planned for claw at the moment. Version of claw in Quicklisp is likely to be https://github.com/borodust/claw-legacy, but, as far as I remember, gamekit uses bindings generated by newer version of claw though.

Patching claw isn't enough to run gamekit on ppc. You would need to manually generate ppc bindings for all the wrappers trivial-gamekit uses.

borodust avatar Sep 04 '23 09:09 borodust

Thanks for taking a look.

The "org.borodust.bodge" Quicklisp distribution uses "http://bodge.borodust.org/dist/org.borodust.bodge/archive/claw-20200824142323.tgz", which seems to match https://github.com/borodust/claw-legacy master tip (4e7f834d46c302a48118748562bcd6bf2703fbb5).

The "Quicklisp" distribution is pulling in the "stable" branch of "https://github.com/borodust/claw.git":

https://raw.githubusercontent.com/quicklisp/quicklisp-projects/master/projects/claw/source.txt

http://beta.quicklisp.org/archive/claw/2020-10-16/claw-stable-git.tgz

From what I can tell, the "stable" branch no-longer exists, but I guess it used to represent what "claw-legacy" is now.

Do you plan to move trivial-gamekit to the new claw? And do you plan to get "Quicklisp" claw updated to the new claw?

If/when those things happen I can work on adding/maintaining ppc64 support throughout, if you're up for it. Or you can just close this "wontfix".

Pavel Korolev @.***> writes:

Unfortunately, support for PowerPC isn't planned for claw at the moment. Version of claw in Quicklisp is likely to be https://github.com/borodust/claw-legacy, but, as far as I remember, gamekit uses bindings generated by newer version of claw though.

Patching claw isn't not enough to run gamekit on ppc. You would need to manually generate ppc bindings for all the wrappers trivial-gamekit uses.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

fitzsim avatar Sep 04 '23 13:09 fitzsim

trivial-gamekit should use bindings generated by new claw as far as I remember. To reiterate, with new claw once the bindings generated, there's no dependency on claw itself. Wrappers use generated bindings that depend purely on cffi for C libraries (and iffi for C++ libraries). Patching claw wouldn't magically bring trivial-gamekit to ppc platform.

You can take a look at :bodge-glfw-bindings system. No claw in dependencies. There's claw-utils but that's a separate small project with some minor utilities. And generated bindings are pure cffi: https://github.com/borodust/bodge-glfw/blob/master/bindings/x86_64-pc-linux-gnu.lisp (again, claw-utils is just utilities, in this case, cffi-related utilities)

borodust avatar Sep 04 '23 13:09 borodust

As for ppc support in general, no plans so far, but I'll look into it in the future. Might not be hard to add it - that depends heavily on libclang and libresect.

borodust avatar Sep 04 '23 13:09 borodust

OK, thanks for the overview. That explains why I didn't see claw in the dependencies list. I'll try generating the required bindings locally. If I succeed, I'll submit some wrapper PRs. I've already got cffi working on ppc64, for cl-autowrap porting, and cl-autowrap accepted my ppc64 patches.

On September 4, 2023 9:46:11 a.m. EDT, Pavel Korolev @.***> wrote:

trivial-gamekit should use bindings generated by new claw as far as I remember. To reiterate, with new claw once the bindings generated, there's no dependency on claw itself. Wrappers use generated bindings that depend purely on cffi for C libraries (and iffi for C++ libraries). Patching claw wouldn't magically bring trivial-gamekit to ppc platform.

You can take a look at :bodge-glfw-bindings system. No claw in dependencies. There's claw-utils but that's a separate small project with some minor utilities. And generated bindings are pure cffi: https://github.com/borodust/bodge-glfw/blob/master/bindings/x86_64-pc-linux-gnu.lisp (again, claw-utils is just utilities, in this case, cffi-related utilities)

fitzsim avatar Sep 04 '23 17:09 fitzsim