[GiNaC-devel] Windows 64 Bit Build

Richard Crozier richard.crozier at yahoo.co.uk
Tue Oct 22 13:37:25 CEST 2019


Dear list,

I am trying to cross-compile ginac for windows. To do this I am using M 
Cross Environment (see www.mxe.cc for more info) to cross-compile ginac 
from windows. MXE automatically creates a cross-compilation environment 
for you that integrates with autotools, cmak or normal makefiles.

Using MXE I successfully built the CLN library from the w64 branch of 
this git repository:

https://github.com/jrheinlaender/cln/tree/w64

Now I am trying to build ginac itself, but am getting the following error:

/bin/bash ../libtool  --tag=CXX   --mode=compile 
x86_64-w64-mingw32.static-g++ -std=gnu++11 -DHAVE_CONFIG_H -I. 
-I../config 
-DLIBEXECDIR='"/opt/mxe/usr/x86_64-w64-mingw32.static/libexec/"' 
-std=c++11 -MT libginac_la-fderivative.lo -MD -MP -MF 
.deps/libginac_la-fderivative.Tpo -c -o libginac_la-fderivative.lo `test 
-f 'fderivative.cpp' || echo './'`fderivative.cpp
libtool: compile:  x86_64-w64-mingw32.static-g++ -std=gnu++11 
-DHAVE_CONFIG_H -I. -I../config 
-DLIBEXECDIR=\"/opt/mxe/usr/x86_64-w64-mingw32.static/libexec/\" 
-std=c++11 -MT libginac_la-fderivative.lo -MD -MP -MF 
.deps/libginac_la-fderivative.Tpo -c fderivative.cpp  -DDLL_EXPORT -DPIC 
-o .libs/libginac_la-fderivative.o
factor.cpp: In function 'GiNaC::ex 
GiNaC::{anonymous}::factor_multivariate(const GiNaC::ex&, const exset&)':
factor.cpp:2254:56: error: conversion from 'long long unsigned int' to 
'GiNaC::numeric' is ambiguous
   numeric modulus = (vnlst.nops() > 3) ? vnlst.nops() : 3;
                                                         ^
In file included from factor.cpp:58:0:
numeric.h:94:2: note: candidate: GiNaC::numeric::numeric(double)
   numeric(double d);
   ^
numeric.h:92:2: note: candidate: GiNaC::numeric::numeric(long unsigned int)
   numeric(unsigned long i);
   ^
numeric.h:91:2: note: candidate: GiNaC::numeric::numeric(long int)
   numeric(long i);
   ^
numeric.h:90:2: note: candidate: GiNaC::numeric::numeric(unsigned int)
   numeric(unsigned int i);
   ^
numeric.h:89:2: note: candidate: GiNaC::numeric::numeric(int)
   numeric(int i);
   ^

This is from the master barnch of the git repository, but I get the same 
error using the latest release.

Is there likely to be an easy fix, or is my quest in vain?

If you are interested at all, I built CLN using MXE like this:

autoreconf -iv
./configure --host=x86_64-w64-mingw32.static CXXFLAGS="$CXXFLAGS 
-std=c++11" --prefix=/opt/mxe/usr/x86_64-w64-mingw32.static
make -j3
make install

However, I should mention that I also manually removed the 
subdirectories tests, examples, doc and benchmarks from the Makefile.am 
and configure.ac before building.

I then tried to build ginac the exact same way:

autoreconf -i
./configure --host=x86_64-w64-mingw32.static CXXFLAGS="$CXXFLAGS 
-std=c++11" --prefix=/opt/mxe/usr/x86_64-w64-mingw32.static
make -j3
make install


Regards,

Richard






More information about the GiNaC-devel mailing list