Bug 1526703
Summary: | xen FTBFS (ocaml) | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michael Young <m.a.young> | ||||
Component: | xen | Assignee: | Michael Young <m.a.young> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | jforbes, m.a.young, rjones, robinlee.sysu | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | xen-4.10.0-1.fc28 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-02-07 21:12:24 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Michael Young
2017-12-16 13:05:06 UTC
I can't get past a bunch of other errors when building locally: make[2]: Entering directory '/home/rjones/d/fedora/xen/master/xen-4.9.1/xen' gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -Wp,-MD,tools/kconfig/.conf.o.d -D_GNU_SOURCE -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -DKBUILD_NO_NLS -c -o tools/kconfig/conf.o tools/kconfig/conf.c tools/kconfig/conf.c: In function 'check_stdin': tools/kconfig/conf.c:77:3: error: format not a string literal and no format arguments [-Werror=format-security] printf(_("aborted!\n\n")); ^~~~~~ tools/kconfig/conf.c:78:3: error: format not a string literal and no format arguments [-Werror=format-security] printf(_("Console input/output is redirected. ")); ^~~~~~ tools/kconfig/conf.c:79:3: error: format not a string literal and no format arguments [-Werror=format-security] printf(_("Run 'make oldconfig' to update configuration.\n\n")); ^~~~~~ tools/kconfig/conf.c: In function 'conf_askvalue': tools/kconfig/conf.c:89:3: error: format not a string literal and no format arguments [-Werror=format-security] printf(_("(NEW) ")); ^~~~~~ tools/kconfig/conf.c: In function 'conf_choice': tools/kconfig/conf.c:290:5: error: format not a string literal and no format arguments [-Werror=format-security] printf(_(" (NEW)")); ^~~~~~ tools/kconfig/conf.c: In function 'check_conf': tools/kconfig/conf.c:438:6: error: format not a string literal and no format arguments [-Werror=format-security] printf(_("*\n* Restart config...\n*\n")); ^~~~~~ ... ie. bug 1520038 This patch will probably fix the immediate OCaml problem but I'm sure you'll find there are similar corrections that need to be made later in the build as well. Without being able to do a full build locally I cannot come up with a proper patch. Also did you check out upstream to see if they have fixed this? Most OCaml projects have been proactive in making safe-string fixes already since the compiler change was first made in 2014. let coredump xch domid fd = let dump s = - let wd = Unix.write fd s 0 (String.length s) in + let wd = Unix.write fd (Bytes.of_string s) 0 (String.length s) in if wd <> String.length s then failwith "error while writing"; in For testing you could try the cut down build at https://copr-be.cloud.fedoraproject.org/results/myoung/xentest/fedora-rawhide-x86_64/00688379-xen/xen-4.10.0-0.3.fc28.src.rpm which is based on an update to xen-4.10.0 which I am intending to put into rawhide when I can get it to build. I think this matches the latest upstream state of xen's ocaml, and I don't think it differs much from xen-4.9.1. It includes some ocaml fixes in the xen.ocaml406.patch patch, but I am currently stuck on how to fix the error File "logging.ml", line 63, characters 17-30: Warning 3: deprecated: Stdext.String.create Use Bytes.create instead. File "logging.ml", line 65, characters 2-25: Warning 3: deprecated: Stdext.String.set Use Bytes.set instead. File "logging.ml", line 66, characters 2-25: Warning 3: deprecated: Stdext.String.set Use Bytes.set instead. File "logging.ml", line 68, characters 6-10: Error: This expression has type string but an expression was expected of type bytes from xen-4.10.0/tools/ocaml/xenstored/logging.ml Created attachment 1368874 [details]
xen-safe-strings.patch
The attached patch allows me to build Xen 4.10.
(In reply to Richard W.M. Jones from comment #5) > Created attachment 1368874 [details] > xen-safe-strings.patch > > The attached patch allows me to build Xen 4.10. Thanks for that. It is building again thanks to your patch combined with a few lines I fixed and another unrelated fix. Is it okay if I submit these fixes to upstream xen? Sure, just go ahead, it's all open source. |