Pros:
+ control version of all dependencies (It won't happen that updating some dependency will break build, we can use latest version of all dependency)
+ we can stop thinking about supporting old versions of dependencies
+++ user-friendly (anyone can download our single .deb and immediately write a microservice without worrying about missing any dependencies)
+ we will be able to get the same stacktraces absolutely everywhere
+ we can compile with any с++ standard
Cons:
- if CVE is found in any dependency, we must manually update version with fixes this dependency, recompile and re-upload .deb- the first time it will take time
->
-depends on
glibc++
->glibc
->kervel version
glibc2.39
: minimumkernel version 3.2
Upgrade gcc:
https://github.com/docker-library/gcc/blob/master/14/Dockerfile
Before: OS:
Ubuntu14.04
Kernel version:4.4
Compiler:gcc4.8.2
glibc:2.23
(libc.so) glibc++:2.23 +-
(libc++.so) c++ standard:< 11
After manual upgrade: OS:
Ubuntu14.04
Kernel version:4.4
Compiler:gcc14.0.0
glibc:2.39
(libc.so) glibc++:2.39 +-
(libc++.so) c++ standard:< 29 +-
(accept c++23)We must remove all
find_package
and add dependencies assubmodule
orCPM
and compilecurl
protobuf
grpc
...
We can compile all with
c++23 standard
Link all static (includeglibc
)Profit!
We can ship userver work with minimum
kernel version 4.4
userver-all-linux-amd64.deb
userver-all-linux-arm64.deb
~userver-all-macos-amd64.deb
~ ~userver-all-macos-arm64.deb
~Pros:
+
control version of all dependencies (It won't happen that updating some dependency will break build, we can use latest version of all dependency)+
we can stop thinking about supporting old versions of dependencies+++
user-friendly (anyone can download our single.deb
and immediately write amicroservice
without worrying about missing any dependencies)+
we will be able to get the samestacktraces
absolutely everywhere+
we can compile with anyс++ standard
Cons:
-
ifCVE
is found in any dependency, we must manually update version with fixes this dependency, recompile and re-upload.deb
-
the first time it will take time