Ayush Yadav created an issue:
https://gitlab.rtems.org/rtems/tools/rtems-source-builder/-/issues/192
## Summary
I have been trying to build the `amd/amd-kria-k26` target on freeBSD VM.
I have been running into this error since:
```
ld: error: relocation R_X86_64_32S cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_check.o
>>> referenced by fdt_check.c:49 (libfdt/fdt_check.c:49)
>>> libfdt/fdt_check.o:(fdt_check_full)
ld: error: relocation R_X86_64_64 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_check.o
>>> referenced by fdt_check.c
>>> libfdt/fdt_check.o:(.rodata+0x0)
ld: error: relocation R_X86_64_64 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_check.o
>>> referenced by fdt_check.c
>>> libfdt/fdt_check.o:(.rodata+0x8)
ld: error: relocation R_X86_64_64 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_check.o
>>> referenced by fdt_check.c
>>> libfdt/fdt_check.o:(.rodata+0x10)
ld: error: relocation R_X86_64_64 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_check.o
>>> referenced by fdt_check.c
>>> libfdt/fdt_check.o:(.rodata+0x18)
ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_addresses.o
>>> referenced by fdt_addresses.c:38 (libfdt/fdt_addresses.c:38)
>>> libfdt/fdt_addresses.o:(fdt_address_cells)
ld: error: relocation R_X86_64_64 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_check.o
>>> referenced by fdt_check.c
>>> libfdt/fdt_check.o:(.rodata+0x20)
ld: error: relocation R_X86_64_64 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_check.o
>>> referenced by fdt_check.c
>>> libfdt/fdt_check.o:(.rodata+0x28)
ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_addresses.o
>>> referenced by fdt_addresses.c:50 (libfdt/fdt_addresses.c:50)
>>> libfdt/fdt_addresses.o:(fdt_size_cells)
ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_addresses.o
>>> referenced by fdt_addresses.c:38 (libfdt/fdt_addresses.c:38)
>>> libfdt/fdt_addresses.o:(fdt_appendprop_addrrange)
ld: error: relocation R_X86_64_64 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_check.o
>>> referenced by fdt_check.c
>>> libfdt/fdt_check.o:(.rodata+0x30)
ld: error: relocation R_X86_64_64 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_check.o
>>> referenced by fdt_check.c
>>> libfdt/fdt_check.o:(.rodata+0x38)
ld: error: relocation R_X86_64_64 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_check.o
>>> referenced by fdt_check.c
>>> libfdt/fdt_check.o:(.rodata+0x40)
ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_addresses.o
>>> referenced by fdt_addresses.c:50 (libfdt/fdt_addresses.c:50)
>>> libfdt/fdt_addresses.o:(fdt_appendprop_addrrange)
ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_empty_tree.o
>>> referenced by fdt_empty_tree.c:25 (libfdt/fdt_empty_tree.c:25)
>>> libfdt/fdt_empty_tree.o:(fdt_create_empty_tree)
ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_strerror.o
>>> referenced by fdt_strerror.c:47 (libfdt/fdt_strerror.c:47)
>>> libfdt/fdt_strerror.o:(fdt_strerror)
ld: error: relocation R_X86_64_32S cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_strerror.o
>>> referenced by fdt_strerror.c:53 (libfdt/fdt_strerror.c:53)
>>> libfdt/fdt_strerror.o:(fdt_strerror)
ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_strerror.o
>>> referenced by fdt_strerror.c:0 (libfdt/fdt_strerror.c:0)
>>> libfdt/fdt_strerror.o:(fdt_strerror)
ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_strerror.o
>>> referenced by fdt_strerror.c:0 (libfdt/fdt_strerror.c:0)
>>> libfdt/fdt_strerror.o:(fdt_strerror)
ld: error: relocation R_X86_64_64 cannot be used against local symbol;
recompile with -fPIC
>>> defined in libfdt/fdt_strerror.o
>>> referenced by fdt_strerror.c
>>> libfdt/fdt_strerror.o:(fdt_errtable)
ld: error: too many errors emitted, stopping now (use --error-limit=0 to see
all errors)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:218: libfdt/libfdt.so.1.7.2] Error 1
shell cmd failed: /bin/sh -ex
/home/me/GSOC_Work/rtems-deployment/build/dtc-1.7.2-x86_64-freebsd15.0-1/do-build
error: building dtc-1.7.2-x86_64-freebsd15.0-1
```
I have tried doing some basic troubleshooting.
```
%build
...
CFLAGS="-fPIC -O2" %{__make} PREFIX=%{_prefix} WARNINGS=
...
```
and these as well.
```
%{__make} PREFIX=%{_prefix} WARNINGS= EXTRA_CFLAGS="-fPIC"
%define host_cflags %{host_cflags} -fPIC
%define host_cxxflags %{host_cxxflags} -fPIC
```
None of these worked and resulted into the same error again.
## Steps to reproduce
```
sb-set-builder --prefix=/opt/rtems/7 --bset-tar-file --trace
--log=out/amd/amd-kria-k26.txt --no-install amd/amd-kria-k26
```
--
View it on GitLab:
https://gitlab.rtems.org/rtems/tools/rtems-source-builder/-/issues/192
You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs