-
Notifications
You must be signed in to change notification settings - Fork 667
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
v3.4.3 causes relocation linker error on Android x86 #731
Comments
Thanks Frederik. I'll look into this.
On a related note, I would love to add android builds to our CI testing,
but don't know anything about the android tooling. Would it be possible
for you to look at the scripts in .github/workflow/build.yml and suggest
how we can add android builds (and possibly tests?) to github actions
testing?
…On Fri, Sep 23, 2022 at 8:55 AM Frederik Seiffert ***@***.***> wrote:
System Details
Cross-compiling to Android using clang from NDK 22.1.7171670
- build system type... i386-apple-darwin21.6.0
- host system type... i686-pc-linux-android
- target system type... i686-pc-linux-android
Problems Description
After updating libffi from v3.4.2 to v3.4.3 we get the following linker
error when linking another library against libffi on x86. The issue does
not occur on armeabi-v7a, arm64-v8a, or x86_64.
Linking library libgnustep-base ...
ld.lld: error: relocation R_386_PC32 cannot be used against symbol open_temp_exec_file; recompile with -fPIC
>>> defined in /build/x86/lib/libffi.a(closures.o)
>>> referenced by closures.c
>>> closures.o:(dlmmap_locked) in archive /build/x86/lib/libffi.a
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Looking at the changes in v3.4.3 I saw that open_temp_exec_file() was
made non-static in fc6b939
<fc6b939>
.
There’s also the following warning in the build output, which wasn’t there
with v3.4.2, but might be unrelated:
../src/tramp.c:262:22: warning: implicit declaration of function 'open_temp_exec_file' is invalid in C99 [-Wimplicit-function-declaration]
tramp_globals.fd = open_temp_exec_file ();
^
—
Reply to this email directly, view it on GitHub
<#731>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAV7CIUSQCPNZ3BRCDH2K3V7WSDZANCNFSM6AAAAAAQT6V6EQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks Anthony, I appreciate it. Adding Android to your CI would be great, I'll try to take a look. At least builds should be straightforward, but I haven't run tests this way yet. |
Just building during CI testing would be an improvement, as evidenced by this issue. Thanks! |
I added Android builds to CI in #732. However note that it doesn’t surface this issue as the library is only built, but not linked against. |
Yea, I don't see this being reproduced: https://rl.gl/doc-text?id=RLGL-MM78U3DJ |
Not sure why this isn’t surfacing on CI, but I fixed it by passing Text relocations are generally not supported on Android, so maybe this is something that could be done in configure. |
System Details
Cross-compiling to Android using clang from NDK 22.1.7171670
Problems Description
After updating libffi from v3.4.2 to v3.4.3 we get the following linker error when linking another library against libffi on x86. The issue does not occur on armeabi-v7a, arm64-v8a, or x86_64.
Looking at the changes in v3.4.3 I saw that
open_temp_exec_file()
was made non-static in fc6b939.There’s also the following warning in the build output, which wasn’t there with v3.4.2, but might be unrelated:
The text was updated successfully, but these errors were encountered: