uwplse / herbgrind

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

configure: error: libmpfr not found or uses a different ABI (including static vs shared). #65

Open zuoyanzhang opened 1 year ago

zuoyanzhang commented 1 year ago

when I run make, something was wrong, the error message is configure: error: libmpfr not found or uses a different ABI (including static vs shared). So do you konw the reason, and what I need to do to solve it. thanks.

zuoyanzhang commented 1 year ago

This problem I have solved it. The error message is that the libmpfr library could not be found, so I checked the Makefile and find that miss build command for mpfr library. Then I manually installed the MPFR library in the mpfr-64/herbgrind-install directory. The problem is solved. But now I have another problem, when I run make I get the error shown below. image The error occurs in the mpfr-valgrind-glue.c file under the valgrind/herbgrind/helper path, the error message is as shown above, do you know why? Thanks

HazardousPeach commented 1 year ago

It looks like you didn't set up mpfr properly, since this is trying to compile against mpfr headers but not finding any of the functions defined in them. It's possible that you just installed the wrong version of MPFR or something. You mentioned that you installed mpfr manually, but there were probably steps in the Makefile that were necessary for properly setting it up; I recommend you remove MPFR and install it using the makefile.

zuoyanzhang commented 1 year ago

ok, but what should I do to solve configure: error: libmpfr not found or uses a different ABI (including static vs shared). make: *** [Makefile:173: deps/mpc-64/herbgrind-install/lib/libmpc.a] Error 1 when I run make.

zuoyanzhang commented 1 year ago

This problem occurs on Ubuntu 22.04, when I run make on Ubuntu20.04 successfully. It could be for some magical reason, can you fix that?

epilys commented 9 months ago

Same problem on debian 12.

HazardousPeach commented 6 months ago

To follow up, this isn't an MPFR build error, it's an MPC build error. MPC is failing when it tries to link to MPFR, because it doesn't find it. In the Makefile, MPC is configured with

    cd deps/mpc-$*/ && \
        CFLAGS="-fno-stack-protector -DNDEBUG" \
        OBJECT_MODE=64 \
        ./configure \
        --prefix=$(shell pwd)/deps/mpc-64/$(HG_LOCAL_INSTALL_NAME) \
        --with-gmp=$(shell pwd)/deps/gmp-64/$(HG_LOCAL_INSTALL_NAME) \
        --with-mpfr=$(shell pwd)/deps/mpfr-64/$(HG_LOCAL_INSTALL_NAME)

so it's being passed an explicit path to MPFR. So maybe the MPFR build failed silently, causing this error?

So, the question is, does the file deps/mpfr-64/herbgrind-install/lib/libmpfr.a exist in your build? That should be what MPC tries to link against I think