* GCC build errors
@ 2021-12-13 1:15 Jamie Lee
2021-12-13 7:24 ` Jonathan Wakely
0 siblings, 1 reply; 2+ messages in thread
From: Jamie Lee @ 2021-12-13 1:15 UTC (permalink / raw)
To: gcc
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: GCC build errors
2021-12-13 1:15 GCC build errors Jamie Lee
@ 2021-12-13 7:24 ` Jonathan Wakely
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2021-12-13 7:24 UTC (permalink / raw)
To: Jamie Lee; +Cc: gcc
On Mon, 13 Dec 2021, 01:16 Jamie Lee via Gcc, <gcc@gcc.gnu.org> wrote:
> 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.
>
This is the wrong list, your other post to the gcc-help list was right.
> Thank you very much.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-13 7:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 1:15 GCC build errors Jamie Lee
2021-12-13 7:24 ` Jonathan Wakely
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).