Archlinux template build fails: 'readdir_r' is deprecated

76 views
Skip to first unread message

Dimitri

unread,
Oct 9, 2016, 5:05:09 AM10/9/16
to qubes-users
I didn't build the archlinux template for a long time. Once it worked as described here https://www.qubes-os.org/doc/templates/archlinux/ but now it fails with this error (for 3.1 and 3.2):

libxl_utils.c: In function 'libxl__remove_directory':
libxl_utils.c:480:9: error: 'readdir_r' is deprecated [-Werror=deprecated-declarations]
int r = readdir_r(d, de_buf, &de);
^~~
In file included from libxl_internal.h:25:0,
from libxl_utils.c:20:
/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [/home/user/qubes-src/vmm-xen/src/xen-4.6.1/tools/libxl/../../tools/Rules.mk:107: libxl_utils.o] Error 1
make[3]: Leaving directory '/home/user/qubes-src/vmm-xen/src/xen-4.6.1/tools/libxl'
make[2]: *** [/home/user/qubes-src/vmm-xen/src/xen-4.6.1/tools/../tools/Rules.mk:123: subdir-install-libxl] Error 2
make[2]: Leaving directory '/home/user/qubes-src/vmm-xen/src/xen-4.6.1/tools'
make[1]: *** [/home/user/qubes-src/vmm-xen/src/xen-4.6.1/tools/../tools/Rules.mk:118: subdirs-install] Error 2
make[1]: Leaving directory '/home/user/qubes-src/vmm-xen/src/xen-4.6.1/tools'
make: *** [Makefile:102: install-tools] Error 2
==> ERROR: A failure occurred in build().
Aborting...
/home/user/qubes-builder/qubes-src/builder-archlinux/Makefile.archlinux:120: recipe for target 'dist-package' failed
make[2]: *** [dist-package] Error 2


How can I fix this? Ignoring the deprecation? Replace readdir_r with a non deprecated alternative?

Thanks for help!

Jimmy Axenhus

unread,
Oct 9, 2016, 5:17:30 AM10/9/16
to qubes...@googlegroups.com
I built the archlinux template yesterday and ran into the same problem.
I had to modify /etc/makepkg.conf and add "-Wno-deprecated-declarations"
to CFLAGS.

That's not enough however as I also had to bind mount /dev/pts on the
chroot because gpg was failing when installing packages. I poked around
in various scripts and somehow got to it work.

Dimitri

unread,
Oct 9, 2016, 9:08:16 AM10/9/16
to qubes-users, qu...@axenhus.com

Thanks. Modifying /etc/makepkg.conf was sufficient!

Reply all
Reply to author
Forward
0 new messages