Undefined symbol error when compiling in Travis CI only

Currently working on a new features for a gem (etscrivner/rbsecp256k1). The pull request is here.

I’ve compiled this gem personally on Linux (Ubuntu 18.10), macOS (10.14), and also compiled it under a Docker image with Ubuntu with no problems.

However, every time I attempt to compile and run it on Travis CI instances it fails with the following error:

undefined symbol: __gmpn_set_str

This seems to be related to libgmp, however libgmp10 is absolutely installed as are its development dependencies (libgmp-dev). This seems to break in this way nowhere else but on Travis CI. Any ideas what’s happening here? Seems to fail across the board in this fashion and I cannot seem to reproduce.

Alright, so at least part of the problem seems to be that Travis CI is (by default) installing a 6 year old version of libgmp rather than a more recent version. I assume this is required by some other pre-installed dependency. Any way to force an update here?

Use Xenial. https://docs.travis-ci.com/user/reference/xenial

Thanks! Testing this now :smiley:

Alright, that fixed for Linux. But now I’m seeing the same issue on macOS.

That’s an issue with whatever package manager (Homebrew is our default on the Mac) you are using.

Indeed, I think your first response provided most of the answer. I’ve since been able to fix this for macOS as well. Thank you again!