Error installing package mpir-2.7.0 on arch linux

99 views
Skip to first unread message

pang

unread,
Oct 30, 2015, 4:43:21 AM10/30/15
to sage-devel
Hello, I just got an error trying to compile sage 6.9 from source, on a just updated archlinux with kernel 4.2.3.

A couple of days ago I could upgrade my working installation, and it worked, but it failed at building the documentation.

Regards

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -m64 -O2 -march=core2 -mtune=core2 -g -c sqrt.c  -fPIC -DPIC -o .libs/sqrt.o
In file included from sqrt.c:24:0:
../mpir.h:1165:63: error: expected ')' before '||' token
 __GMP_DECLSPEC
void mpz_sub_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpir_ui));
                                                               
^
../mpir.h:328:24: note: in definition of macro '__GMP_PROTO'
 
#define __GMP_PROTO(x) x
                       
^
In file included from /usr/include/features.h:365:0,
                 
from /usr/include/stdio.h:27,
                 
from sqrt.c:23:
../mpir.h:1175:39: error: unknown type name 'wchar_t'
 __GMP_DECLSPEC
void mpz_submul_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpir_ui));
                                       
^
../mpir.h:1178:44: error: unknown type name 'wchar_t'
 __GMP_DECLSPEC
void mpz_swap __GMP_PROTO ((mpz_ptr, mpz_ptr)) __GMP_NOTHROW;
                                           
^
../mpir.h:1179:16: error: unknown type name 'wchar_t'
In file included from sqrt.c:24:0:
../mpir.h:1196:2: error: #endif without #if
 __GMP_DECLSPEC mpir_ui mpz_tdiv_qr_ui __GMP_PROTO
((mpz_ptr, mpz_ptr, mpz_srcptr, mpir_ui));
 
^
../mpir.h:1205:14: error: unknown type name 'wchar_t'
 __GMP_DECLSPEC mpir_ui mpz_tdiv_r_ui __GMP_PROTO
((mpz_ptr, mpz_srcptr, mpir_ui));
             
^
../mpir.h:1212:27: error: unknown type name 'wchar_t'
../mpir.h:1216:28: error: unknown type name 'wchar_t'
 
#define mpz_urandomm __gmpz_urandomm
                           
^
../mpir.h:1217:14: error: unknown type name 'wchar_t'
 __GMP_DECLSPEC
void mpz_urandomm __GMP_PROTO ((mpz_ptr, gmp_randstate_t, mpz_srcptr));
             
^
../mpir.h:1222:1: error: expected identifier or '(' before numeric constant
In file included from /usr/include/features.h:365:0,
                 
from /usr/include/stdio.h:27,
                 
from sqrt.c:23:
../mpir.h:1228:40: error: unknown type name 'wchar_t'
../mpir.h:1231:45: error: unknown type name 'wchar_t'
../mpir.h:1232:17: error: unknown type name 'wchar_t'
 __GMP_DECLSPEC uintmax_t mpz_get_ux __GMP_PROTO
((mpz_srcptr));
                 
^
In file included from sqrt.c:24:0:
../mpir.h:1259:8: error: unknown type name 'wint_t'
 
#define mpq_add __gmpq_add
       
^
../mpir.h:1260:8: error: unknown type name 'wint_t'
 __GMP_DECLSPEC
void mpq_add __GMP_PROTO ((mpq_ptr, mpq_srcptr, mpq_srcptr));
       
^
../mpir.h:1266:8: error: unknown type name 'wint_t'
 __GMP_DECLSPEC
void mpq_clear __GMP_PROTO ((mpq_ptr));
       
^
../mpir.h: In function '__gmpz_set_q':
../mpir.h:2047:3: warning: implicit declaration of function 'mpz_tdiv_q' [-Wimplicit-function-declaration]
 
#endif
   
^
../mpir.h: In function 'mpq_abs':
../mpir.h:2070:5: warning: implicit declaration of function 'mpq_set' [-Wimplicit-function-declaration]
 __GMP_EXTERN_INLINE
void
     
^
../mpir.h: At top level:
../mpir.h:2490:2: error: #endif without #if
 
#define __MPIR_CFLAGS "-m64 -O2 -march=core2 -mtune=core2  -g "
 
