1 year ago

#297264

test-img

Jim

MySQL Client library and static stdc++

We are creating an app which can works on multiple Linux distributions. To achieve it, we are trying to use static libraries instead of shared libraries.

Two major dependencies for our apps that are different across distributions are libgcc and stdc++. Another is MySQL.

We could get rid of those dependencies by using static libgcc and stdc++ options and also static mysql client libraries. We tried app on Ubuntu and RHEL and it works on both.

Although app works, we fear that there could be an issue due to mismatch MySQL client and server versions. As I learned, MySQL server expects same client library version (correct me here). Hence we are not sure if the app will work with all MySQL versions.

So we reverted and used mysql client shared library. However, it is dependent of libstdc++ shared library. So now app is again dependent on it too (even with static gcc and stdc++ options and reordering dependencies in various ways). And if we use static mysql library, app may not work with all mysql versions.

Anyone tried this before? Any recommendation.

Thanks a ton for helping!

mysql

gcc

libstdc++

0 Answers

Your Answer

Accepted video resources