title: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’
body: <p>I'm trying to Build Qemu &amp; Xen for XenGT on Ubuntu 20.04 following this tutorial :</p>
  <p><a href="https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide#332-build-qemu--xen-for-xengt" rel="nofollow noreferrer">https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide#332-build-qemu--xen-for-xengt</a></p>
  <p>because I want to share the integrated GPU with a xen VM.</p>
  <p>The main hardware components of my PC are the following :</p>
  <p><strong>CPU I9-9900k</strong></p>
  <p><strong>Intel Corporation UHD Graphics 630 (Desktop 9 Series) (rev 02)</strong></p>
  <p><strong>IVIDIA Corporation TU102 [GeForce RTX 2080 Ti] (rev a1)</strong></p>
  <p>The compilation gave no errors until this point :</p>
  <pre><code>root@ziomario-z390aoruspro:/etc/xen/igvtg-xen# make install-tools
  
  ......
  
  make libs
  make[5]: ingresso nella directory «/etc/xen/igvtg-xen/tools/libxc»
  rm -f _paths.h.tmp; echo &quot;#define sbindir &quot;/usr/sbin&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define bindir &quot;/usr/bin&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define LIBEXEC &quot;/usr/lib/xen&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define LIBEXEC_BIN &quot;/usr/lib/xen/bin&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define libdir &quot;/usr/lib&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define SHAREDIR &quot;/usr/share&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define XENFIRMWAREDIR &quot;/usr/lib/xen/boot&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define XEN_CONFIG_DIR &quot;/etc/xen&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define XEN_SCRIPT_DIR &quot;/etc/xen/scripts&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define XEN_LOCK_DIR &quot;/var/lock&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define XEN_RUN_DIR &quot;/var/run/xen&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define XEN_PAGING_DIR &quot;/var/lib/xen/xenpaging&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define XEN_DUMP_DIR &quot;/var/lib/xen/dump&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define XEN_LOG_DIR &quot;/var/log/xen&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define XEN_LIB_DIR &quot;/var/lib/xen&quot;&quot; &gt;&gt;_paths.h.tmp; echo &quot;#define XEN_RUN_STORED &quot;/var/run/xenstored&quot;&quot; &gt;&gt;_paths.h.tmp; if ! cmp -s _paths.h.tmp paths.h; then mv -f paths.h.tmp paths.h; else rm -f paths.h.tmp; fi
  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 .xc_pm.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes -I. -I./include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -D__XEN_TOOLS -pthread -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/toollog/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/evtchn/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/devicemodel/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -include /etc/xen/igvtg-xen/tools/libxc/../../tools/config.h -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/call/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/foreignmemory/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/libs/gnttab/include -I/etc/xen/igvtg-xen/tools/libxc/../../tools/include -c -o xc_pm.o xc_pm.c
  In file included from /usr/include/string.h:495,
  from xc_private.h:24,
  from xc_pm.c:22:
  In function ‘strncpy’,
  inlined from ‘xc_set_cpufreq_gov’ at xc_pm.c:308:5:
  /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
  106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors
  make[5]: *** [/etc/xen/igvtg-xen/tools/libxc/../../tools/Rules.mk:222: xc_pm.o] Errore 1
  make[5]: uscita dalla directory «/etc/xen/igvtg-xen/tools/libxc»
  make[4]: *** [Makefile:184: build] Errore 2
  make[4]: uscita dalla directory «/etc/xen/igvtg-xen/tools/libxc»
  make[3]: *** [/etc/xen/igvtg-xen/tools/../tools/Rules.mk:246: subdir-install-libxc] Errore 2
  make[3]: uscita dalla directory «/etc/xen/igvtg-xen/tools»
  make[2]: *** [/etc/xen/igvtg-xen/tools/../tools/Rules.mk:241: subdirs-install] Errore 2
  make[2]: uscita dalla directory «/etc/xen/igvtg-xen/tools»
  make[1]: *** [Makefile:74: install] Errore 2
  make[1]: uscita dalla directory «/etc/xen/igvtg-xen/tools»
  make: *** [Makefile:127: install-tools] Errore 2
  </code></pre>
  <p>I see that this bug is widespread. How can I fix it ? Im not so skilled. I didn't find any solution. Can someone help me ? thanks.</p>