perl-CommonMark failed to build from source in Fedora rawhide/f42 https://koji.fedoraproject.org/koji/taskinfo?taskID=128031648 For details on the mass rebuild see: https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild Please fix perl-CommonMark at your earliest convenience and set the bug's status to ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks, perl-CommonMark will be orphaned. Before branching of Fedora 43, perl-CommonMark will be retired, if it still fails to build. For more details on the FTBFS policy, please visit: https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
Created attachment 2071594 [details] build.log
Created attachment 2071595 [details] root.log file root.log too big, will only attach last 32768 bytes
Created attachment 2071596 [details] state.log
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle. Changing version to 42.
From build.log: gcc -c -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DVERSION=\"0.310100\" -DXS_VERSION=\"0.310100\" -fPIC "-I/usr/lib64/perl5/CORE" CommonMark.c CommonMark.c: In function ‘XS_CommonMark__Node_interface_get_node’: CommonMark.c:675:18: error: too many arguments to function ‘XSFUNCTION’; expected 0, have 1 675 | RETVAL = XSFUNCTION(node); | ^~~~~~~~~~ ~~~~ CommonMark.c: In function ‘XS_CommonMark__Node_interface_get_int’: CommonMark.c:701:18: error: too many arguments to function ‘XSFUNCTION’; expected 0, have 1 701 | RETVAL = XSFUNCTION(node); | ^~~~~~~~~~ ~~~~ [...] A difference between passing and failing build root is at <https://koschei.fedoraproject.org/build/19465911>. This failure is triggered by upgrading gcc from version 14 to 15.
The offending generated C code from XS file with Extutils::ParseXS: XS_EUPXS(XS_CommonMark__Node_interface_get_node); /* prototype to pass -Wmissing-prototypes */ XS_EUPXS(XS_CommonMark__Node_interface_get_node) { dVAR; dXSARGS; dXSFUNCTION(cmark_node *); if (items != 1) croak_xs_usage(cv, "node"); { cmark_node * RETVAL; cmark_node * node = (cmark_node*)S_sv2c(aTHX_ ST(0), "CommonMark::Node", 16, cv, "node") ; XSFUNCTION = XSINTERFACE_FUNC(cmark_node *,cv,XSANY.any_dptr); → RETVAL = XSFUNCTION(node); { SV * RETVALSV; RETVALSV = S_node2sv(aTHX_ RETVAL); RETVALSV = sv_2mortal(RETVALSV); ST(0) = RETVALSV; } } XSRETURN(1); } XSFUNCTION is declared with dXSFUNCTION() macro defined in XSUB.h as: #ifdef __cplusplus # define XSINTERFACE_CVT(ret,name) ret (*name)(...) # define XSINTERFACE_CVT_ANON(ret) ret (*)(...) #else # define XSINTERFACE_CVT(ret,name) ret (*name)() # define XSINTERFACE_CVT_ANON(ret) ret (*)() #endif #define dXSFUNCTION(ret) XSINTERFACE_CVT(ret,XSFUNCTION) #define XSINTERFACE_FUNC(ret,cv,f) ((XSINTERFACE_CVT_ANON(ret))(f)) #define XSINTERFACE_FUNC_SET(cv,f) \ CvXSUBANY(cv).any_dxptr = (void (*) (pTHX_ void*))(f) It seems that ExtUtils::ParseXS does not conform to C23 and declares the function pointer as a pointer to a function with an empty argument list ("ret (*)()").
It is a bug in ExtUtils::ParseXS <https://github.com/Perl/perl5/issues/23192>. Until it is fixed, I recommend adding -std=c99 to CCFLAGS in Makefile.PL.
Fixed by Adam Williamson a while back: https://koji.fedoraproject.org/koji/buildinfo?buildID=2744003