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

[meson] ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC #3747

Open
leleliu008 opened this issue Apr 25, 2024 · 0 comments

Comments

@leleliu008
Copy link

leleliu008 commented Apr 25, 2024

I got ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC when I built this library for Android/x86, I guess you guys forgot to pass -DX86_32_PICASM option to nasm, I resolved it by:

NASM="$(command -v nasm)"

cat > nasm <<EOF
#!/bin/sh
exec "$NASM" -DX86_32_PICASM "\$@"
EOF

chmod +x nasm

export PATH="$PWD:$PATH"
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

1 participant