Skip to content

GMP Library was not found #189

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

Closed
algotron opened this issue Jan 13, 2025 · 2 comments
Closed

GMP Library was not found #189

algotron opened this issue Jan 13, 2025 · 2 comments

Comments

@algotron
Copy link

I am trying to install solve on OSX (M3 processor).
I ran
./configure --enable_static

I had an issue finding __gmpz_init. I have put all terminal output in quotes, as follows.
The error is in quotes below:
"
checking for library containing __gmpz_init... no
configure: error: "GMP library was not found."
"

GMP is installed on my system using home-brew. In the GMP lib directory, when I typed
"
nm libgmp.dylib
"

I got the listing showing gmpz_init has 3 underscores, not two underscores as in the error message. I copied a part of the nm output below - see the second line for ___gmpz_init
"
0000000000010834 T ___gmpz_import
0000000000010a90 T ___gmpz_init
000000000004bc20 s ___gmpz_init.dummy_limb
0000000000010aa0 T ___gmpz_init2
000000000001169c T ___gmpz_init_set
0000000000011704 T ___gmpz_init_set_d
000000000004bc30 s ___gmpz_init_set_d.dummy_limb
0000000000011714 T ___gmpz_init_set_si
0000000000011778 T ___gmpz_init_set_str
000000000004bc38 s ___gmpz_init_set_str.dummy_limb
0000000000011788 T ___gmpz_init_set_ui
0000000000010afc T ___gmpz_inits
000000000004bc28 s ___gmpz_inits.dummy_limb
"

I checked to ensure libtool was installed. It is. I also ran
"
aclocal
"

as advised when I tried to understand how to fix the libtool. However , the problem still persists.

Note in the output from ./configure below, there is the output:

"
./configure: line 4849: LT_INIT: command not found
"

and then the termination on not finding __gmpz_inits (2 underscores)

However, here are the first 17 lines from configure.ac showing LT_INIT present on line 14:

"

-- Autoconf --

Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([msolve], [0.7.3], [ederc@mathematik.uni-kl.de,mohab.safey@lip6.fr])
AC_SUBST([LT_VERSION],[1:3:1])
AM_INIT_AUTOMAKE([-Wall -Werror foreign silent-rules subdir-objects color-tests parallel-tests])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_MACRO_DIR([m4])

AM_MAINTAINER_MODE

AM_PROG_AR
LT_INIT

Checks for programs.

AC_PROG_CC
"

Do you have any advice? Here is the listing from terminal showing the errors I found:

"
PWM3-2024-04:msolve-master peterwalker$ which libtool
/usr/bin/libtool
PWM3-2024-04:msolve-master peterwalker$ aclocal
PWM3-2024-04:msolve-master peterwalker$ ./configure --enable-static
configure: WARNING: unrecognized options: --enable-static
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... mkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
./configure: line 4849: LT_INIT: command not found
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for library containing atan2... none required
checking for library containing __gmpz_init... no
configure: error: "GMP library was not found."
"

@ederc
Copy link
Contributor

ederc commented Jan 13, 2025

If you installed GMP via homebrew you either have to set your PATH to track your homebrew folder or you have to call configure and make with corresponding flags like LDFLAGS="-L/opt/homebrew/lib/".

@algotron
Copy link
Author

algotron commented Jan 14, 2025 via email

@ederc ederc closed this as completed Jan 27, 2025
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

2 participants