-
Notifications
You must be signed in to change notification settings - Fork 192
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
How do you statically link libraries? #51
Comments
My current work around for this is to build an image with dynamic links. I'm lead to believe that there are no repo'd versions of the static links and I'd have to compile them by hand. It would still be good to know where one can learn a bit more about this process, how to find static libraries, how to build them when they don't exist, if anyone has some thoughts on it to share. |
Please see my response at #52, which links to the section of the README explaining how to do this. Getting C libraries to link statically almost always requires a bit of experimentation. I already supply several major C libraries in the existing image, and every one of them required a fair bit of work. :-/ I wish I had a better answer. |
I think the main problem (unless I'm missing something) is that Oracle don't seem to provide the mysql-connector-c static libraries. I've found C++ source and can build it but that doesn't seem to want to link. They also provide a blob of everything but I don't know how to build it 🙄. I'm going to give up for now, if I ever work it out, I'll come back and let you know. |
I'm using a multi build docker file to try to create a docker image with nothing but the binary in it. Unfortunately I'm left with a large number of dynamic links.
Dockerfile:
However, if I test the binary after building:
I feel like others must have gone through this but I can't find any sort of guide written down anywhere (my google foo is bad though so 🤷🏻♂️).
I feel esspecially silly as I think I was able to do this about nine months ago (with very basic apps at least). 😊
Is there a process I can go through to manage static linking? Perhaps a step by step guide?
The text was updated successfully, but these errors were encountered: