public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31624] New: Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
@ 2024-04-09 20:43 aurelien at aurel32 dot net
  2024-04-09 22:23 ` [Bug libc/31624] " sam at gentoo dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: aurelien at aurel32 dot net @ 2024-04-09 20:43 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31624

            Bug ID: 31624
           Summary: Does not build on 32-bit architectures with compiler
                    defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
           Product: glibc
           Version: 2.40
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: aurelien at aurel32 dot net
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Trying to build glibc on a 32-bit architectures with a compiler defaulting to
-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 like it is now the case in Ubuntu and
Debian leads to the following build issue:

gcc check_fds.c -c -std=gnu11 -fgnu89-inline  -g -O2 -Wall -Wwrite-strings
-Wundef -Werror -fmerge-all-constants -frounding-math -fno-stack-protector
-fno-common -Wp,-U_FORTIFY_SOURCE -Wstrict-prototypes -Wold-style-definition
-fmath-errno    -fPIC    -fno-stack-protector -DSTACK_PROTECTOR_LEVEL=0  
-ftls-model=initial-exec     -I../include -I/home/aurel32/glibc/glibc-build/csu
 -I/home/aurel32/glibc/glibc-build  -I../sysdeps/unix/sysv/linux/arm/le 
-I../sysdeps/unix/sysv/linux/arm  -I../sysdeps/arm/nptl 
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux 
-I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu 
-I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/arm 
-I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/arm/le/armv7/multiarch 
-I../sysdeps/arm/armv7/multiarch  -I../sysdeps/arm/le/armv7 
-I../sysdeps/arm/armv7  -I../sysdeps/arm/armv6t2  -I../sysdeps/arm/armv6 
-I../sysdeps/arm/le  -I../sysdeps/arm/include -I../sysdeps/arm 
-I../sysdeps/wordsize-32  -I../sysdeps/ieee754/flt-32 
-I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I..
-I../libio -I.  -D_LIBC_REENTRANT -include
/home/aurel32/glibc/glibc-build/libc-modules.h -DMODULE_NAME=libc -include
../include/libc-symbols.h  -DPIC -DSHARED     -DTOP_NAMESPACE=glibc -o
/home/aurel32/glibc/glibc-build/csu/check_fds.os -MD -MP -MF
/home/aurel32/glibc/glibc-build/csu/check_fds.os.dt -MT
/home/aurel32/glibc/glibc-build/csu/check_fds.os
In file included from ../sysdeps/generic/hp-timing.h:22,
                 from ../nptl/descr.h:26,
                 from ../sysdeps/arm/nptl/tls.h:39,
                 from ../sysdeps/unix/sysv/linux/arm/tls.h:23,
                 from ../sysdeps/unix/sysv/linux/arm/sysdep.h:28,
                 from ../sysdeps/unix/sysv/linux/not-cancel.h:23,
                 from check_fds.c:34:
../include/time.h:21:1: error: 'asm' declaration ignored due to conflict with
previous rename [-Werror=pragmas]
   21 | libc_hidden_proto (mktime)
      | ^~~~~~~~~~~~~~~~~
../include/time.h:22:1: error: 'asm' declaration ignored due to conflict with
previous rename [-Werror=pragmas]
   22 | libc_hidden_proto (timelocal)
      | ^~~~~~~~~~~~~~~~~
../include/time.h:23:1: error: 'asm' declaration ignored due to conflict with
previous rename [-Werror=pragmas]
   23 | libc_hidden_proto (localtime)
      | ^~~~~~~~~~~~~~~~~
In file included from ../sysdeps/unix/sysv/linux/not-cancel.h:26:
../include/sys/poll.h:10:1: error: 'asm' declaration ignored due to conflict
with previous rename [-Werror=pragmas]
   10 | libc_hidden_proto (ppoll)
      | ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [../o-iterator.mk:9:
/home/aurel32/glibc/glibc-build/csu/check_fds.os] Error 1
make[2]: Leaving directory '/home/aurel32/glibc/glibc/csu'
make[1]: *** [Makefile:484: csu/subdir_lib] Error 2
make[1]: Leaving directory '/home/aurel32/glibc/glibc'
make: *** [Makefile:9: all] Error 2


In addition this also causes build failures at the testsuite level:

gcc tst-localedef-path-norm.c -c -std=gnu11 -fgnu89-inline  -g -O2 -Wall
-Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math
-fno-stack-protector -fno-common -Wp,-U_FORTIFY_SOURCE -Wstrict-prototypes
-Wold-style-definition -fmath-errno    -fPIE        
-DCOMPLOCALEDIR='"/usr/lib/locale"' -DLOCALE_ALIAS_PATH='"/usr/share/locale"'
-Iprograms -I../include -I/home/aurel32/glibc/glibc-build/locale 
-I/home/aurel32/glibc/glibc-build  -I../sysdeps/unix/sysv/linux/arm/le 
-I../sysdeps/unix/sysv/linux/arm  -I../sysdeps/arm/nptl 
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux 
-I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu 
-I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/arm 
-I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/arm/le/armv7/multiarch 
-I../sysdeps/arm/armv7/multiarch  -I../sysdeps/arm/le/armv7 
-I../sysdeps/arm/armv7  -I../sysdeps/arm/armv6t2  -I../sysdeps/arm/armv6 
-I../sysdeps/arm/le  -I../sysdeps/arm/include -I../sysdeps/arm 
-I../sysdeps/wordsize-32  -I../sysdeps/ieee754/flt-32 
-I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I..
-I../libio -I.  -D_LIBC_REENTRANT -include
/home/aurel32/glibc/glibc-build/libc-modules.h -DMODULE_NAME=testsuite -include
../include/libc-symbols.h  -DPIC     -DTOP_NAMESPACE=glibc -o
/home/aurel32/glibc/glibc-build/locale/tst-localedef-path-norm.o -MD -MP -MF
/home/aurel32/glibc/glibc-build/locale/tst-localedef-path-norm.o.dt -MT
/home/aurel32/glibc/glibc-build/locale/tst-localedef-path-norm.o
tst-localedef-path-norm.c: In function 'run_test':
tst-localedef-path-norm.c:87:16: error: passing argument 2 of 'xstat' from
incompatible pointer type [-Werror=incompatible-pointer-types]
   87 |   xstat (path, &fs);
      |                ^~~
      |                |
      |                struct stat64 *
In file included from ../include/sys/cdefs.h:10,
                 from ../include/features.h:511,
                 from ../posix/sys/types.h:25,
                 from ../include/sys/types.h:1,
                 from tst-localedef-path-norm.c:33:
../support/xunistd.h:50:44: note: expected 'struct stat *' but argument is of
type 'struct stat64 *'
   50 | void __REDIRECT (xstat, (const char *path, struct stat *),
xstat_time64);
      |                                            ^~~~~~~~~~~~~
../misc/sys/cdefs.h:410:46: note: in definition of macro '__REDIRECT'
  410 | # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME
(#alias))
      |                                              ^~~~~
cc1: all warnings being treated as errors
make[2]: *** [../o-iterator.mk:9:
/home/aurel32/glibc/glibc-build/locale/tst-localedef-path-norm.o] Error 1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/31624] Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
  2024-04-09 20:43 [Bug libc/31624] New: Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 aurelien at aurel32 dot net
@ 2024-04-09 22:23 ` sam at gentoo dot org
  2024-04-09 23:23 ` adhemerval.zanella at linaro dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sam at gentoo dot org @ 2024-04-09 22:23 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31624

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/31624] Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
  2024-04-09 20:43 [Bug libc/31624] New: Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 aurelien at aurel32 dot net
  2024-04-09 22:23 ` [Bug libc/31624] " sam at gentoo dot org
@ 2024-04-09 23:23 ` adhemerval.zanella at linaro dot org
  2024-04-09 23:29 ` sam at gentoo dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2024-04-09 23:23 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31624

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg
         Resolution|---                         |INVALID

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
These flags are not meant to be used to build glibc itself, the user installed
programs (such as ldconfig) are using 64 bit time_t.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/31624] Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
  2024-04-09 20:43 [Bug libc/31624] New: Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 aurelien at aurel32 dot net
  2024-04-09 22:23 ` [Bug libc/31624] " sam at gentoo dot org
  2024-04-09 23:23 ` adhemerval.zanella at linaro dot org
@ 2024-04-09 23:29 ` sam at gentoo dot org
  2024-04-10 10:03 ` fweimer at redhat dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sam at gentoo dot org @ 2024-04-09 23:29 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31624

--- Comment #2 from Sam James <sam at gentoo dot org> ---
The problem is, glibc doesn't provide a way to easily say "I want to always
have 64-bit time_t and LFS" (I did ask:
https://inbox.sourceware.org/libc-alpha/A6582515-25ED-4F71-B924-4431F8139376@gentoo.org/).

Debian has therefore patched it into their GCC spec files.

What's the suggested alternative?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/31624] Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
  2024-04-09 20:43 [Bug libc/31624] New: Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 aurelien at aurel32 dot net
                   ` (2 preceding siblings ...)
  2024-04-09 23:29 ` sam at gentoo dot org
