[GiNaC-devel] Windows 64 Bit Build

Richard Crozier richard.crozier at yahoo.co.uk
Wed Oct 23 11:41:45 CEST 2019


Hi Klaus,

I'm certainly interested, you might find that using MXE makes 
cross-compilation from Linux very easy, for example the dependency gmp 
is already available in MXE, so I was able to build the CLN w64 github 
repository with gmp. In fact no changes are required for the GiNaC or 
CLN build system, all that is required is that the sources can compile 
under mingw32-w64.

If you are happy to share the code though, you could upload it here:

https://cloud.reoptimizesystems.com/nextcloud/index.php/s/TEB9GaPbJydQQc2

My preference would of course be that the upstream mainline GiNaC 
sources can compile under mingw32-w64.

It's worth mentioning that my ultimate goal is to build MBDyn (see 
www.mbdyn.org) which uses GiNaC if it is available for an optional 
component. I have this build working but without the GiNaC part.

What is ams by the way, some internet searching didn't turn up anything 
obvious?

Thanks,

Richard

On 23/10/2019 08:13, Kemlath Orcslayer via GiNaC-devel wrote:
> Dear Richard,
> 
> There are quite some incompatibilities between data type lengths under UNIX and Windows therefore the standard CLN branch does not work under windows.
> I was able to port the current GiNaC to windows using CLN from "https://github.com/jrheinlaender/ginac???
> 
> If you want I have a complete GiNaC + CLN (no gmp no ams) + working example using a CMake based build system.
> Its not on git since the GiNaC part is slightly modified and has some extensions for faster serialisation that I use under MPI for broadcasting.
> 
> Let me know if you???re interested
> 
> Klaus
> 
>> On 22. Oct 2019, at 13:37, Richard Crozier via GiNaC-devel <ginac-devel at ginac.de> wrote:
>>
>> 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
>>
>>
>>
>>
>> _______________________________________________
>> GiNaC-devel mailing list
>> GiNaC-devel at ginac.de
>> https://www.cebix.net/mailman/listinfo/ginac-devel
> 
> _______________________________________________
> GiNaC-devel mailing list
> GiNaC-devel at ginac.de
> https://www.cebix.net/mailman/listinfo/ginac-devel
> 


More information about the GiNaC-devel mailing list