public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Saifi Khan <saifi.khan@nishan.io>
Cc: libc-help@sourceware.org
Subject: Re: error: ‘__libc_single_threaded_internal’ undeclared
Date: Sun, 20 Nov 2022 14:18:14 -0300	[thread overview]
Message-ID: <CAMXh4bWuxN-Lo3sDdbC22TC_hvmfDWRcmBdEeT9J3VJt3pAw8Q@mail.gmail.com> (raw)
In-Reply-To: <20221120135532.10506.qmail@s411.sureserver.com>

On Sun, Nov 20, 2022 at 10:55 AM Saifi Khan <saifi.khan@nishan.io> wrote:
>
> Hi:
>
> Trying to perform a 'out-of-source-tree' build glibc 'main' on K:  6.0.0-4-amd64, L: (Debian GLIBC 2.36-5), C: gcc 12.2.0.
>
> The following error is encountered.
>
> gcc-12 ../sysdeps/unix/sysv/linux/sigsuspend.c -c -std=gnu11 -fgnu89-inline  -O2 -pipe -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fno-stack-protector -fno-common -Wstrict-prototypes -Wold-style-definition -fmath-errno    -fPIC -fexceptions -fasynchronous-unwind-tables  -ftls-model=initial-exec      -I../include -I/opt/work/linux/glibc/build/signal  -I/opt/work/linux/glibc/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/multiarch  -I../sysdeps/x86_64/fpu  -I../sysdeps/x86
>  /fpu  -I../sysdeps/x86_64/multiarch  -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 /opt/work/linux/glibc/build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h  -DPIC -DSHARED     -DTOP_NAMESPACE=glibc -o /opt/work/linux/glibc/build/signal/sigsuspend.os -MD -MP -MF /opt/work/linux/glibc/build/signal/sigsuspend.os.dt -MT /opt/work/linux/glibc/build/signal/sigsuspend.os
> In file included from ../sysdeps/unix/sysv/linux/x86_64/single-thread.h:2,
>                  from ../sysdeps/unix/sysdep.h:19,
>                  from ../sysdeps/unix/x86_64/sysdep.h:18,
>                  from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:23,
>                  from ../sysdeps/unix/sysv/linux/sysdep-cancel.h:23,
>                  from ../sysdeps/unix/sysv/linux/sigsuspend.c:19:
> ../sysdeps/unix/sysv/linux/sigsuspend.c: In function ‘__sigsuspend’:
> ../sysdeps/unix/sysv/linux/single-thread.h:38:27: error: ‘__libc_single_threaded_internal’ undeclared (first use in this function); did you mean ‘__libc_single_threaded’?
>
>    38 | # define SINGLE_THREAD_P (__libc_single_threaded_internal != 0)
>       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../sysdeps/unix/sysdep.h:115:37: note: in expansion of macro ‘SINGLE_THREAD_P’
>   115 | # define NO_SYSCALL_CANCEL_CHECKING SINGLE_THREAD_P
>       |                                     ^~~~~~~~~~~~~~~
> ../sysdeps/unix/sysdep.h:121:9: note: in expansion of macro ‘NO_SYSCALL_CANCEL_CHECKING’
>   121 |     if (NO_SYSCALL_CANCEL_CHECKING)                                          \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> ../sysdeps/unix/sysv/linux/sigsuspend.c:26:10: note: in expansion of macro ‘SYSCALL_CANCEL’
>    26 |   return SYSCALL_CANCEL (rt_sigsuspend, set, __NSIG_BYTES);
>       |          ^~~~~~~~~~~~~~
> ../sysdeps/unix/sysv/linux/single-thread.h:38:27: note: each undeclared identifier is reported only once for each function it appears in
>    38 | # define SINGLE_THREAD_P (__libc_single_threaded_internal != 0)
>       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../sysdeps/unix/sysdep.h:115:37: note: in expansion of macro ‘SINGLE_THREAD_P’
>   115 | # define NO_SYSCALL_CANCEL_CHECKING SINGLE_THREAD_P
>       |                                     ^~~~~~~~~~~~~~~
> ../sysdeps/unix/sysdep.h:121:9: note: in expansion of macro ‘NO_SYSCALL_CANCEL_CHECKING’
>   121 |     if (NO_SYSCALL_CANCEL_CHECKING)                                          \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> ../sysdeps/unix/sysv/linux/sigsuspend.c:26:10: note: in expansion of macro ‘SYSCALL_CANCEL’
>    26 |   return SYSCALL_CANCEL (rt_sigsuspend, set, __NSIG_BYTES);
>       |          ^~~~~~~~~~~~~~
> make[2]: *** [/opt/work/linux/glibc/build/sysd-rules:229: /opt/work/linux/glibc/build/signal/sigsuspend.os] Error 1
> make[2]: Leaving directory '/opt/work/linux/glibc/src/signal'
> make[1]: *** [Makefile:484: signal/subdir_lib] Error 2
> make[1]: Leaving directory '/opt/work/linux/glibc/src'
> make: *** [Makefile:9: all] Error 2
>
> Has anybody encountered this before ? Any pointers ?
>
> warm regards
> Saifi.

Do you mean by 'out-of-source-tree' that you are just trying to
compile the source without all
the internal files and definitions? If so you will need to copy and/or
add any required definition
(requires either by compiler or by the linker).

  reply	other threads:[~2022-11-20 17:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-20 13:55 Saifi Khan
2022-11-20 17:18 ` Adhemerval Zanella [this message]
2022-11-20 17:41   ` Saifi Khan
2022-11-20 18:15     ` Adhemerval Zanella
2022-11-20 18:27     ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMXh4bWuxN-Lo3sDdbC22TC_hvmfDWRcmBdEeT9J3VJt3pAw8Q@mail.gmail.com \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-help@sourceware.org \
    --cc=saifi.khan@nishan.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).