Closed kwizart closed 8 months ago
I'm not able to test this at the moment; can you tell me if it fixes the build to change line 835 of pyaff.c from this:
struct AFFILE *af;
to this?
AFFILE *af;
Thanks for looking into this.
Removing the struct then leads to lot of occurrence of
/builddir/build/BUILD/AFFLIBv3-3.7.20/include/afflib/afflib.h:271:34: note: expected ‘AFFILE *’ {aka ‘struct _AFFILE *’} but argument is of type ‘struct AFFILE *’
But removing the struct on that line then leads to missing function definitions...
I wonder if regenerating pyaff.c with a newer version of cython would fix the problem. I installed cython but it isn't working for me right now. Is that something you could try?
I wonder if regenerating pyaff.c with a newer version of cython would fix the problem. I installed cython but it isn't working for me right now. Is that something you could try?
This is something we are doing in Homebrew to fix building with Python 3.12: https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/afflib.rb#L40
@p-linnane I just committed a new pyaff.c generated with the latest Cython, 3.0.8, so you might not have to regenerate it anymore.
Removing the struct then leads to lot of occurrence of
Interesting. I finally got a chance to test this and for me changing struct AFFILE *af;
to AFFILE *af;
absolutely fixed all these incompatible pointer type warnings/errors.
@kwizart , I committed the fix for this; please try again and share the output if you are still seeing errors
OK, I confirm this is fixed with the current code base.
Thanks!
gcc-14 in fedora rawhide (f40) currently fails to build from source the current afflib.
https://fedoraproject.org/wiki/Changes/GNUToolchainF40 https://fedoraproject.org/wiki/Changes/PortingToModernC#Use_of_incompatible_pointer_types_without_a_cast
One can reproduce with an older gcc with -Werror=incompatible-pointer-types