Statically compile "cephcsi" binary? #2946
-
I know Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
I would suggest: probably not. There's the first issue of how to force go to build statically with cgo enabled, but beyond that the libs that we're linking to would need to be capable of static linking: so all of the lib{rados,rbd,cephfs} etc... but even their dependencies too, right? Even down to the level of glibc? I think it would be very tough to manage. Just for my own curiosity: what issue(s) are you running into with cephcsi being dynamically linked? |
Beta Was this translation helpful? Give feedback.
-
As @phlogistonjohn stated, static linking of the executable will be very difficult. This is not something that projects normally recommend, as it includes a whole tree of dependencies that need to provide static linkable versions of their libraries. In the case of Ceph-CSI, it already becomes problematic with the Ceph libraries. Furthermore, the executable is not completely self-contained for everything. For certain operations other executables need to be called (mostly for things like I do not think any problem is worth creating and maintaining a statically linked |
Beta Was this translation helpful? Give feedback.
I would suggest: probably not.
There's the first issue of how to force go to build statically with cgo enabled, but beyond that the libs that we're linking to would need to be capable of static linking: so all of the lib{rados,rbd,cephfs} etc... but even their dependencies too, right? Even down to the level of glibc? I think it would be very tough to manage.
Just for my own curiosity: what issue(s) are you running into with cephcsi being dynamically linked?