public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/29703] New: gettimeofda: compile error with gcc 12.2.0 (glibc 2.36)
@ 2022-10-19 15:59 felix-glibc at fefe dot de
  2022-10-19 16:23 ` [Bug libc/29703] " schwab@linux-m68k.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: felix-glibc at fefe dot de @ 2022-10-19 15:59 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 29703
           Summary: gettimeofda: compile error with gcc 12.2.0 (glibc
                    2.36)
           Product: glibc
           Version: 2.36
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: felix-glibc at fefe dot de
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

I'm trying to build glibc 2.36 with gcc 12.2.0 on x86_64-linux. Here's what
happens:

make[2]: Entering directory '/tmp/glibc-2.36/time'
gcc ../sysdeps/unix/sysv/linux/x86/gettimeofday.c -c -std=gnu11 -fgnu89-inline 
-pipe -O2 -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants
-frounding-math -fstack-protector -fno-common -Wstrict-prototypes
-Wold-style-definition -fmath-errno    -fPIC -fcf-protection  
-ftls-model=initial-exec      -I../include -I/tmp/glibc-2.36/build/time 
-I/tmp/glibc-2.36/build  -I../sysdeps/unix/sysv/linux/x86_64/64 
-I../sysdeps/unix/sysv/linux/x86_64  -I../sysdeps/unix/sysv/linux/x86/include
-I../sysdeps/unix/sysv/linux/x86  -I../sysdeps/x86/nptl 
-I../sysdeps/unix/sysv/linux/wordsize-64  -I../sysdeps/x86_64/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/x86_64 
-I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/x86_64/64 
-I../sysdeps/x86_64/fpu  -I../sysdeps/x86/fpu  -I../sysdeps/x86_64 
-I../sysdeps/x86/include -I../sysdeps/x86  -I../sysdeps/ieee754/float128 
-I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 
-I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32 
-I../sysdeps/wordsize-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I..
-I../libio -I.  -D_LIBC_REENTRANT -include /tmp/glibc-2.36/build/libc-modules.h
-DMODULE_NAME=libc -include ../include/libc-symbols.h  -DPIC -DSHARED    
-DTOP_NAMESPACE=glibc -o /tmp/glibc-2.36/build/time/gettimeofday.os -MD -MP -MF
/tmp/glibc-2.36/build/time/gettimeofday.os.dt -MT
/tmp/glibc-2.36/build/time/gettimeofday.os
In file included from <command-line>:
../sysdeps/unix/sysv/linux/gettimeofday.c:56:29: error: ‘gettimeofday’ alias
between functions of incompatible types ‘int(struct timeval * restrict,  void *
restrict)’ and ‘int (*(void))(struct timeval *, void *)’
[-Werror=attribute-alias=]
   56 | weak_alias (__gettimeofday, gettimeofday)
      |                             ^~~~~~~~~~~~
./../include/libc-symbols.h:155:26: note: in definition of macro ‘_weak_alias’
  155 |   extern __typeof (name) aliasname __attribute__ ((weak, alias
(#name))) \
      |                          ^~~~~~~~~
../sysdeps/unix/sysv/linux/gettimeofday.c:56:1: note: in expansion of macro
‘weak_alias’
   56 | weak_alias (__gettimeofday, gettimeofday)
      | ^~~~~~~~~~
../sysdeps/unix/sysv/linux/gettimeofday.c:42:13: note: aliased declaration here
   42 | libc_ifunc (__gettimeofday,
      |             ^~~~~~~~~~~~~~
./../include/libc-symbols.h:737:25: note: in definition of macro
‘__ifunc_resolver’
  737 |   __typeof (type_name) *name##_ifunc (arg)                             
\
      |                         ^~~~
./../include/libc-symbols.h:853:32: note: in expansion of macro ‘__ifunc’
  853 | #define libc_ifunc(name, expr) __ifunc (name, name, expr, void,
INIT_ARCH)
      |                                ^~~~~~~
../sysdeps/unix/sysv/linux/gettimeofday.c:42:1: note: in expansion of macro
‘libc_ifunc’
   42 | libc_ifunc (__gettimeofday,
      | ^~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [/tmp/glibc-2.36/build/sysd-rules:93:
/tmp/glibc-2.36/build/time/gettimeofday.os] Error 1
make[2]: Leaving directory '/tmp/glibc-2.36/time'
make[1]: *** [Makefile:484: time/subdir_lib] Error 2
make[1]: Leaving directory '/tmp/glibc-2.36'
make: *** [Makefile:9: all] Error 2

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

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

* [Bug libc/29703] gettimeofda: compile error with gcc 12.2.0 (glibc 2.36)
  2022-10-19 15:59 [Bug libc/29703] New: gettimeofda: compile error with gcc 12.2.0 (glibc 2.36) felix-glibc at fefe dot de
@ 2022-10-19 16:23 ` schwab@linux-m68k.org
  2022-10-20  9:29 ` felix-glibc at fefe dot de
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2022-10-19 16:23 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
How did you configure it?  Please attach config.log.

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

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

* [Bug libc/29703] gettimeofda: compile error with gcc 12.2.0 (glibc 2.36)
  2022-10-19 15:59 [Bug libc/29703] New: gettimeofda: compile error with gcc 12.2.0 (glibc 2.36) felix-glibc at fefe dot de
  2022-10-19 16:23 ` [Bug libc/29703] " schwab@linux-m68k.org
@ 2022-10-20  9:29 ` felix-glibc at fefe dot de
  2022-10-20 10:13 ` schwab@linux-m68k.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: felix-glibc at fefe dot de @ 2022-10-20  9:29 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from Felix von Leitner <felix-glibc at fefe dot de> ---
Created attachment 14407
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14407&action=edit
my config.log

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

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

* [Bug libc/29703] gettimeofda: compile error with gcc 12.2.0 (glibc 2.36)
  2022-10-19 15:59 [Bug libc/29703] New: gettimeofda: compile error with gcc 12.2.0 (glibc 2.36) felix-glibc at fefe dot de
  2022-10-19 16:23 ` [Bug libc/29703] " schwab@linux-m68k.org
  2022-10-20  9:29 ` felix-glibc at fefe dot de
@ 2022-10-20 10:13 ` schwab@linux-m68k.org
  2022-10-20 14:22 ` felix-glibc at fefe dot de
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2022-10-20 10:13 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
Your compiler doesn't have the necessary support for indirect functions.

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

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

* [Bug libc/29703] gettimeofda: compile error with gcc 12.2.0 (glibc 2.36)
  2022-10-19 15:59 [Bug libc/29703] New: gettimeofda: compile error with gcc 12.2.0 (glibc 2.36) felix-glibc at fefe dot de
                   ` (2 preceding siblings ...)
  2022-10-20 10:13 ` schwab@linux-m68k.org
@ 2022-10-20 14:22 ` felix-glibc at fefe dot de
  2022-10-20 14:38 ` felix-glibc at fefe dot de
  2022-10-20 16:17 ` adhemerval.zanella at linaro dot org
  5 siblings, 0 replies; 7+ messages in thread
From: felix-glibc at fefe dot de @ 2022-10-20 14:22 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 from Felix von Leitner <felix-glibc at fefe dot de> ---
The following program compiles and runs on the same box:

$ cat ifunc.c
#include <stdio.h>

void my_test()
{
  puts("my_test called");
}

static void (*resolve_test (void)) (void)
{
  return my_test; // we'll just always select this routine
}

void test () __attribute__ ((ifunc ("resolve_test")));

int main() {
  test();
}
$ gcc -o ifunc ifunc.c
$ ./ifunc
my_test called
$

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

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

* [Bug libc/29703] gettimeofda: compile error with gcc 12.2.0 (glibc 2.36)
  2022-10-19 15:59 [Bug libc/29703] New: gettimeofda: compile error with gcc 12.2.0 (glibc 2.36) felix-glibc at fefe dot de
                   ` (3 preceding siblings ...)
  2022-10-20 14:22 ` felix-glibc at fefe dot de
@ 2022-10-20 14:38 ` felix-glibc at fefe dot de
  2022-10-20 16:17 ` adhemerval.zanella at linaro dot org
  5 siblings, 0 replies; 7+ messages in thread
From: felix-glibc at fefe dot de @ 2022-10-20 14:38 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #5 from Felix von Leitner <felix-glibc at fefe dot de> ---
I debugged what configure does. Turns out it calls readelf which couldn't find
a library on this system because of elfutils being to old so a newer shared
library was missing.

Not your fault. Sorry for the noise.

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

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

* [Bug libc/29703] gettimeofda: compile error with gcc 12.2.0 (glibc 2.36)
  2022-10-19 15:59 [Bug libc/29703] New: gettimeofda: compile error with gcc 12.2.0 (glibc 2.36) felix-glibc at fefe dot de
                   ` (4 preceding siblings ...)
  2022-10-20 14:38 ` felix-glibc at fefe dot de
@ 2022-10-20 16:17 ` adhemerval.zanella at linaro dot org
  5 siblings, 0 replies; 7+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-10-20 16:17 UTC (permalink / raw)
  To: glibc-bugs

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

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

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

--- Comment #6 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
As per comment #5.

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

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

end of thread, other threads:[~2022-10-20 16:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19 15:59 [Bug libc/29703] New: gettimeofda: compile error with gcc 12.2.0 (glibc 2.36) felix-glibc at fefe dot de
2022-10-19 16:23 ` [Bug libc/29703] " schwab@linux-m68k.org
2022-10-20  9:29 ` felix-glibc at fefe dot de
2022-10-20 10:13 ` schwab@linux-m68k.org
2022-10-20 14:22 ` felix-glibc at fefe dot de
2022-10-20 14:38 ` felix-glibc at fefe dot de
2022-10-20 16:17 ` adhemerval.zanella at linaro 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).