Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relocation R_X86_64_32 against `GNU_PROPERTY_AARCH64_BTI' #831

Open
Tuiivli opened this issue May 6, 2024 · 1 comment
Open

relocation R_X86_64_32 against `GNU_PROPERTY_AARCH64_BTI' #831

Tuiivli opened this issue May 6, 2024 · 1 comment

Comments

@Tuiivli
Copy link

Tuiivli commented May 6, 2024

System Details

aarch64-linux-android
libffi version : libffi-3.4.6

Problems Description

Actions:

  1. ./configure --host=aarch64-linux-android --prefix=/tmp
  2. make

Error information:
libtool: link: gcc -shared -fPIC -DPIC src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/.libs/tramp.o src/aarch64/.libs/ffi.o src/aarch64/.libs/sysv.o -O3 -Wl,--version-script -Wl,libffi.map -Wl,-soname -Wl,libffi.so -o .libs/libffi.so
/usr/bin/ld: src/aarch64/.libs/sysv.o: relocation R_X86_64_32 against `GNU_PROPERTY_AARCH64_BTI' can not be used when making a shared object; recompile with -fPIC
src/aarch64/.libs/sysv.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:1114: recipe for target 'libffi.la' failed
make[3]: *** [libffi.la] Error 1

@billatarm
Copy link
Contributor

My guess is that it's using the wrong host tools to build with considering that their is an "R_X86_64_32" relocation in the output, which I would imagine is x86_64 ELF format. Perhaps also a bug in the toolchain as well. I just built on aarch64 host following your steps and it worked correctly. Could you provide details of your build machine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants