Hi, I tried to compile CLN with MinGW 64-bit (compilation for 32bit works fine). Downloaded mingw-w64-1.0-bin_i686-linux_20110117.tar.bz2 from sourceforge and installed it. git clone git://www.ginac.de/cln.git cd cln autoreconf -i ./configure --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32 --without-gmp make and this is the result (complete output): Making all in src make[1]: Entering directory `/home/jan/mingw/cln/src' /bin/bash ../libtool --tag=CXX --mode=compile x86_64-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -g -O2 -MT cl_alloca.lo -MD -MP -MF .deps/cl_alloca.Tpo -c -o cl_alloca.lo `test -f 'base/cl_alloca.cc' || echo './'`base/cl_alloca.cc libtool: compile: x86_64-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -g -O2 -MT cl_alloca.lo -MD -MP -MF .deps/cl_alloca.Tpo -c base/cl_alloca.cc -o cl_alloca.o In file included from ./base/cl_sysdep.h:10:0, from base/cl_alloca.cc:4: ../include/cln/intparam.h:26:2: error: #error "Type char * does not fit into a long!!" In file included from ../include/cln/types.h:10:0, from ./base/cl_macros.h:6, from ./base/cl_sysdep.h:56, from base/cl_alloca.cc:4: ../include/cln/intparam.h:26:2: error: #error "Type char * does not fit into a long!!" base/cl_alloca.cc: In function 'cln::cl_alloca_header* cln::cl_alloc_alloca_header(size_t)': base/cl_alloca.cc:20:40: error: cast from 'long int*' to 'long int' loses precision make[1]: *** [cl_alloca.lo] Error 1 make[1]: Leaving directory `/home/jan/mingw/cln/src' make: *** [all-recursive] Error 1 Any ideas? Thanks, Jan
Hi, Jan!
I tried to compile CLN with MinGW 64-bit (compilation for 32bit works fine).
libtool: compile: x86_64-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -g -O2 -MT cl_alloca.lo -MD -MP -MF .deps/cl_alloca.Tpo -c base/cl_alloca.cc -o cl_alloca.o In file included from ./base/cl_sysdep.h:10:0, from base/cl_alloca.cc:4: ../include/cln/intparam.h:26:2: error: #error "Type char * does not fit into a long!!" In file included from ../include/cln/types.h:10:0, from ./base/cl_macros.h:6, from ./base/cl_sysdep.h:56, from base/cl_alloca.cc:4: ../include/cln/intparam.h:26:2: error: #error "Type char * does not fit into a long!!" base/cl_alloca.cc: In function 'cln::cl_alloca_header* cln::cl_alloc_alloca_header(size_t)': base/cl_alloca.cc:20:40: error: cast from 'long int*' to 'long int' loses precision make[1]: *** [cl_alloca.lo] Error 1 make[1]: Leaving directory `/home/jan/mingw/cln/src' make: *** [all-recursive] Error 1
CLN (and in fact many other software packages) assumes that sizeof(void*) == sizeof(long). This assumption worked since ever, on every hardware and software platform... until win64 designers decided to break it. If someone wants to port CLN to such a weird platform -- well, good luck. Patches are always welcome. Best regards, Alexei
Hello folks, I have tried it. I am just not certain, if it has worked or not and if I was close and just didn't know. It took me an hour or so creating a few constructors so that type ambiguities are handled. Then left it as the tests crashed and I couldn't really spot the error. Segmentation error type of errors. Then I had to go on with my work and didn't test more. If anyone's interested in the branch and the patch, I'd be too happy to make them available. It's a while back though. Cheers, Kaveh. On 4 Feb 2011, at 21:32, Alexei Sheplyakov wrote:
Hi, Jan!
I tried to compile CLN with MinGW 64-bit (compilation for 32bit works fine).
libtool: compile: x86_64-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -g -O2 -MT cl_alloca.lo -MD -MP -MF .deps/cl_alloca.Tpo -c base/cl_alloca.cc -o cl_alloca.o In file included from ./base/cl_sysdep.h:10:0, from base/cl_alloca.cc:4: ../include/cln/intparam.h:26:2: error: #error "Type char * does not fit into a long!!" In file included from ../include/cln/types.h:10:0, from ./base/cl_macros.h:6, from ./base/cl_sysdep.h:56, from base/cl_alloca.cc:4: ../include/cln/intparam.h:26:2: error: #error "Type char * does not fit into a long!!" base/cl_alloca.cc: In function 'cln::cl_alloca_header* cln::cl_alloc_alloca_header(size_t)': base/cl_alloca.cc:20:40: error: cast from 'long int*' to 'long int' loses precision make[1]: *** [cl_alloca.lo] Error 1 make[1]: Leaving directory `/home/jan/mingw/cln/src' make: *** [all-recursive] Error 1
CLN (and in fact many other software packages) assumes that sizeof(void*) == sizeof(long). This assumption worked since ever, on every hardware and software platform... until win64 designers decided to break it.
If someone wants to port CLN to such a weird platform -- well, good luck. Patches are always welcome.
Best regards, Alexei _______________________________________________ CLN-list mailing list CLN-list@ginac.de https://www.cebix.net/mailman/listinfo/cln-list
--- Kaveh Vahedipour Institute of Neuroscience and Medicine Medical Imaging Physics Forschungszentrum Juelich GmbH 52425 Juelich Germany Phone: +49-2461-611921 Fax: +49-2461-611919 E-mail: k.vahedipour@fz-juelich.de Web: http://www.fz-juelich.de/inm/inm-4
Hi Jan,
Patches are always welcome which reminds me: What happened to the "CLN patch 1" which I submitted in September? At that time there was some kind of hardware problem :-(
The patch breaks compilation with GCC (--without-gmp) and can not be applied as is. As far as I remember the I've emailed you back in November, but haven't got any updates so far. Best regards, Alexei
Hi Alexei,
The patch breaks compilation with GCC (--without-gmp) and can not be applied as is. As far as I remember the I've emailed you back in November, but haven't got any updates so far. sorry, I don't think I got that mail. But Richard has already pointed out another problem with the patch. I'll work on on it.
I think I also submitted a "CLN patch 2" at that time, if you mailed me about that, too, please do it again :-( Thanks, Jan
participants (3)
-
Alexei Sheplyakov
-
Jan
-
Kaveh Vahedipour