Nate Parsons
Nate Parsons

Reputation: 14901

Problems building GMP 4.3

I'm trying to build GMP 4.3* (for compatibility with the project I'm using), but it's not cooperating. The INSTALL file says to just run './configure' but that file doesn't exist. So when I try building it with autoconf, I get pages of errors for things that are possibly defined (but they're right there in acinclude.m4). It does produce a configure file, but that doesn't work.

So, how to proceed?

~/prj/gmp-4.3$ CC=gcc-4.2 CXX=g++-4.2 CPPFLAGS=-fexceptions ./configure 
--enable-cxx --prefix=/path/to/prefix
zsh: no such file or directory: ./configure
~/prj/gmp-4.3$ autoconf
configure.in:30: error: possibly undefined macro: GMP_VERSION
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:51: error: possibly undefined macro: GMP_INIT
configure.in:62: error: possibly undefined macro: AM_CONDITIONAL
configure.in:68: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.in:69: error: possibly undefined macro: AM_CONFIG_HEADER
configure.in:70: error: possibly undefined macro: AM_MAINTAINER_MODE
configure.in:88: error: possibly undefined macro: GMP_DEFINE_RAW
configure.in:478: error: possibly undefined macro: GMP_INCLUDE_MPN
configure.in:1667: error: possibly undefined macro: GMP_PROG_CC_IS_GNU
configure.in:1673: error: possibly undefined macro: GMP_PROG_CC_IS_XLC
configure.in:1717: error: possibly undefined macro: GMP_PROG_CC_WORKS
configure.in:1724: error: possibly undefined macro: GMP_PROG_CC_WORKS_LONGLONG
configure.in:1736: error: possibly undefined macro: GMP_HPC_HPPA_2_0
configure.in:1737: error: possibly undefined macro: GMP_GCC_ARM_UMODSI
configure.in:1738: error: possibly undefined macro: GMP_GCC_MIPS_O32
configure.in:1739: error: possibly undefined macro: GMP_HPPA_LEVEL_20
configure.in:1740: error: possibly undefined macro: GMP_C_TEST_SIZEOF
configure.in:1812: error: possibly undefined macro: GMP_GCC_PENTIUM4_SSE2
configure.in:1813: error: possibly undefined macro: GMP_OS_X86_XMM
configure.in:1818: error: possibly undefined macro: GMP_GCC_NO_CPP_PRECOMP
configure.in:1826: error: possibly undefined macro: GMP_GCC_WA_MCPU
configure.in:1831: error: possibly undefined macro: GMP_GCC_WA_OLDAS
configure.in:1927: error: possibly undefined macro: GMP_H_ANSI
configure.in:1931: error: possibly undefined macro: GMP_PROG_CC_FOR_BUILD
configure.in:1932: error: possibly undefined macro: GMP_PROG_CPP_FOR_BUILD
configure.in:1933: error: possibly undefined macro: GMP_PROG_EXEEXT_FOR_BUILD
configure.in:1934: error: possibly undefined macro: GMP_C_FOR_BUILD_ANSI
configure.in:1935: error: possibly undefined macro: GMP_CHECK_LIBM_FOR_BUILD
configure.in:1978: error: possibly undefined macro: GMP_PROG_CXX_WORKS
configure.in:2004: error: possibly undefined macro: GMP_CRAY_OPTIONS
configure.in:2033: error: possibly undefined macro: GMP_FAT_SUFFIX
configure.in:2048: error: possibly undefined macro: GMP_ASM_X86_MMX
configure.in:2048: error: possibly undefined macro: GMP_STRIP_PATH
configure.in:2051: error: possibly undefined macro: GMP_ASM_X86_SSE2
configure.in:2081: error: possibly undefined macro: AM_C_PROTOTYPES
configure.in:2085: error: possibly undefined macro: GMP_PROG_AR
configure.in:2086: error: possibly undefined macro: GMP_PROG_NM
configure.in:2107: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.in:2197: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.in:2311: error: possibly undefined macro: GMP_C_STDARG
configure.in:2312: error: possibly undefined macro: GMP_C_ATTRIBUTE_CONST
configure.in:2313: error: possibly undefined macro: GMP_C_ATTRIBUTE_MALLOC
configure.in:2314: error: possibly undefined macro: GMP_C_ATTRIBUTE_MODE
configure.in:2315: error: possibly undefined macro: GMP_C_ATTRIBUTE_NORETURN
configure.in:2317: error: possibly undefined macro: GMP_H_EXTERN_INLINE
configure.in:2320: error: possibly undefined macro: AC_CHECK_LIBM
configure.in:2323: error: possibly undefined macro: GMP_FUNC_ALLOCA
configure.in:2324: error: possibly undefined macro: GMP_OPTION_ALLOCA
configure.in:2326: error: possibly undefined macro: GMP_H_HAVE_FILE
configure.in:2341: error: possibly undefined macro: GMP_C_DOUBLE_FORMAT
configure.in:2379: error: possibly undefined macro: GMP_FUNC_VSNPRINTF
configure.in:2380: error: possibly undefined macro: GMP_FUNC_SSCANF_WRITABLE_INPUT
configure.in:2543: error: possibly undefined macro: GMP_DEFINE
configure.in:2547: error: possibly undefined macro: GMP_REMOVE_FROM_LIST
configure.in:2948: error: possibly undefined macro: GMP_PROG_M4
configure.in:2949: error: possibly undefined macro: GMP_M4_M4WRAP_SPURIOUS
configure.in:2960: error: possibly undefined macro: GMP_ASM_TEXT
configure.in:2961: error: possibly undefined macro: GMP_ASM_DATA
configure.in:2962: error: possibly undefined macro: GMP_ASM_LABEL_SUFFIX
configure.in:2963: error: possibly undefined macro: GMP_ASM_GLOBL
configure.in:2964: error: possibly undefined macro: GMP_ASM_GLOBL_ATTR
configure.in:2965: error: possibly undefined macro: GMP_ASM_UNDERSCORE
configure.in:2966: error: possibly undefined macro: GMP_ASM_RODATA
configure.in:2967: error: possibly undefined macro: GMP_ASM_TYPE
configure.in:2968: error: possibly undefined macro: GMP_ASM_SIZE
configure.in:2969: error: possibly undefined macro: GMP_ASM_LSYM_PREFIX
configure.in:2970: error: possibly undefined macro: GMP_ASM_W32
configure.in:2971: error: possibly undefined macro: GMP_ASM_ALIGN_LOG
configure.in:2979: error: possibly undefined macro: GMP_ASM_IA64_ALIGN_OK
configure.in:2982: error: possibly undefined macro: GMP_ASM_M68K_INSTRUCTION
configure.in:2983: error: possibly undefined macro: GMP_ASM_M68K_ADDRESSING
configure.in:2984: error: possibly undefined macro: GMP_ASM_M68K_BRANCHES
configure.in:2987: error: possibly undefined macro: GMP_ASM_POWERPC_PIC_ALWAYS
configure.in:2988: error: possibly undefined macro: GMP_ASM_POWERPC_R_REGISTERS
configure.in:3021: error: possibly undefined macro: GMP_ASM_SPARC_REGISTER
configure.in:3026: error: possibly undefined macro: GMP_ASM_ALIGN_FILL_0x90
configure.in:3031: error: possibly undefined macro: GMP_ASM_COFF_TYPE
configure.in:3032: error: possibly undefined macro: GMP_ASM_X86_GOT_UNDERSCORE
configure.in:3033: error: possibly undefined macro: GMP_ASM_X86_SHLDL_CL
configure.in:3035: error: possibly undefined macro: GMP_ASM_X86_MCOUNT
configure.in:3110: error: possibly undefined macro: GMP_INCLUDE_GMP_H
configure.in:3193: error: possibly undefined macro: GMP_SUBST_CHECK_FUNCS
configure.in:3194: error: possibly undefined macro: GMP_SUBST_CHECK_HEADERS
configure.in:3242: error: possibly undefined macro: AM_PROG_LEX
configure.in:3255: error: possibly undefined macro: GMP_FINISH
~/prj/gmp-4.3$ CC=gcc-4.2 CXX=g++-4.2 CPPFLAGS=-fexceptions ./configure --enable-cxx --prefix=/home/parsons1/bin
./configure: line 2802: syntax error near unexpected token `config.m4'
./configure: line 2802: `GMP_INIT(config.m4)'

* obtained with hg clone https://gmplib.org/repo/gmp-4.3

Upvotes: 0

Views: 625

Answers (1)

Marc Glisse
Marc Glisse

Reputation: 7915

This page explains that to use the repository, you need to run .bootstrap. However, it is much easier to download an official release from one of the GNU mirrors. Also, please make sure you cannot use a more recent release, there were few incompatible changes.

Upvotes: 2

Related Questions