[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with building; fails because of "undefined reference to `__gmpz_ini
From: |
Kaushal Modi |
Subject: |
Help with building; fails because of "undefined reference to `__gmpz_inits'" |
Date: |
Thu, 31 Aug 2017 15:35:24 +0000 |
Hello,
I was trying to build coreutils using the latest version on master branch.
I followed README-hacking and everything went fine with the ./bootstrap
step. ./configure also worked fine. But make failed with these errors:
src/factor.o: In function `mp_prime_p':
/home/kmodi/downloads/git/coreutils/src/factor.c:1395: undefined
reference to `__gmpz_inits'
/home/kmodi/downloads/git/coreutils/src/factor.c:1459: undefined
reference to `__gmpz_clears'
src/factor.o: In function `mp_factor_using_pollard_rho':
/home/kmodi/downloads/git/coreutils/src/factor.c:1682: undefined
reference to `__gmpz_inits'
/home/kmodi/downloads/git/coreutils/src/factor.c:1762: undefined
reference to `__gmpz_clears'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:7944: src/factor] Error 1
make[2]: Leaving directory '/home/kmodi/downloads/git/coreutils'
make[1]: *** [Makefile:11705: all-recursive] Error 1
make[1]: Leaving directory '/home/kmodi/downloads/git/coreutils'
make: *** [Makefile:5966: all] Error 2
So I tried building from the tarball of the latest stable release v8.27.
That too failed with the same error.
CCLD src/factor
src/factor.o: In function `mp_prime_p':
/home/kmodi/downloads/coreutils-8.27/src/factor.c:1395: undefined
reference to `__gmpz_inits'
/home/kmodi/downloads/coreutils-8.27/src/factor.c:1459: undefined
reference to `__gmpz_clears'
src/factor.o: In function `mp_factor_using_pollard_rho':
/home/kmodi/downloads/coreutils-8.27/src/factor.c:1682: undefined
reference to `__gmpz_inits'
/home/kmodi/downloads/coreutils-8.27/src/factor.c:1762: undefined
reference to `__gmpz_clears'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:7880: src/factor] Error 1
make[2]: Leaving directory '/home/kmodi/downloads/coreutils-8.27'
make[1]: *** [Makefile:11631: all-recursive] Error 1
make[1]: Leaving directory '/home/kmodi/downloads/coreutils-8.27'
make: *** [Makefile:5922: all] Error 2
I have 0 knowledge with C programming. But I know how to build software
locally on my machine. Here is the full config.log:
https://gist.githubusercontent.com/kaushalmodi/fee42913c6e13010c3bd19f77da097f8/raw/0b5bece1f682c2cbfe26a4c15b28427cec44db61/config.txt
Any help will be appreciated.
Thanks.
--
Kaushal Modi
- Help with building; fails because of "undefined reference to `__gmpz_inits'",
Kaushal Modi <=