parke / lxroot

A lightweight, flexible, and safer alternative to chroot and/or Docker.
GNU General Public License v3.0
100 stars 9 forks source link

Compilation fails with Glibc 2.33 #6

Open giordano opened 3 years ago

giordano commented 3 years ago
% make build 
mkdir  -p  bin
g++  -g   -fmax-errors=2  -Wall  -Werror  -Wextra  -Wno-unused-parameter  lxroot.cpp  -o bin/lxroot
lxroot.cpp: In static member function ‘static flags_t Syscall::st_to_ms(flags_t)’:
lxroot.cpp:731:42: error: comparison between ‘enum<unnamed>’ and ‘enum<unnamed>’ [-Werror=enum-compare]
  731 |     #define  if_equal(     a, b )  (   a == b                ? b : 0 )
      |                                          ^
lxroot.cpp:735:7: note: in expansion of macro ‘if_equal’
  735 |       if_equal         (  ST_RDONLY,       MS_RDONLY       )
      |       ^~~~~~~~
lxroot.cpp:731:42: error: comparison between types ‘<unnamed enum>’ and ‘<unnamed enum>’ [-Werror=sign-compare]
  731 |     #define  if_equal(     a, b )  (   a == b                ? b : 0 )
      |                                          ^
lxroot.cpp:735:7: note: in expansion of macro ‘if_equal’
  735 |       if_equal         (  ST_RDONLY,       MS_RDONLY       )
      |       ^~~~~~~~
compilation terminated due to -fmax-errors=2.
make: *** [Makefile:36: bin/lxroot] Error 1
% g++ --version
g++ (GCC) 11.1.0
Copyright (C) 2021 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.
% uname -r
5.10.76-1-lts
% /usr/lib64/libc.so.6 
GNU C Library (GNU libc) release release version 2.33.
Copyright (C) 2021 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.
Compiled by GNU CC version 11.1.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
<https://bugs.archlinux.org/>
parke commented 3 years ago

Thanks for the pull request. I'm guessing that, with this change, you are now able to build Lxroot?

giordano commented 3 years ago

With the changes in #7 I can build, yes

parke commented 3 years ago

Great! I expect I will accept your pull request soon.

If you have any user feedback for Lxroot, I'd be very curious to hear how well (or how poorly) Lxroot worked for you.

I'd also be curious to hear any advantages or disadvantages Lxroot has versus your userns_sandbox tool. Thanks!

parke commented 3 years ago

I believe this issue may now be fixed in the (new) main branch. Please be advised that the (old) master branch has been retired and renamed master-retired-20211114. I made these branch changes to remove a past trivial commit from a third-party contributor. I hope I have now learned enough about git, pull requests, branching, and copyright issues that I will never again need to shuffle branches like this.

parke commented 2 years ago

I believe this issue is now fixed in the master branch.

Thanks again for submitting the bug report and the pull request.