^
Makefile:449: recipe for target 'sqrt.lo' failed
make
[5]: *** [sqrt.lo] Error 1
make
[5]: Leaving directory '/home/user/sage-6.9/local/var/tmp/sage/build/mpir-2.7.0/src/mpz'
Makefile:948: recipe for target 'all-recursive' failed
make
[4]: *** [all-recursive] Error 1
make
[4]: Leaving directory '/home/user/sage-6.9/local/var/tmp/sage/build/mpir-2.7.0/src'
Makefile:744: recipe for target 'all' failed
make
[3]: *** [all] Error 2
make
[3]: Leaving directory '/home/user/sage-6.9/local/var/tmp/sage/build/mpir-2.7.0/src'
Error building MPIR.

real    
7m4.518s
user    
3m53.987s
sys    
1m19.637s
************************************************************************
Error installing package mpir-2.7.0
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem
and including the relevant part of the log file
 
/home/user/sage-6.9/logs/pkgs/mpir-2.7.0.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/user/sage-6.9/local/var/tmp/sage/build/mpir-2.7.0 and type '
make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd '
/home/user/sage-6.9/local/var/tmp/sage/build/mpir-2.7.0' && '/home/user/sage-6.9/sage' --sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************
Makefile:1684: fallo en las instrucciones para el objetivo '
/home/user/sage-6.9/local/var/lib/sage/installed/mpir-2.7.0'
make[2]: *** [/home/user/sage-6.9/local/var/lib/sage/installed/mpir-2.7.0] Error 1
make[2]: se sale del directorio '
/home/user/sage-6.9/build/make'
Makefile:626: fallo en las instrucciones para el objetivo '
all-toolchain'
make[1]: *** [all-toolchain] Error 2
make[1]: se sale del directorio '
/home/user/sage-6.9/build/make'

real    10m45.160s
user    5m46.990s
sys    1m59.770s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of '
make all'):

* package: mpir-2.7.0
  log file: /home/user/sage-6.9/logs/pkgs/mpir-2.7.0.log
  build directory: /home/user/sage-6.9/local/var/tmp/sage/build/mpir-2.7.0

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run '
make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to '
yes' to prevent this.





Bill Hart

unread,
Oct 31, 2015, 5:41:48 PM10/31/15
to sage-devel

Hi,

I'm one of the MPIR developers. I am unable to find any information on this issue. And Arch Linux seems to have a working MPIR-2.7.0 package which doesn't require any specific patching:


My guess is something unusual with your system, or a recent change in Arch Linux that breaks things.

Either way, it is not clear I can really help.

Can you verify whether this is a Sage/toolchain or an MPIR issue by downloading MPIR-2.7.0 from http://www.mpir.org and trying to build it on your system (./configure; make; make check).

Bill.

...

Pablo Angulo

unread,
Nov 1, 2015, 3:31:39 PM11/1/15
to sage-...@googlegroups.com
mpir 2.7.0 compiled just fine using the AUR package. I didn't 'pacman -Syu' in between.

My previous sage installed upgraded to sage 6.9 with no problem, and version is 2.7.0, but there was a system upgrade in between.

I don't need to solve this, but I will perform other attempts if it can help in any way.

Actually, I just wanted to build a clean sage to check a certain bug I got.

Regards

