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

PIE-related GCC compile errors when using more recent compilers #95

Open
mrayva opened this issue Jul 16, 2018 · 3 comments
Open

PIE-related GCC compile errors when using more recent compilers #95

mrayva opened this issue Jul 16, 2018 · 3 comments

Comments

@mrayva
Copy link

mrayva commented Jul 16, 2018

gcc 5.4 on Ubuntu 16.04 was compiling ok a couple of month back, but gcc 7.3 on Ubuntu 18.04 gives me problems. I feel that it is "position-independent executables"-related but can't pinpoint exact place in your scripts.

[error] /usr/local/opt/dbtoaster-a5//bin/dbtoaster_release: Symbol acos' causes overflow in R_X86_64_PC32 relocation [error] /usr/local/opt/dbtoaster-a5//bin/dbtoaster_release: Symbol atan2' causes overflow in R_X86_64_PC32 relocation
[error] /usr/local/opt/dbtoaster-a5//bin/dbtoaster_release: Symbol cos' causes overflow in R_X86_64_PC32 relocation [error] /usr/local/opt/dbtoaster-a5//bin/dbtoaster_release: Symbol cos' causes overflow in R_X86_64_PC32 relocation
[error] /usr/local/opt/dbtoaster-a5//bin/dbtoaster_release: Symbol pow' causes overflow in R_X86_64_PC32 relocation [error] /usr/local/opt/dbtoaster-a5//bin/dbtoaster_release: Symbol pow' causes overflow in R_X86_64_PC32 relocation
[error] /usr/local/opt/dbtoaster-a5//bin/dbtoaster_release: Symbol pow' causes overflow in R_X86_64_PC32 relocation [error] /usr/local/opt/dbtoaster-a5//bin/dbtoaster_release: Symbol pow' causes overflow in R_X86_64_PC32 relocation
[error] /usr/local/opt/dbtoaster-a5//bin/dbtoaster_release: Symbol `atan' causes overflow in R_X86_64_PC32 relocation

@sachinbjohn
Copy link
Collaborator

I encountered the issue a few days ago. This can be fixed by adding "-ccopt -no-pie" to OPT_FLAGS in makefile.inc in the dbtoaster-a5 repo

@mrayva
Copy link
Author

mrayva commented Jul 18, 2018

OPT_FLAGS in makefile.inc is for OCAML compiler use, not gcc...?

@sachinbjohn
Copy link
Collaborator

You are right. But technically, ocamlopt uses gcc to link the object files and -ccopt forwards the arguments to gcc. I just happened to have the same error, and adding this fixed it. If that didn't work for you, I don't have any more suggestions. Do you @losmi83 ?

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