uwplse / herbgrind

A Valgrind tool for Herbie
GNU General Public License v3.0
90 stars 7 forks source link

Herbgrind won't build because automake-1.15 is missing on your system #67

Open johnblommers opened 6 months ago

johnblommers commented 6 months ago

It's true my system's version of automake is not 1.15

My system's version of automake is 1.16.5 so more recent.

The error happens in directory deps/mpfr-64

I tried making a symbolic link called automake-1.15 which worked around the error but that led to more error messages.

Perhaps the Makefiles could be changed to not check the version of automake?

HazardousPeach commented 6 months ago

So, that makefile isn't written for this project, it's for a dependency, GNU MPFR, which we vendor in this project. Unfortunately since this project is 6 years old, so is the MPFR version we had vendored, leading to a makefile which expects an older version of automake. If using a symlink resulted in new errors due to automake, then just not checking the version of automake won't help; it seems like newer versions of automake are just not compatible. However, what has been updated for the last 6 years is the upstream MPFR project. So, with a bit of modification, you can probably get this working on your setup.

Here's what you'll need to do:

  1. Add a newer MPFR release tarball to the setup/ directory: the mpfr website has a page where you can download the newest version https://www.mpfr.org/mpfr-current/#download
  2. Modify the makefile to expect this new MPFR: Change the line here: https://github.com/uwplse/herbgrind/blob/feeb826c9fdb18c5d4930d44a90d2919a7b02cbe/Makefile#L7C1-L7C19 to MPFR_VERSION=. At time of writing, would be 4.2.1 (ah, just missed it).
  3. Run the setup again. If all goes well, it should just work. The MPFR website says it should be compatible with the older GMP, but the MPC library also depends on MPFR, so there's a possibility now that one will fail to build. In that case, repeat the above steps with MPC instead of MPFR to update the version of MPC.

It's also possible the MPFR interface has changed sufficiently that the Herbgrind code is no longer compatible with it. Hopefully not, but if you get everything up to date and it still fails, then you've got a journey ahead of you :).