You're using Ubuntu to build a library for Alpine? Try using Alpine to build a library for Alpine. From your Ubuntu machine, you can create an Alpine container to build from using Docker, a VM, or LXC