El 31/10/15 a las 22:41, Bill Hart escribió:
> > Hi, > > I'm one of the MPIR developers. I am unable to find any information on this issue. And Arch Linux seems to have a working MPIR-2.7.0 package which doesn't require any specific patching: > > https://aur.archlinux.org/packages/mpir/ > > My guess is something unusual with your system, or a recent change in Arch Linux that breaks things. > > Either way, it is not clear I can really help. > > Can you verify whether this is a Sage/toolchain or an MPIR issue by downloading MPIR-2.7.0 from http://www.mpir.org and trying to build it on your system (./configure; make; make check). > > Bill. > > On Friday, 30 October 2015 09:43:21 UTC+1, pang wrote: > >     Hello, I just got an error trying to compile sage 6.9 from source, on a just updated archlinux with kernel 4.2.3. > >     A couple of days ago I could upgrade my working installation, and it worked, but it failed at building the documentation. > >     Regards > >     | >     libtool:compile: gcc -DHAVE_CONFIG_H -I.-I..-D__GMP_WITHIN_GMP -I..-m64 -O2 -march=core2 -mtune=core2 -g -c sqrt.c  -fPIC -DPIC -o .libs/sqrt.o >     Infile included fromsqrt.c:24:0: >     ../mpir.h:1165:63:error:expected ')'before '||'token >      __GMP_DECLSPEC voidmpz_sub_ui __GMP_PROTO ((mpz_ptr,mpz_srcptr,mpir_ui)); >                                                                    ^ >     ../mpir.h:328:24:note:indefinition of macro '__GMP_PROTO' >      #define__GMP_PROTO(x)x >                             ^ >     Infile included from/usr/include/features.h:365:0, >                      from/usr/include/stdio.h:27, >                      fromsqrt.c:23: >     ../mpir.h:1175:39:error:unknown type name 'wchar_t' >      __GMP_DECLSPEC voidmpz_submul_ui __GMP_PROTO ((mpz_ptr,mpz_srcptr,mpir_ui)); >                                            ^ >     ../mpir.h:1178:44:error:unknown type name 'wchar_t' >      __GMP_DECLSPEC voidmpz_swap __GMP_PROTO ((mpz_ptr,mpz_ptr))__GMP_NOTHROW; >                                                 ^ >     ../mpir.h:1179:16:error:unknown type name 'wchar_t' >     Infile included fromsqrt.c:24:0: >     ../mpir.h:1196:2:error:#endifwithout #if >      __GMP_DECLSPEC mpir_ui mpz_tdiv_qr_ui __GMP_PROTO ((mpz_ptr,mpz_ptr,mpz_srcptr,mpir_ui)); >       ^ >     ../mpir.h:1205:14:error:unknown type name 'wchar_t' >      __GMP_DECLSPEC mpir_ui mpz_tdiv_r_ui __GMP_PROTO ((mpz_ptr,mpz_srcptr,mpir_ui)); >                   ^ >     ../mpir.h:1212:27:error:unknown type name 'wchar_t' >     ../mpir.h:1216:28:error:unknown type name 'wchar_t' >      #definempz_urandomm __gmpz_urandomm >                                 ^ >     ../mpir.h:1217:14:error:unknown type name 'wchar_t' >      __GMP_DECLSPEC voidmpz_urandomm __GMP_PROTO ((mpz_ptr,gmp_randstate_t,mpz_srcptr)); >                   ^ >     ../mpir.h:1222:1:error:expected identifier or'('before numeric constant >     Infile included from/usr/include/features.h:365:0, >                      from/usr/include/stdio.h:27, >                      fromsqrt.c:23: >     ../mpir.h:1228:40:error:unknown type name 'wchar_t' >     ../mpir.h:1231:45:error:unknown type name 'wchar_t' >     ../mpir.h:1232:17:error:unknown type name 'wchar_t' >      __GMP_DECLSPEC uintmax_t mpz_get_ux __GMP_PROTO ((mpz_srcptr)); >                      ^ >     Infile included fromsqrt.c:24:0: >     ../mpir.h:1259:8:error:unknown type name 'wint_t' >      #definempq_add __gmpq_add >             ^ >     ../mpir.h:1260:8:error:unknown type name 'wint_t' >      __GMP_DECLSPEC voidmpq_add __GMP_PROTO ((mpq_ptr,mpq_srcptr,mpq_srcptr)); >             ^ >     ../mpir.h:1266:8:error:unknown type name 'wint_t' >      __GMP_DECLSPEC voidmpq_clear __GMP_PROTO ((mpq_ptr)); >             ^ >     ../mpir.h:Infunction'__gmpz_set_q': >     ../mpir.h:2047:3:warning:implicitdeclaration of function'mpz_tdiv_q'[-Wimplicit-function-declaration] >      #endif >        ^ >     ../mpir.h:Infunction'mpq_abs': >     ../mpir.h:2070:5:warning:implicitdeclaration of function >     | >     ... > > -- > You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group. > To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/rymdCASDS4Q/unsubscribe. > To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com <mailto:sage-devel+...@googlegroups.com>. > To post to this group, send email to sage-...@googlegroups.com <mailto:sage-...@googlegroups.com>. > Visit this group at http://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout.


Bill Hart

unread,
Nov 2, 2015, 8:31:43 AM11/2/15
to sage-devel
Unfortunately I'm unable to help with this. It looks like a Sage/toolchain issue which I'm afraid someone else will have to sort out. I don't have any ideas at all.

