Examples of compile bugs for xen-stable-4.11 for make dist-tools: "include/ipxe/uri.h:178:12: error: taking address of packed member of ‘struct uri’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 178 | ref_get ( &uri->refcnt );" -> fixed by adding the Cflag "-Wno-address-of-packed-member" in the Makefile (not sure this is the right solution !).
next firmware error: "drivers/infiniband/flexboot_nodnic.c: In function ‘flexboot_nodnic_create_qp’: drivers/infiniband/flexboot_nodnic.c:368:53: error: implicit conversion from ‘enum ib_queue_pair_type’ to ‘nodnic_queue_pair_type’ [-Werror=enum-conversion]" -> fixed by adding the flag -Wno-enum-conversion in the same tools/firmware/etherboot/ipxe/src/Makefile (some other compile errors and dirty tricks not included) So, how did the debian package was compiled ? is this the same source code with different options ? David Le mer. 16 sept. 2020 à 15:22, David I <[email protected]> a écrit : > Hello, > > thanks for your infos. it appears the compilation process is not really > straightforward. > I had to patch some header files. then some of the firmwares were bugged. > So I disabled some various checks in the firmwares Makefiles. > I ended up with a: > "no target for make all": > configure passed all tests with werror disabled, but failed some tests > with werror enabled. > > finally "make dist-xen" always succeeds", but "make dist-tools" seems not > bug-free. > > So if you have additional advice I will try further. Also if you need > volunteers to test extensively maybe i can help. > > David > > > > > Le mer. 16 sept. 2020 à 00:34, Hans van Kranenburg <[email protected]> a > écrit : > >> Hi, >> >> On 9/16/20 12:00 AM, Andrew Cooper wrote: >> > On 15/09/2020 21:16, David I wrote: >> >> Hello, >> >> >> >> I am unable to mcompile xen-tools from source. >> >> >> >> here is the "stacktrace": >> >> >> >> ln -f xenstore xenstore-watch >> >> gcc xenstore_control.o >> >> >> -Wl,-rpath-link=/home/david/xen/xen/tools/xenstore/../../tools/libs/toolcore >> >> /home/david/xen/xen/tools/xenstore/../../tools/xenstore/libxenstore.so >> >> -ldl >> >> >> >> /home/david/xen/xen/tools/xenstore/../../tools/libs/toolcore/libxentoolcore.so >> >> -o xenstore-control >> >> gcc -m64 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall >> >> -Wstrict-prototypes -Wdeclaration-after-statement >> >> -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O2 >> >> -fomit-frame-pointer >> >> -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__ -MMD -MF >> >> .xs_tdb_dump.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Werror >> >> -I. -include /home/david/xen/xen/tools/xenstore/../../tools/config.h >> >> -I./include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/evtchn/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libxc/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/toollog/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/foreignmemory/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/devicemodel/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> -D__XEN_TOOLS__ >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/toolcore/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> -DXEN_LIB_STORED="\"/var/lib/xenstored\"" >> >> -DXEN_RUN_STORED="\"/var/run/xenstored\"" -c -o xs_tdb_dump.o >> >> xs_tdb_dump.c >> >> gcc -m64 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall >> >> -Wstrict-prototypes -Wdeclaration-after-statement >> >> -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O2 >> >> -fomit-frame-pointer >> >> -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__ -MMD -MF >> >> .utils.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Werror -I. >> >> -include /home/david/xen/xen/tools/xenstore/../../tools/config.h >> >> -I./include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/evtchn/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libxc/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/toollog/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/foreignmemory/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/devicemodel/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> -D__XEN_TOOLS__ >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/toolcore/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include >> >> -DXEN_LIB_STORED="\"/var/lib/xenstored\"" >> >> -DXEN_RUN_STORED="\"/var/run/xenstored\"" >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/libs/gnttab/include >> >> -I/home/david/xen/xen/tools/xenstore/../../tools/include -c -o >> >> utils.o utils.c >> >> gcc xs_tdb_dump.o utils.o tdb.o talloc.o -o xs_tdb_dump >> >> /usr/bin/ld : utils.o:(.data.rel.local+0x0) : définitions multiples de >> >> « xprintf »; xs_tdb_dump.o:(.bss+0x0) : défini pour la première fois >> ici >> >> collect2: error: ld returned 1 exit status >> >> make[4]: *** [Makefile:97 : xs_tdb_dump] Erreur 1 >> >> make[4] : on quitte le répertoire >> « /home/david/xen/xen/tools/xenstore » >> >> make[3]: *** [/home/david/xen/xen/tools/../tools/Rules.mk:249 : >> >> subdir-install-xenstore] Erreur 2 >> >> make[3] : on quitte le répertoire « /home/david/xen/xen/tools » >> >> make[2]: *** [/home/david/xen/xen/tools/../tools/Rules.mk:244 : >> >> subdirs-install] Erreur 2 >> >> make[2] : on quitte le répertoire « /home/david/xen/xen/tools » >> >> make[1]: *** [Makefile:74 : install] Erreur 2 >> >> make[1] : on quitte le répertoire « /home/david/xen/xen/tools » >> >> make: *** [Makefile:127 : install-tools] Erreur 2 >> >> david@debian:~/xen/xen$ uname -a >> >> Linux debian 5.7.0-2-amd64 #1 SMP Debian 5.7.10-1 (2020-07-26) x86_64 >> >> GNU/Linux >> >> david@debian:~/xen/xen$ gcc --version >> >> gcc (Debian 10.2.0-5) 10.2.0 >> >> Copyright (C) 2020 Free Software Foundation, Inc. >> >> This is free software; see the source for copying conditions. There >> is NO >> >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR >> >> PURPOSE. >> >> >> >> david@debian:~/xen/xen$ /usr/bin/ld --version >> >> GNU ld (GNU Binutils for Debian) 2.35 >> >> Copyright (C) 2020 Free Software Foundation, Inc. >> >> Ce logiciel est libre; si vous le redistribuez, vous devez le faire >> >> selon les termes >> >> de la licence GNU General Public License version 3 ou postérieure >> >> selon votre besoin. >> >> Ce logiciel n'est couvert par aucune GARANTIE. >> >> david@debian:~/xen/xen$ git branch >> >> master >> >> * stable-4.11 >> >> staging >> >> david@debian:~/xen/xen$ >> >> >> >> I was able to compile dist-xen correctly though. But dist-tools fails >> >> with this error, I have seen a similar request here: >> >> >> https://stackoverflow.com/questions/63525163/usr-bin-ld-utils-o-data-rel-local0x0-multiple-definition-of-xprintf-xs >> >> >> >> I have tried to compile xen from source also on this same >> configuration, >> >> in stable-4.12, stable-4.13, stable-4.14, each time I was able to >> >> compile xen but failed to compile xen-tools. >> >> the debian package works fine and is in version 4.11. >> >> >> >> So my question would be, is there a patch for this issue ? and how the >> >> debian team could compile originally the debian source package ? I >> >> suppose I am not the first user to encounter this. >> >> >> >> Thank you for your answers ;-) >> > >> > Its a change in the toolchain from -fcommon to -fno-common by default. >> > >> > Already fixed upstream by: >> > >> https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=dacdbf7088d6a3705a9831e73991c2b14c519a65 >> > >> > Looks like that change wants backporting. >> >> Currently, I'm working together with Ian to get Xen 4.14 into Debian >> unstable. dacdbf708 is in 4.14 already, but we also had to pick >> >> d25cc3ec93eb ("libxl: workaround gcc 10.2 maybe-uninitialized warning") >> >> and >> >> fff1b7f50e75 ("libxl: fix -Werror=stringop-truncation in >> libxl__prepare_sockaddr_un") >> >> into 4.14 to fix further gcc 10 FTBFS (yay, backport candidates). Maybe >> this info helps a bit if you also run into these issues after fixing the >> first one. >> >> Hans >> >
