Summary: | genkernel using older version of json-c, breaks clang | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | modularized |
Component: | genkernel | Assignee: | Gentoo Genkernel Maintainers <genkernel> |
Status: | CONFIRMED --- | ||
Severity: | critical | CC: | anrock623, bkohler, brokendreams1981, erikdenstore+gbugs, lo48576, tero |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | logs from genkernel |
Similar situation with genkernel and json-c-0.13.1 but gcc instead of clang and the error is json_object.c:227:50: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 227 | jso = (struct json_object*)calloc(sizeof(struct json_object), 1); | ^~~~~~ I've updated most of the genkernel bundled tools but not worked on json-c yet since it has moved to a meson build. I can work on this soon, but feel free to edit the genkernel ebuild to install 0.17 then hack on /usr/share/genkernel/gkbuilds/json-c.gkbuild and see if you can get 0.17 building. I should note, the current gkbuild is empty because it works well enough with all of the default src_ phases... so to get 0.17 building, we'll need to actually start defining phases. You can take a look at some of the *other* gkbuilds to see how they look. Works for me with gcc14 if i Add -Wno-error=calloc-transposed-args To the end of the DEFAULT_UTILS_CFLAGS line in /usr/share/genkernel/defaults/config.sh This downgrades it back to a warning (same behavior as gcc13). This isn't the proper fix. Json-c needs patched but I don't quite understand exactly what needs changed. It looks like a few arts just need flipped probably in arraylist.c and json_object.c A similar fix might work for clang. I've bumped json-c to 0.17 in genkernel-9999, can you give that a try? Thanks! (In reply to Ben Kohler from comment #6) > I've bumped json-c to 0.17 in genkernel-9999, can you give that a try? > > Thanks! I'll give it a try this evening. I can tell you json-c-0.17 isn't effected by this bug at least not with gcc (coincidently it uses malloc instead of calloc). Oddly some of the other utilities built during the initramfs stage prior to building json-c Emmitt the same warning but it's not upgraded to an error. Which is confusing. (In reply to Ben Kohler from comment #6) > I've bumped json-c to 0.17 in genkernel-9999, can you give that a try? > > Thanks! Tested. Builds and boots just fine here now with gcc14. Can't test clang. |
Created attachment 867525 [details] logs from genkernel ello, i am currently facing an issue that banjaxed compiling LUKS on sys-kernel/genkernel-4.3.5 which involves it using an outdated version of json-c (13.1, latest is # alright whats happening? i was trying to compile my initramfs with --luks enabled on genkernel and it kept reporting a "tried convert a long to double" error which i felt as if it was a problem with what i was doing so i naturally reported it in the forums, turns out it was a bug... # what would an ideal situation look like? if the version would be correct, the double conversion wouldnt give out an error and compiling would succeed. this is my first issue ever, so if the formatting was poor, thats probably why lol