Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] compile error building util-linux-2.40.4
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Duncan Mac Leod
Guru
Guru


Joined: 02 May 2004
Posts: 319
Location: Germany

PostPosted: Sat May 10, 2025 2:02 pm    Post subject: [solved] compile error building util-linux-2.40.4 Reply with quote

My glibc-2.40-r8 is compiled with linux-headers-5.15-r3 (gcc-11.5). I am using kernel-5.10, so I avoided to go to higher linux-headers, but I assume this may be the problem here..?

Code:

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4 -include config.h -I/var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/include -DLOCALEDIR=\"/usr/share/locale\" -D_PATH_RUNSTATEDIR=\"/run\" -D_PATH_LOCALSTATEDIR=\"/var\" -D_PATH_SYSCONFSTATICDIR=\"/usr/lib\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fsigned-char -fno-common -Wall -Wextra -Waddress-of-packed-member -Wdiscarded-qualifiers -Wformat-security -Wimplicit-function-declaration -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs -Wno-missing-field-initializers -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wsign-compare -Wstrict-prototypes -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wvla -Walloca -Werror=sequence-point -I./libblkid/src -I./libmount/src -I/var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/libmount/src -march=core-avx2 -O2 -pipe -c /var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/libmount/src/optstr.c  -fPIC -DPIC -o libmount/src/.libs/la-optstr.o
In file included from /var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/include/mount-api-utils.h:11,
                 from /var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/libmount/src/optlist.c:19:
