-
Notifications
You must be signed in to change notification settings - Fork 124
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
recompile with -fPIC in debian #52
Comments
Sorry to hear you got bit by this. The |
Yeah I don't know the best solution. I can setup a PR from https://github.com/dougnd/lilliput/tree/feature/no-pie if you like. It does work:
Notice that you'd need to set I'd still be interested in how Discord builds this -- what OS, what version of GCC, etc. Clearly you guys don't run into this problem, so if there are preferred platforms, it might be nice to know. Thanks! |
I appreciate the offer to help with the branch. I think in the short term, we're going to set up a branch that works in newer versions of Ubuntu so that you can fetch that sha instead. That will generally work cleaner, and in the long term, the repo will stop working on old versions of Ubuntu. |
@dougnd Thank you for supplying a fork. I wasn't originally hit by this bug as I was running Centos. But now due to some issues I'm now running the latest debian. So I'm another one affected by this issue. |
In case this is helpful for others, I was able to work around this without branching, by calling |
This is finally done. Please note that building with some flags can cause large performance impacts. Instead we now provide the binaries that will work on modern distributions. |
Using a golang docker image (which I believe is based on Debian), I get the errors described in #6. Presumably they are appearing again because of #45.
Here's my thoughts:
Things work fine in the latest centos docker image. After some research, it looks like recent versions of gcc (6+) provide a "-pie" option by default that requires shared libraries be compiled with "fPIC". I found that if I added
-no-pie
to all the#cgo linux LDFLAGS:
lines (and added-no-pie
toCGO_LDFLAGS_ALLOW
) it would build just fine in the golang:1.11 image.I suppose we could also downgrade the version of gcc too.
My question: What do you guys do? Do you have build recommendations? It would be nice to put some stuff in the README so that future users don't stumble like I did. Or am I missing something obvious?
The text was updated successfully, but these errors were encountered: