Resolving GLIBCXX symbols in Alpine build

Viewed 39

I'm working on porting the C++ build pipeline from Ubuntu image to Alpine.

Currently, my application is compiled in the following ENV:

  • Ubuntu AMD64 container with installed cross-compiler
  • 3rd-party dynamic library (I cannot modify it)

Target platform is an Alpine ARM container.


Notice: the application is running in Alpine ARM container WITHOUT GCOMPAT PACKAGE.

So, I can state, that the 3rd-party library does not require original glibc and can live with musl.


I've carefully re-created the original ENV in Alpine image. But looks like something is missing because during application linkage, I see symbols mismatch:

/usr/lib/gcc/aarch64-alpine-linux-musl/10.3.1/../../../../aarch64-alpine-linux-musl/bin/ld: lib3rd-party.so: undefined reference to 'std::exception::what() const@GLIBCXX_3.4'


My question is:

Since the 3rd-party library does not require any compatibility layer with glibc (e.g. gcompat), it looks like it only needs a specific version of glibc++. How can I solve this properly on Alpine?

(Maybe I can somehow ignore version symbols or mock them, or at least put required libstdc++ library manually)

P.S.: Please correct me if I'm wrong with my assumptions!

0 Answers
Related