Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 864919 - app-containers/lxc-5.0.1: error: expected identifier before numeric constant 140 | #define P_PIDFD 3
Summary: app-containers/lxc-5.0.1: error: expected identifier before numeric constant ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Loong Linux
: Normal normal (vote)
Assignee: Joonas Niilola
URL: https://github.com/lxc/lxc/issues/4182
Whiteboard:
Keywords: PATCH
: 872785 (view as bug list)
Depends on:
Blocks: glibc-2.36
  Show dependency tree
 
Reported: 2022-08-11 14:31 UTC by HougeLangley
Modified: 2022-11-02 21:41 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build Log (emerge-full-build-log.log,113.83 KB, text/plain)
2022-08-11 14:32 UTC, HougeLangley
Details
emerge --info (emerge-info.log,5.85 KB, text/plain)
2022-08-11 14:32 UTC, HougeLangley
Details
emerge -pqv (emerge -pqv.log,149 bytes, text/plain)
2022-08-11 14:33 UTC, HougeLangley
Details
build.log (build.log,139.11 KB, text/plain)
2022-08-31 06:24 UTC, Joonas Niilola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description HougeLangley 2022-08-11 14:31:35 UTC
emerge -av app-containers/lxc failed

Reproducible: Always
Comment 1 HougeLangley 2022-08-11 14:32:09 UTC
Created attachment 799307 [details]
Build Log
Comment 2 HougeLangley 2022-08-11 14:32:24 UTC
Created attachment 799309 [details]
emerge --info
Comment 3 HougeLangley 2022-08-11 14:33:54 UTC
Created attachment 799311 [details]
emerge -pqv
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-11 14:47:42 UTC
../lxc-5.0.1/src/lxc/process_utils.h:140:17: error: expected identifier before numeric constant
  140 | #define P_PIDFD 3
Comment 6 Joonas Niilola gentoo-dev 2022-08-12 07:20:54 UTC
So either we're going to carry and ship many patches, or do a snaphshot release based on their GH and lose verify-sig functionality. I'm just tempted to wait for a bit until 5.0.2 is released...
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-13 17:28:00 UTC
(In reply to Joonas Niilola from comment #6)
> So either we're going to carry and ship many patches, or do a snaphshot
> release based on their GH and lose verify-sig functionality. I'm just
> tempted to wait for a bit until 5.0.2 is released...

There's not a huge rush from toolchain@ given the mount.h mess, although it looks like a workaround is emerging for that.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-30 19:11:12 UTC
The mount.h issue is gone (upstream reverted it essentially), so we'd love to get this fixed now, as it's one of the only remaining glibc-2.36 blockers.
Comment 9 Joonas Niilola gentoo-dev 2022-08-31 06:03:13 UTC
Using glibc-2.36-r1 it breaks "+io-uring" on lxc, and after applying the patches lxc won't compile with glibc-2.35-r8 anymore.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-31 06:06:18 UTC
(In reply to Joonas Niilola from comment #9)
> Using glibc-2.36-r1 it breaks "+io-uring" on lxc, and after applying the
> patches lxc won't compile with glibc-2.35-r8 anymore.

Could you show me the failure you get with the patches on 2.35?
Comment 11 Joonas Niilola gentoo-dev 2022-08-31 06:23:49 UTC
Okay, looks to be related to io-uring again with glibc-2.35. If I emerge with -io-uring it works.
Comment 12 Joonas Niilola gentoo-dev 2022-08-31 06:24:07 UTC
Created attachment 802126 [details]
build.log
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-01 01:52:08 UTC
(In reply to Joonas Niilola from comment #11)
> Okay, looks to be related to io-uring again with glibc-2.35. If I emerge
> with -io-uring it works.

with glibc-2.36 fixed, we should only need https://github.com/lxc/lxc/commit/ef1e0607b82e27350c2d677d649c6a0a9693fd40 which should be ok with 2.35 now?
Comment 14 Joonas Niilola gentoo-dev 2022-09-01 05:45:02 UTC
With that patch only, 2.35 works but 2.36 now fails to:

FAILED: src/lxc/liblxc_static.a.p/conf.c.o 
x86_64-pc-linux-gnu-gcc -Isrc/lxc/liblxc_static.a.p -Isrc/lxc -I../lxc-5.0.1/src/lxc -I. -I../lxc-5.0.1 -Isrc -I../lxc-5.0.1/src -Isrc/include -I../lxc-5.0.1/src/include -I../lxc-5.0.1/src/lxc/cgroups -I../lxc-5.0.1/src/lxc/storage -flto=auto -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -Wno-format-signedness -Wno-missing-field-initializers -Wno-unused-parameter -Wvla -Wimplicit-fallthrough=5 -Wcast-align -Wstrict-prototypes -fno-strict-aliasing -fstack-clash-protection --param=ssp-buffer-size=4 -Werror=implicit-function-declaration -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Winit-self -Wunused-but-set-variable -Wno-unused-parameter -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=return-type -Werror=incompatible-pointer-types -Wformat=2 -Wshadow -Wendif-labels -Werror=overflow -fdiagnostics-show-option -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -fasynchronous-unwind-tables -fexceptions -Warray-bounds -Wrestrict -Wreturn-local-addr -Wstringop-overflow -include config.h -march=native -O2 -pipe -fPIC -pthread -fvisibility=default -MD -MQ src/lxc/liblxc_static.a.p/conf.c.o -MF src/lxc/liblxc_static.a.p/conf.c.o.d -o src/lxc/liblxc_static.a.p/conf.c.o -c ../lxc-5.0.1/src/lxc/conf.c
../lxc-5.0.1/src/lxc/conf.c: In function '__lxc_idmapped_mounts_child':
../lxc-5.0.1/src/lxc/conf.c:2993:37: error: passing argument 4 of 'mount_setattr' from incompatible pointer type [-Werror=incompatible-pointer-types]
 2993 |                                     &attr,
      |                                     ^~~~~
      |                                     |
      |                                     struct lxc_mount_attr *
In file included from ../lxc-5.0.1/src/lxc/conf.c:22:
/usr/include/sys/mount.h:317:46: note: expected 'struct mount_attr *' but argument is of type 'struct lxc_mount_attr *'
  317 |                           struct mount_attr *__uattr, size_t __usize)
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~
../lxc-5.0.1/src/lxc/conf.c:3016:41: error: passing argument 4 of 'mount_setattr' from incompatible pointer type [-Werror=incompatible-pointer-types]
 3016 |                                         &attr,
      |                                         ^~~~~
      |                                         |
      |                                         struct lxc_mount_attr *
/usr/include/sys/mount.h:317:46: note: expected 'struct mount_attr *' but argument is of type 'struct lxc_mount_attr *'
  317 |                           struct mount_attr *__uattr, size_t __usize)
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~
../lxc-5.0.1/src/lxc/conf.c: In function 'lxc_idmapped_mounts_parent':
../lxc-5.0.1/src/lxc/conf.c:4130:37: error: passing argument 4 of 'mount_setattr' from incompatible pointer type [-Werror=incompatible-pointer-types]
 4130 |                                     &attr, sizeof(attr));
      |                                     ^~~~~
      |                                     |
      |                                     struct lxc_mount_attr *
/usr/include/sys/mount.h:317:46: note: expected 'struct mount_attr *' but argument is of type 'struct lxc_mount_attr *'
  317 |                           struct mount_attr *__uattr, size_t __usize)
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~
cc1: some warnings being treated as errors

since we're not turning all warnings into errors, I think it's important to to not ignore this one. Although I have no clue how fatal it is.

[ebuild   R   *] sys-libs/glibc-2.36-r1:2.2::gentoo  USE="multiarch (multilib) ssp stack-realign (static-libs) -audit -caps (-cet) -compile-locales (-crypt) (-custom-cflags) -doc -gd -headers-only -multilib-bootstrap -nscd -profile (-selinux) -suid -systemd -systemtap -test (-vanilla)"
Comment 15 Andreas K. Hüttel archtester gentoo-dev 2022-09-20 18:02:06 UTC
Please test again with glibc-2.36-r2
Comment 16 matoro archtester 2022-09-24 02:57:00 UTC
Still broken with =sys-libs/glibc-2.36-r3
Comment 17 matoro archtester 2022-09-24 03:03:35 UTC
https://github.com/lxc/lxc/pull/4179 fixes it for me
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-25 07:22:11 UTC
*** Bug 872785 has been marked as a duplicate of this bug. ***
Comment 19 Larry the Git Cow gentoo-dev 2022-10-04 16:10:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=391bd314114a302c9c4b87da6991659d1356f064

commit 391bd314114a302c9c4b87da6991659d1356f064
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-10-04 16:05:41 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-10-04 16:09:58 +0000

    app-containers/lxc: fix on glibc-2.36
    
    Closes: https://bugs.gentoo.org/864919
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../lxc/files/lxc-5.0.1-glibc-2.36.patch           | 383 +++++++++++++++++++++
 app-containers/lxc/lxc-5.0.1-r1.ebuild             |   2 +
 2 files changed, 385 insertions(+)