Bill.
> > Hi, > > I'm one of the MPIR developers. I am unable to find any information on this issue. And Arch Linux seems to have a working MPIR-2.7.0 package which doesn't require any specific patching: > > https://aur.archlinux.org/packages/mpir/ > > My guess is something unusual with your system, or a recent change in Arch Linux that breaks things. > > Either way, it is not clear I can really help. > > Can you verify whether this is a Sage/toolchain or an MPIR issue by downloading MPIR-2.7.0 from http://www.mpir.org and trying to build it on your system (./configure; make; make check). > > Bill. > > On Friday, 30 October 2015 09:43:21 UTC+1, pang wrote: > >     Hello, I just got an error trying to compile sage 6.9 from source, on a just updated archlinux with kernel 4.2.3. > >     A couple of days ago I could upgrade my working installation, and it worked, but it failed at building the documentation. > >     Regards > >     | >     libtool:compile: gcc -DHAVE_CONFIG_H -I.-I..-D__GMP_WITHIN_GMP -I..-m64 -O2 -march=core2 -mtune=core2 -g -c sqrt.c  -fPIC -DPIC -o .libs/sqrt.o >     Infile included fromsqrt.c:24:0: >     ../mpir.h:1165:63:error:expected ')'before '||'token >      __GMP_DECLSPEC voidmpz_sub_ui __GMP_PROTO ((mpz_ptr,mpz_srcptr,mpir_ui)); >                                                                    ^ >     ../mpir.h:328:24:note:indefinition of macro '__GMP_PROTO' >      #define__GMP_PROTO(x)x >                             ^ >     Infile included from/usr/include/features.h:365:0, >                      from/usr/include/stdio.h:27, >                      fromsqrt.c:23: >     ../mpir.h:1175:39:error:unknown type name 'wchar_t' >      __GMP_DECLSPEC voidmpz_submul_ui __GMP_PROTO ((mpz_ptr,mpz_srcptr,mpir_ui)); >                                            ^ >     ../mpir.h:1178:44:error:unknown type name 'wchar_t' >      __GMP_DECLSPEC voidmpz_swap __GMP_PROTO ((mpz_ptr,mpz_ptr))__GMP_NOTHROW; >                                                 ^ >     ../mpir.h:1179:16:error:unknown type name 'wchar_t' >     Infile included fromsqrt.c:24:0: >     ../mpir.h:1196:2:error:#endifwithout #if >      __GMP_DECLSPEC mpir_ui mpz_tdiv_qr_ui __GMP_PROTO ((mpz_ptr,mpz_ptr,mpz_srcptr,mpir_ui)); >       ^ >     ../mpir.h:1205:14:error:unknown type name 'wchar_t' >      __GMP_DECLSPEC mpir_ui mpz_tdiv_r_ui __GMP_PROTO ((mpz_ptr,mpz_srcptr,mpir_ui)); >                   ^ >     ../mpir.h:1212:27:error:unknown type name 'wchar_t' >     ../mpir.h:1216:28:error:unknown type name 'wchar_t' >      #definempz_urandomm __gmpz_urandomm >                                 ^ >     ../mpir.h:1217:14:error:unknown type name 'wchar_t' >      __GMP_DECLSPEC voidmpz_urandomm __GMP_PROTO ((mpz_ptr,gmp_randstate_t,mpz_srcptr)); >                   ^ >     ../mpir.h:1222:1:error:expected identifier or'('before numeric constant >     Infile included from/usr/include/features.h:365:0, >                      from/usr/include/stdio.h:27, >                      fromsqrt.c:23: >     ../mpir.h:1228:40:error:unknown type name 'wchar_t' >     ../mpir.h:1231:45:error:unknown type name 'wchar_t' >     ../mpir.h:1232:17:error:unknown type name 'wchar_t' >      __GMP_DECLSPEC uintmax_t mpz_get_ux __GMP_PROTO ((mpz_srcptr)); >                      ^ >     Infile included fromsqrt.c:24:0: >     ../mpir.h:1259:8:error:unknown type name 'wint_t' >      #definempq_add __gmpq_add >             ^ >     ../mpir.h:1260:8:error:unknown type name 'wint_t' >      __GMP_DECLSPEC voidmpq_add __GMP_PROTO ((mpq_ptr,mpq_srcptr,mpq_srcptr)); >             ^ >     ../mpir.h:1266:8:error:unknown type name 'wint_t' >      __GMP_DECLSPEC voidmpq_clear __GMP_PROTO ((mpq_ptr)); >             ^ >     ../mpir.h:Infunction'__gmpz_set_q': >     ../mpir.h:2047:3:warning:implicitdeclaration of function'mpz_tdiv_q'[-Wimplicit-function-declaration] >      #endif >        ^ >     ../mpir.h:Infunction'mpq_abs': >     ../mpir.h:2070:5:warning:implicitdeclaration of function >     | >     ... > > -- > You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group. > To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/rymdCASDS4Q/unsubscribe. > To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com <mailto:sage-devel+unsub...@googlegroups.com>. > To post to this group, send email to sage-...@googlegroups.com <mailto:s...@googlegroups.com>. > Visit this group at http://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages