Created attachment 507692 [details] build.log ... snip ... bdev.c: In function ‘lvm_detect’: bdev.c:821:13: error: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. [-Werror] major(statbuf.st_rdev), minor(statbuf.st_rdev)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bdev.c:821:13: error: In the GNU C Library, "minor" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "minor", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "minor", you should undefine it after including <sys/types.h>. [-Werror] major(statbuf.st_rdev), minor(statbuf.st_rdev)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bdev.c: In function ‘find_free_loopdev_no_control’: bdev.c:1900:2: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations] while (!readdir_r(dir, &dirent, &direntp)) { ^~~~~ In file included from bdev.c:43:0: /usr/include/dirent.h:183:12: note: declared here extern int readdir_r (DIR *__restrict __dirp, ^~~~~~~~~ i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../src -fPIC -DPIC -I../../src -DLXCROOTFSMOUNT=\"/usr/lib/lxc/rootfs\" -DLXCPATH=\"/etc/lxc\" -DLXC_GLOBAL_CONF=\"/etc/lxc/lxc.conf\" -DLXCINITDIR=\"/usr/libexec\" -DLIBEXECDIR=\"/usr/libex ec\" -DLXCTEMPLATEDIR=\"/usr/share/lxc/templates\" -DLOGPATH=\"/var/log/lxc\" -DLXC_DEFAULT_CONFIG=\"/etc/lxc/default.conf\" -DLXC_USERNIC_DB=\"/run/lxc/nics\" -DLXC_USERNIC_CONF=\"/etc/lxc/lxc-usernet\" -DDEFAULT_CGROUP_PATTERN=\"/lxc/%n\" -DRUNTIME_PATH=\"/run\" -DSBINDIR=\"/usr/sbin\" -DHAVE_SECCOMP -pthread -march=i686 -mtune=i686 -msse -msse2 -mssse3 -mmmx -O2 -fomit-frame-pointer -pipe -mfpmath=sse -fno-strict-aliasing -Wall -Werror -c -o liblxc_so-start.o `test - f 'start.c' || echo './'`start.c start.c: In function ‘lxc_check_inherited’: start.c:190:2: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations] while (!readdir_r(dir, &dirent, &direntp)) { ^~~~~ In file included from start.c:29:0: /usr/include/dirent.h:183:12: note: declared here extern int readdir_r (DIR *__restrict __dirp, ^~~~~~~~~ ... snip ...
Created attachment 507694 [details] emerge --info '=app-emulation/lxc-1.0.8::gentoo'
managed to compile it by replacing -Werror with -Wno-error, but resulting binaries produce segmentation fault instead of useful work (kernel 4.9.52-gentoo) tracking down this https://bugs.gentoo.org/634866, I packaged lxc-1.0.11 with the same -Wno-error modification, and it works.
The 1.x line isn't in the portage tree anymore and I had some problems make LXC work when we made the last bump of that line (1.0.11). Do you have the same problems trying to compile LXC 2.x?
(In reply to Virgil Dupras from comment #3) > The 1.x line isn't in the portage tree anymore and I had some problems make > LXC work when we made the last bump of that line (1.0.11). Do you have the > same problems trying to compile LXC 2.x? No I haven't tried upgrading to 2.x yet, so with removal of 1.0.x packages the bug kind of resolved itself. I wonder why 1.0.x ebuilds were removed though, according to https://linuxcontainers.org/lxc/downloads/ 1.0.x is a lts release and is recommended to be used in production environment and is supported up to april 2019.
Follow up: app-emulation/lxc-2.1.1 builds fine on up to date system.
Maintenance burden probably. If none of the maintainers can make it work on an up-to-date system without great effort (I couldn't), it might not be worth keeping around.