GCC build errors
Jonathan Wakely
jwakely.gcc@gmail.com
Mon Dec 13 07:24:43 GMT 2021
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.
>
More information about the Gcc
mailing list