lxroot icon indicating copy to clipboard operation
lxroot copied to clipboard

Compilation fails with Glibc 2.33

Open giordano opened this issue 2 years ago • 5 comments

% 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/>

giordano avatar Nov 10 '21 20:11 giordano

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

parke avatar Nov 10 '21 22:11 parke

With the changes in #7 I can build, yes

giordano avatar Nov 10 '21 22:11 giordano

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 avatar Nov 10 '21 23:11 parke

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 avatar Nov 15 '21 17:11 parke

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

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

parke avatar Nov 19 '21 05:11 parke