GMP installation on Solaris2.7

Zhifeng Li z-li1 at northwestern.edu
Wed Jan 7 02:48:36 CET 2004


Sorry for forgetting to mention that I use gcc 3.3 compiler.

-----Original Message-----
From: Zhifeng Li [mailto:z-li1 at northwestern.edu]
Sent: Tuesday, January 06, 2004 11:07 PM
To: gmp-bugs at swox.com
Subject: GMP installation on Solaris2.7


Dear All:

I tried to install GMP on my Solaris2.7 and had some trouble during
compiling 'asprintf.c'. I read the archive and seems that some people had
experienced this problem. However, I could not find the solution to this
problem in the archive. I post my problem here and hope someone can give me
some hint. Thank you very much.

Zhifeng


 $ ./configure --prefix=/home/primal/zhifeng/Lib --enable-static
--disable-shared

## ---------- ##
## Platform.  ##
## ---------- ##

hostname = nefertari
uname -m = sun4u
uname -r = 5.7
uname -s = SunOS
uname -v = Generic_106541-04

/usr/bin/uname -p = sparc
/bin/uname -X     = System = SunOS
Node = nefertari
Release = 5.7
KernelID = Generic_106541-04
Machine = sun4u
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 1



--------------------------------------------------------------------------
Error output during make
--------------------------------------------------------------------------

/meas/lib/gcc-lib/sparc-sun-solaris2.6/3.3/include/stdarg.h:1:72: warning:
extra tokens at end of #line directive
/meas/lib/gcc-lib/sparc-sun-solaris2.6/3.3/include/stdarg.h:44:72:
warning: extra tokens at end of #line directive
/meas/lib/gcc-lib/sparc-sun-solaris2.6/3.3/include/stdarg.h:86:23:
warning: extra tokens at end of #line directive
asprintf.c:30:20: warning: extra tokens at end of #line directive
../gmp.h:54:71: warning: extra tokens at end of #line directive
/meas/lib/gcc-lib/sparc-sun-solaris2.6/3.3/include/stddef.h:1:73: warning:
extra tokens at end of #line directive
/meas/lib/gcc-lib/sparc-sun-solaris2.6/3.3/include/stddef.h:214:21:
warning: extra tokens at end of #line directive
../gmp.h:2115:23: warning: extra tokens at end of #line directive
asprintf.c:31:25: warning: extra tokens at end of #line directive
../gmp-impl.h:38:23: warning: extra tokens at end of #line directive
../config.h:1:26: warning: extra tokens at end of #line directive
../gmp-impl.h:39:27: warning: extra tokens at end of #line directive
../gmp-mparam.h:1:26: warning: extra tokens at end of #line directive
../gmp-impl.h:2934:23: warning: extra tokens at end of #line directive
asprintf.c: In function `__gmp_asprintf':
asprintf.c:36: error: parse error before "va_dcl"
asprintf.c:36: error: number of arguments doesn't match prototype
../gmp.h:503: error: prototype declaration
asprintf.c:46: warning: second parameter of `va_start' not last named
argument
make[2]: *** [asprintf_.lo] Error 1
make[2]: Leaving directory
`/home/primal/zhifeng/Download/gmp-4.1.2/printf'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/primal/zhifeng/Download/gmp-4.1.2'
make: *** [all] Error 2


----------------------------------------------------------------------------
part in config.log
----------------------------------------------------------------------------
## ------------ ##
## Core tests.  ##
## ------------ ##

configure:1204: PATH=".;."; conftest.sh
./configure: conftest.sh: not found
configure:1207: $? = 1
configure:1282: checking build system type
configure:1300: result: ultrasparc2i-sun-solaris2.7
configure:1307: checking host system type
configure:1321: result: ultrasparc2i-sun-solaris2.7
configure:1347: checking for a BSD compatible install
configure:1396: result: ./install-sh -c
configure:1407: checking whether build environment is sane
configure:1450: result: yes
configure:1483: checking for mawk
configure:1509: result: no
configure:1483: checking for gawk
configure:1498: found /meas/bin/gawk
configure:1506: result: gawk
configure:1516: checking whether make sets ${MAKE}
configure:1536: result: yes
configure:1627: checking whether to enable maintainer-specific portions of
Makefiles
configure:1636: result: no
configure:1014: User:
ABI=
CC=
CFLAGS=(unset)
CPPFLAGS=(unset)
MPN_PATH=
configure:1020: GMP:
abilist=64 32
cclist=gcc acc cc
configure:2789: gcc 2>&1 | grep xlc >/dev/null
configure:2792: $? = 1
configure:2823: checking compiler gcc -g -O2 -m64 -mptr64 -Wa,-xarch=v9
-mcpu=v9
configure:2851: gcc -g -O2 -m64 -mptr64 -Wa,-xarch=v9 -mcpu=v9  conftest.c
>&5
cc1: error: -m64 is not supported by this configuration
configure:2854: $? = 1
configure:2870: result: no
configure:2767: cc -c conftest.c >&5
configure:2770: $? = 0
configure:2773: checking whether cc is gcc
configure:2775: result: yes
configure:2789: cc 2>&1 | grep xlc >/dev/null


...
configure:3813: result: yes
configure:3840: gcc -c -g -O2 -Wa,-xarch=v8plus -mcpu=ultrasparc
conftest.c >&5
conftest.c:2: error: parse error before "me"
configure:3843: $? = 1
configure: failed program was:
#ifndef __cplusplus
  choke me
#endif
configure:3949: checking for style of include used by make
configure:3976: result: GNU
configure:3982: checking dependency style of gcc
configure:4044: result: none
configure:4048: checking for gcc option to accept ANSI C
configure:4105: gcc  -c -g -O2 -Wa,-xarch=v8plus -mcpu=ultrasparc
conftest.c >&5
In file included from configure:4060:
/usr/include/sys/stat.h:253: error: parse error before "blksize_t"
/usr/include/sys/stat.h:257: error: parse error before '}' token
/usr/include/sys/stat.h:313: error: parse error before "blksize_t"
/usr/include/sys/stat.h:314: error: conflicting types for `st_blocks'
/usr/include/sys/stat.h:254: error: previous declaration of `st_blocks'
/usr/include/sys/stat.h:317: error: parse error before '}' token
configure:4108: $? = 1
configure: failed program was:
#line 4056 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int),
int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
configure:4105: gcc -qlanglvl=ansi -c -g -O2 -Wa,-xarch=v8plus
-mcpu=ultrasparc  conftest.c >&5
gcc: unrecognized option `-qlanglvl=ansi'
In file included from configure:4060:
/usr/include/sys/stat.h:253: error: parse error before "blksize_t"

  $
