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 15:15:45 -0300 [thread overview]
Message-ID: <CAMXh4bWTUvOxu1urBAAv2QRFp1cdC-at15KRXDnc3CP8fmwAcw@mail.gmail.com> (raw)
In-Reply-To: <20221120174104.11107.qmail@s411.sureserver.com>
On Sun, Nov 20, 2022 at 2:41 PM Saifi Khan <saifi.khan@nishan.io> wrote:
>
> > -------Original Message-------
> > From: Adhemerval Zanella
> >
> > Do you mean by 'out-of-source-tree' that you are just trying to
> > compile the source without all the internal files and definitions?
> >
>
> Adhemerval, thanks for your kind reply.
>
> The directory tree structure looks like this
>
> /opt/work/linux/glibc/
> ├── build
> └── src
>
> In the build directory, i first execute a configure script (b02.sh)
>
> DIR_ONE=/opt/work/linux/glibc
>
> DIR_SRC=${DIR_ONE}/src
> DIR_DST=${DIR_ONE}/root
>
> CC="gcc-12"
> CXX="g++-12"
> CFLAGS="-O2 -pipe"
> CXXFLAGS="${CFLAGS}"
>
> CC="gcc-12" CXX="g++-12" CFLAGS="-O2 -pipe" CXXFLAGS="${CFLAGS}" ${DIR_SRC}/configure \
> --prefix=${DIR_DST} \
> --exec-prefix=${DIR_DST} \
> --datarootdir=${DIR_DST}/doc/share \
> --datadir=${DIR_DST}/doc \
> --docdir=${DIR_DST}/doc \
> --htmldir=${DIR_DST}/doc \
> --mandir=${DIR_DST}/doc/man \
> --infodir=${DIR_DST}/doc/info \
> --enable-add-ons \
> --disable-hidden-plt \
> --disable-profile \
> --enable-stack-protector=no \
> --enable-shared \
> --enable-ld=yes \
> --with-gnu-ld \
> --without-selinux
> exit 0;
>
> next i execute the build script (b04.sh)
>
> make -j1
>
> that's when the above mentioned error was seen.
>
> Do you think anything needs to be changed in the options that are being passed to the configure script ?
>
> warm regards
> Saifi.
This is due --disable-hidden-plt option, which is a bit rotten option
that I think we should remove
it (it is required for Hurd, but it can handle on its internal
definition). Even the following fix:
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index f4437ff6ad..221fa18294 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -599,7 +599,12 @@ for linking")
extern thread __typeof (name) internal __hidden_proto_hiddenattr (attrs);
# else
# define hidden_proto(name, attrs...)
-# define hidden_proto_alias(name, alias, attrs...)
+# define __hidden_proto_hiddenattr(attrs...) \
+ __attribute__ ((visibility ("hidden"), ##attrs))
+# define __hidden_proto_alias(name, thread, internal, attrs...) \
+ extern thread __typeof (name) internal __hidden_proto_hiddenattr (attrs);
+# define hidden_proto_alias(name, alias, attrs...) \
+ __hidden_proto_alias (name, , alias, ##attrs)
# define hidden_tls_proto(name, attrs...)
# endif
# else
It fails later for setrlimit64.c build (at least for aarch64). I
advise just removing it, it is not actively tested.
Also, --enable-add-ons is not required anymore, --enable-shared is the
default, --enable-ld=yes and --with-gnu-ld
is also not required.
next prev parent reply other threads:[~2022-11-20 18:15 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
2022-11-20 17:41 ` Saifi Khan
2022-11-20 18:15 ` Adhemerval Zanella [this message]
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=CAMXh4bWTUvOxu1urBAAv2QRFp1cdC-at15KRXDnc3CP8fmwAcw@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).