@ 2024-04-10 10:03 ` fweimer at redhat dot com
  2024-04-10 12:07 ` sam at gentoo dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fweimer at redhat dot com @ 2024-04-10 10:03 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31624

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
I think you could add an escape hatch in the specs fragment, like this:

*cpp_options:
+ %{!D_GENTOO_EVADE_TIME_BITS:-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64}

And then build glibc with -D_GENTOO_EVADE_TIMEBITS.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/31624] Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
  2024-04-09 20:43 [Bug libc/31624] New: Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 aurelien at aurel32 dot net
                   ` (3 preceding siblings ...)
  2024-04-10 10:03 ` fweimer at redhat dot com
@ 2024-04-10 12:07 ` sam at gentoo dot org
  2024-04-10 12:14 ` adhemerval.zanella at linaro dot org
  2024-04-10 14:50 ` doko at debian dot org
  6 siblings, 0 replies; 8+ messages in thread
From: sam at gentoo dot org @ 2024-04-10 12:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31624

--- Comment #4 from Sam James <sam at gentoo dot org> ---
Thanks, that's good enough for me.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/31624] Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
  2024-04-09 20:43 [Bug libc/31624] New: Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 aurelien at aurel32 dot net
                   ` (4 preceding siblings ...)
  2024-04-10 12:07 ` sam at gentoo dot org
@ 2024-04-10 12:14 ` adhemerval.zanella at linaro dot org
  2024-04-10 14:50 ` doko at debian dot org
  6 siblings, 0 replies; 8+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2024-04-10 12:14 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31624

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doko at debian dot org

--- Comment #5 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
*** Bug 31625 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/31624] Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
  2024-04-09 20:43 [Bug libc/31624] New: Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 aurelien at aurel32 dot net
                   ` (5 preceding siblings ...)
  2024-04-10 12:14 ` adhemerval.zanella at linaro dot org
@ 2024-04-10 14:50 ` doko at debian dot org
  6 siblings, 0 replies; 8+ messages in thread
From: doko at debian dot org @ 2024-04-10 14:50 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31624

--- Comment #6 from Matthias Klose <doko at debian dot org> ---
just adding here that both Debian and Ubuntu will use the distro-neutral flag 
_DISTRO_EVADE_TIME_BITS for that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-10 14:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-09 20:43 [Bug libc/31624] New: Does not build on 32-bit architectures with compiler defaulting to -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 aurelien at aurel32 dot net
2024-04-09 22:23 ` [Bug libc/31624] " sam at gentoo dot org
2024-04-09 23:23 ` adhemerval.zanella at linaro dot org
2024-04-09 23:29 ` sam at gentoo dot org
2024-04-10 10:03 ` fweimer at redhat dot com
2024-04-10 12:07 ` sam at gentoo dot org
2024-04-10 12:14 ` adhemerval.zanella at linaro dot org
2024-04-10 14:50 ` doko at debian dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).