./configure --prefix=/home/primal/zhifeng/Lib --enable-static --disable-shar
ed

## ---------- ##
## Platform.  ##
## ---------- ##

hostname = nefertari
uname -m = sun4u
uname -r = 5.7
uname -s = SunOS
uname -v = Generic_106541-04

/usr/bin/uname -p = sparc
/bin/uname -X     = System = SunOS
Node = nefertari
Release = 5.7
KernelID = Generic_106541-04
Machine = sun4u
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 1



--------------------------------------------------------------------------
Error output during make
--------------------------------------------------------------------------

/meas/lib/gcc-lib/sparc-sun-solaris2.6/3.3/include/stdarg.h:1:72: warning:
extra tokens at end of #line directive
/meas/lib/gcc-lib/sparc-sun-solaris2.6/3.3/include/stdarg.h:44:72: warning:
extra tokens at end of #line directive
/meas/lib/gcc-lib/sparc-sun-solaris2.6/3.3/include/stdarg.h:86:23: warning:
extra tokens at end of #line directive
asprintf.c:30:20: warning: extra tokens at end of #line directive
../gmp.h:54:71: warning: extra tokens at end of #line directive
/meas/lib/gcc-lib/sparc-sun-solaris2.6/3.3/include/stddef.h:1:73: warning:
extra tokens at end of #line directive
/meas/lib/gcc-lib/sparc-sun-solaris2.6/3.3/include/stddef.h:214:21: warning:
extra tokens at end of #line directive
../gmp.h:2115:23: warning: extra tokens at end of #line directive
asprintf.c:31:25: warning: extra tokens at end of #line directive
../gmp-impl.h:38:23: warning: extra tokens at end of #line directive
../config.h:1:26: warning: extra tokens at end of #line directive
../gmp-impl.h:39:27: warning: extra tokens at end of #line directive
../gmp-mparam.h:1:26: warning: extra tokens at end of #line directive
../gmp-impl.h:2934:23: warning: extra tokens at end of #line directive
asprintf.c: In function `__gmp_asprintf':
asprintf.c:36: error: parse error before "va_dcl"
asprintf.c:36: error: number of arguments doesn't match prototype
../gmp.h:503: error: prototype declaration
asprintf.c:46: warning: second parameter of `va_start' not last named
argument
make[2]: *** [asprintf_.lo] Error 1
make[2]: Leaving directory `/home/primal/zhifeng/Download/gmp-4.1.2/printf'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/primal/zhifeng/Download/gmp-4.1.2'
make: *** [all] Error 2


----------------------------------------------------------------------------
part in config.log
----------------------------------------------------------------------------
## ------------ ##
## Core tests.  ##
## ------------ ##

configure:1204: PATH=".;."; conftest.sh
./configure: conftest.sh: not found
configure:1207: $? = 1
configure:1282: checking build system type
configure:1300: result: ultrasparc2i-sun-solaris2.7
configure:1307: checking host system type
configure:1321: result: ultrasparc2i-sun-solaris2.7
configure:1347: checking for a BSD compatible install
configure:1396: result: ./install-sh -c
configure:1407: checking whether build environment is sane
configure:1450: result: yes
configure:1483: checking for mawk
configure:1509: result: no
configure:1483: checking for gawk
configure:1498: found /meas/bin/gawk
configure:1506: result: gawk
configure:1516: checking whether make sets ${MAKE}
configure:1536: result: yes
configure:1627: checking whether to enable maintainer-specific portions of
Makefiles
configure:1636: result: no
configure:1014: User:
ABI=
CC=
CFLAGS=(unset)
CPPFLAGS=(unset)
MPN_PATH=
configure:1020: GMP:
abilist=64 32
cclist=gcc acc cc
configure:2789: gcc 2>&1 | grep xlc >/dev/null
configure:2792: $? = 1
configure:2823: checking compiler
gcc -g -O2 -m64 -mptr64 -Wa,-xarch=v9 -mcpu=v9
configure:2851: gcc -g -O2 -m64 -mptr64 -Wa,-xarch=v9 -mcpu=v9  conftest.c
>&5
cc1: error: -m64 is not supported by this configuration
configure:2854: $? = 1
configure:2870: result: no
configure:2767: cc -c conftest.c >&5
configure:2770: $? = 0
configure:2773: checking whether cc is gcc
configure:2775: result: yes
configure:2789: cc 2>&1 | grep xlc >/dev/null


...
configure:3813: result: yes
configure:3840: gcc -c -g -O2 -Wa,-xarch=v8plus -mcpu=ultrasparc  conftest.c
>&5
conftest.c:2: error: parse error before "me"
configure:3843: $? = 1
configure: failed program was:
#ifndef __cplusplus
  choke me
#endif
configure:3949: checking for style of include used by make
configure:3976: result: GNU
configure:3982: checking dependency style of gcc
configure:4044: result: none
configure:4048: checking for gcc option to accept ANSI C
configure:4105: gcc  -c -g -O2 -Wa,-xarch=v8plus -mcpu=ultrasparc
conftest.c >&5
In file included from configure:4060:
/usr/include/sys/stat.h:253: error: parse error before "blksize_t"
/usr/include/sys/stat.h:257: error: parse error before '}' token
/usr/include/sys/stat.h:313: error: parse error before "blksize_t"
/usr/include/sys/stat.h:314: error: conflicting types for `st_blocks'
/usr/include/sys/stat.h:254: error: previous declaration of `st_blocks'
/usr/include/sys/stat.h:317: error: parse error before '}' token
configure:4108: $? = 1
configure: failed program was:
#line 4056 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int),
int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
configure:4105:
gcc -qlanglvl=ansi -c -g -O2 -Wa,-xarch=v8plus -mcpu=ultrasparc  conftest.c
>&5
gcc: unrecognized option `-qlanglvl=ansi'
In file included from configure:4060:
/usr/include/sys/stat.h:253: error: parse error before "blksize_t"



More information about the gmp-bugs mailing list