Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zuoyanzhang opened this issue Jun 29, 2023 · 6 comments

Comments

@zuoyanzhang
Copy link

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Author

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
Copy link

epilys commented Nov 23, 2023

Same problem on debian 12.

@HazardousPeach
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants