[go: nahoru, domu]

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

Building on AArch64 Linux with Clang complaining about not having fPIC #1443

Closed
SchrodingerZhu opened this issue Dec 24, 2021 · 5 comments
Closed

Comments

@SchrodingerZhu
Copy link

Basically, I got a same error as monero-project/monero#1304.
Maybe -fPIC flag is needed

ring/build.rs

Line 518 in 08fcf4a

let _ = c.flag("-fPIC");

@SchrodingerZhu
Copy link
Author
SchrodingerZhu commented Dec 24, 2021

readelf -r ring-c322d96f1cad079c/out/*.o | grep GFp_armcap_P

000000000004  000f00000114 R_AARCH64_ADR_PRE 0000000000000000 GFp_armcap_P + 0
000000000010  000f0000011d R_AARCH64_LDST32_ 0000000000000000 GFp_armcap_P + 0
000000000000  000e00000113 R_AARCH64_ADR_PRE 0000000000000000 GFp_armcap_P + 0
000000000004  000e0000011d R_AARCH64_LDST32_ 0000000000000000 GFp_armcap_P + 0

@SchrodingerZhu
Copy link
Author

readelf -r ring-e283409aa5b73913.ring.1h5en42m-cgu.1.rcgu.o | grep GFp_armcap_P

T 0000000000000000 GFp_armcap_P + 0
000000000020  05bd00000138 R_AARCH64_LD64_GO 0000000000000000 GFp_armcap_P + 0
0000000000c8  05bd00000137 R_AARCH64_ADR_GOT 0000000000000000 GFp_armcap_P + 0
0000000000cc  05bd00000138 R_AARCH64_LD64_GO 0000000000000000 GFp_armcap_P + 0

@SchrodingerZhu
Copy link
Author

not sure what happened but this fix works for me:

https://chromium.googlesource.com/chromium/src.git/+/1ff8654cb2647b511cb32dae4ffea9f7929b1ed9

This flag is not clearly documented.

@briansmith
Copy link
Owner

Could somebody please test this with ring 0.17.3 and report whether it is still an issue?

@briansmith
Copy link
Owner

Closing due to inactivity, because in ring 0.17.x we've delegated the handle PIC-related compiler flag handling to cc-rs, and due to inactivity.

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