From: Jamie Lee <hello@jamiethalacker.dev>
To: gcc@gcc.gnu.org
Subject: GCC build errors
Date: Mon, 13 Dec 2021 02:15:29 +0100 (CET) [thread overview]
Message-ID: <MqlLxvP--3-2@jamiethalacker.dev> (raw)
Hello,
I am attempting to build GCC 11.2.0 in a chroot environment, for use in some projects.
Unfortunately, I am running into errors in the chroot environment, and I'm not sure what's going on.
When building GCC, I am getting these errors:
/usr/bin/ld: .libs/gets-chk.o: in function `__gets_chk':
/src/libssp/gets-chk.c:74: warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: .libs/ssp.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: .libs/gets-chk.o: warning: relocation against `stdin@@GLIBC_2.2.5' in read-only section `.text'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:533: libssp.la] Error 1
make[3]: Leaving directory '/build/x86_64-pc-linux-gnu/libssp'
make[2]: *** [Makefile:441: all] Error 2
make[2]: Leaving directory '/build/x86_64-pc-linux-gnu/libssp'
make[1]: *** [Makefile:13700: all-target-libssp] Error 2
I am using
/src/configure --prefix=/usr \
LD=ld \
--enable-languages=c,c++ \
--disable-multilib \
--disable-bootstrap \
--enable-host-shared \
--enable-shared \
--with-system-zlib
and
make -j$(nproc)
to build GCC. From what I understand, --enable-host-shared and --enable-shared should fix the relocation R_X86_64_32 error, but it isn't.
Sorry if this is the wrong mailing list, but I'm not really sure where to go for assistance.
Thank you very much.
next reply other threads:[~2021-12-13 1:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 1:15 Jamie Lee [this message]
2021-12-13 7:24 ` Jonathan Wakely
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=MqlLxvP--3-2@jamiethalacker.dev \
--to=hello@jamiethalacker.dev \
--cc=gcc@gcc.gnu.org \
/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).