/usr/include/linux/mount.h:95:6: error: redeclaration of 'enum fsconfig_command'
   95 | enum fsconfig_command {
      |      ^~~~~~~~~~~~~~~~
In file included from ./libmount/src/libmount.h:40,
                 from /var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/libmount/src/mountP.h:31,
                 from /var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/libmount/src/optlist.c:18:
/usr/lib/gcc/x86_64-pc-linux-gnu/11/include-fixed/sys/mount.h:250:6: note: originally defined here
  250 | enum fsconfig_command
      |      ^~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:96:9: error: redeclaration of enumerator 'FSCONFIG_SET_FLAG'
   96 |         FSCONFIG_SET_FLAG       = 0,    /* Set parameter, supplying no value */
      |         ^~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11/include-fixed/sys/mount.h:252:3: note: previous definition of 'FSCONFIG_SET_FLAG' with type 'enum fsconfig_command'
  252 |   FSCONFIG_SET_FLAG       = 0,    /* Set parameter, supplying no value */
      |   ^~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:97:9: error: redeclaration of enumerator 'FSCONFIG_SET_STRING'
   97 |         FSCONFIG_SET_STRING     = 1,    /* Set parameter, supplying a string value */
      |         ^~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11/include-fixed/sys/mount.h:254:3: note: previous definition of 'FSCONFIG_SET_STRING' with type 'enum fsconfig_command'
  254 |   FSCONFIG_SET_STRING     = 1,    /* Set parameter, supplying a string value */
      |   ^~~~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:98:9: error: redeclaration of enumerator 'FSCONFIG_SET_BINARY'
   98 |         FSCONFIG_SET_BINARY     = 2,    /* Set parameter, supplying a binary blob value */
      |         ^~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11/include-fixed/sys/mount.h:256:3: note: previous definition of 'FSCONFIG_SET_BINARY' with type 'enum fsconfig_command'
  256 |   FSCONFIG_SET_BINARY     = 2,    /* Set parameter, supplying a binary blob value */
      |   ^~~~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:99:9: error: redeclaration of enumerator 'FSCONFIG_SET_PATH'
   99 |         FSCONFIG_SET_PATH       = 3,    /* Set parameter, supplying an object by path */
      |         ^~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11/include-fixed/sys/mount.h:258:3: note: previous definition of 'FSCONFIG_SET_PATH' with type 'enum fsconfig_command'
  258 |   FSCONFIG_SET_PATH       = 3,    /* Set parameter, supplying an object by path */
      |   ^~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:100:9: error: redeclaration of enumerator 'FSCONFIG_SET_PATH_EMPTY'
  100 |         FSCONFIG_SET_PATH_EMPTY = 4,    /* Set parameter, supplying an object by (empty) path */
      |         ^~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11/include-fixed/sys/mount.h:260:3: note: previous definition of 'FSCONFIG_SET_PATH_EMPTY' with type 'enum fsconfig_command'
  260 |   FSCONFIG_SET_PATH_EMPTY = 4,    /* Set parameter, supplying an object by (empty) path */
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:101:9: error: redeclaration of enumerator 'FSCONFIG_SET_FD'
  101 |         FSCONFIG_SET_FD         = 5,    /* Set parameter, supplying an object by fd */
      |         ^~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11/include-fixed/sys/mount.h:262:3: note: previous definition of 'FSCONFIG_SET_FD' with type 'enum fsconfig_command'
  262 |   FSCONFIG_SET_FD         = 5,    /* Set parameter, supplying an object by fd */
      |   ^~~~~~~~~~~~~~~
/usr/include/linux/mount.h:102:9: error: redeclaration of enumerator 'FSCONFIG_CMD_CREATE'
  102 |         FSCONFIG_CMD_CREATE     = 6,    /* Invoke superblock creation */
      |         ^~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11/include-fixed/sys/mount.h:264:3: note: previous definition of 'FSCONFIG_CMD_CREATE' with type 'enum fsconfig_command'
  264 |   FSCONFIG_CMD_CREATE     = 6,    /* Invoke superblock creation */
      |   ^~~~~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:103:9: error: redeclaration of enumerator 'FSCONFIG_CMD_RECONFIGURE'
  103 |         FSCONFIG_CMD_RECONFIGURE = 7,   /* Invoke superblock reconfiguration */
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11/include-fixed/sys/mount.h:266:3: note: previous definition of 'FSCONFIG_CMD_RECONFIGURE' with type 'enum fsconfig_command'
  266 |   FSCONFIG_CMD_RECONFIGURE = 7,   /* Invoke superblock reconfiguration */
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/include/mount-api-utils.h:11,
                 from /var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/libmount/src/optlist.c:19:
/usr/include/linux/mount.h:129:8: error: redefinition of 'struct mount_attr'
  129 | struct mount_attr {
      |        ^~~~~~~~~~
In file included from ./libmount/src/libmount.h:40,
                 from /var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/libmount/src/mountP.h:31,
                 from /var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4/libmount/src/optlist.c:18:
/usr/lib/gcc/x86_64-pc-linux-gnu/11/include-fixed/sys/mount.h:219:8: note: originally defined here
  219 | struct mount_attr
      |        ^~~~~~~~~~
make[2]: *** [Makefile:12053: libmount/src/la-optlist.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4-abi_x86_64.amd64'
make[1]: *** [Makefile:16952: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4-abi_x86_64.amd64'
make: *** [Makefile:7294: all] Error 2
 * ERROR: sys-apps/util-linux-2.40.4::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-apps/util-linux-2.40.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/util-linux-2.40.4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-apps/util-linux-2.40.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/util-linux-2.40.4/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4-abi_x86_64.amd64'
 * S: '/var/tmp/portage/sys-apps/util-linux-2.40.4/work/util-linux-2.40.4'


Last edited by Duncan Mac Leod on Mon May 12, 2025 7:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 507

PostPosted: Sat May 10, 2025 2:57 pm    Post subject: Reply with quote

According to this, you should get a newer gcc.
If that is true, then gcc 12 should work.
Why are you still on gcc 11?
Back to top
View user's profile Send private message
Duncan Mac Leod
Guru
Guru


Joined: 02 May 2004
Posts: 319
Location: Germany

PostPosted: Mon May 12, 2025 7:20 pm    Post subject: Reply with quote

bstaletic wrote:
According to this, you should get a newer gcc.
If that is true, then gcc 12 should work.
Why are you still on gcc 11?


Upgrading gcc to latest stable version 12 and the error is gone. Thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



OSZAR »