On Thu, Feb 15, 2024 at 12:24:22PM +0100, Jakub Jelinek wrote: > On Thu, Feb 15, 2024 at 11:13:08AM +0000, Richard W.M. Jones wrote: > > We noticed that some ghc-* packages FTBFS with Modern C failures eg > > these two picked at random: > > > > https://koji.fedoraproject.org/koji/taskinfo?taskID=113534568 > > https://koji.fedoraproject.org/koji/taskinfo?taskID=113534602 > > > > I think what's happening here is that ghc is generating C FFI code > > which is fed to GCC 14. The code being generated is buggy. > > > > So probably the fix for this is just in ghc itself. I looked at > > upstream ghc and wasn't able to identify any commits which fix this > > (except maybe > > https://github.com/ghc/ghc/commit/b3a3534b6f75b34dc4db76e904e071485da6d5cc). > > But I didn't look especially hard and the code is very complicated. > > > > An alternative to fixing this in the compiler is to throw up our hands > > and add: > > > > %global build_type_safety_c 0 > > Please don't if at all possible. > > > to every affected ghc-* package. eg This fixes ghc-readline: > > > > https://koji.fedoraproject.org/koji/taskinfo?taskID=113535426 > > > > Any thoughts on this? > > The diagnostics is quite clear what needs to be done, in some cases > #include <stdlib.h>, in others (uintptr_t) cast added when you want to > assign a pointer to ffi_arg which is integral type. Perhaps stdint.h > include for that. The problem isn't that we don't know how to change the code, the problem is we need to work out where in the depths of GHC to make the change. Take a look for yourself: https://github.com/ghc/ghc/blob/master/compiler/GHC/HsToCore/Foreign/C.hs Rich. > Jakub > -- > _______________________________________________ > devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx > To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx > Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx > Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top -- _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue