Skip Menu |
 

This queue is for tickets about the Perl-Dist-Strawberry CPAN distribution.

Report information
The Basics
Id: 130100
Status: open
Priority: 0/
Queue: Perl-Dist-Strawberry

People
Owner: Nobody in particular
Requestors: PLICEASE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: libffi bundled with strawberry 64bit doesn't support returning structures
Download (untitled) / with headers
text/plain 1.3k
libffi that comes with Strawberry doesn't seem to correctly support returning structs. This hasn't been a problem until now because FFI::Raw doesn't attempt to support thenm, and until now Platypus didn't either. This is a short C program that demonstrates the problem: https://github.com/Perl5-FFI/FFI-Platypus/blob/a9c458847dc919514e9e8a5ce01033574aaebf3f/inc/probe/recordvalue.c (just changed dlmain to main and you should be able to build it as an exe). The first release candidate for 3.3 does work for me at least: https://github.com/libffi/libffi/releases/tag/v3.3-rc0 Not sure how much effort it would be to upgrade, but it might be worth using that version instead if possible. It's an RC, but it doesn't seem like they are going to release a non RC 3.3 anytime soon, and I think on windows at least it is fairly stable. I think at least some of the linux vendors are using versions out of git since there hasn't been an official release in years. I have some experience getting libffi to build on windows and can help out if there are challenges. I am adding a check in the build code that will still work with less capability with the buggy libffi. Windows is the only platform where I see this problem (the same versions of libffi work fine in linux etc). The RC also gives you support for long double and complex types (I suspect the same bug is the cause).
Download (untitled) / with headers
text/plain 1.1k
On Thu Jul 18 03:55:16 2019, KMX wrote: Show quoted text
> If you are using strawberry perl 5.30 try to download: > > http://strawberryperl.com/package/kmx/32_libs/gcc83- > 2019Q3/32bit_libffi-3.3-rc0-bin_20190718.zip > or > http://strawberryperl.com/package/kmx/64_libs/gcc83- > 2019Q3/64bit_libffi-3.3-rc0-bin_20190718.zip > > and simply unzip it in the strawberry installation folder.
Terrific. I tested Platypus master against 5.30.0 32 and 64 bit with both the 3.2.1 (included) and 3.3-rc0 (provided by you). 5.30.0 32bit libffi 3.2.1 ok without support for long double or complex types 5.30.0 32bit libffi 3.3-rc0 ok with all features 5.30.0 64bit libffi 3.2.1 ok without support for record value (as return type) long double or complex types 5.30.0 64bit libffi 3.3-rc0 ok with all features I also uncovered a small bug in the test suite revealed because I hadn't been able to test complex types on 32bit until now, that should go out today as FFI::Platypus 0.93_02. I verified that FFI::Raw still installs cleanly, for what its worth. 3.3-rc0 would put strawberry at feature parity with what normally works out of the box on Linux for libffi.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.