Windows Compile Error

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
TomL12953
Posts: 1
Joined: Sun Jun 02, 2019 4:17 am

Windows Compile Error

Post by TomL12953 » Sun Jun 02, 2019 4:50 am

I'm trying to compile MicroPython 1.11 in Windows by typing make at a command prompt and I get the errors below. I tried compiling in both Cygwin 64 and in native Windows and I get the same error in both. What am I doing wrong?

Errors:

../../py/obj.h:85:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 1) != 0); }
^
../../py/obj.h: In function 'mp_obj_is_qstr':
../../py/obj.h:90:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 3) == 2); }
^
../../py/obj.h: In function 'mp_obj_is_obj':
../../py/obj.h:106:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 3) == 0); }
^
cc1: all warnings being treated as errors
make: *** [../../py/mkrules.mk:47: build/py/mpstate.o] Error 1

markcowell23
Posts: 1
Joined: Sun Aug 25, 2019 7:02 am

Re: Windows Compile Error

Post by markcowell23 » Sun Aug 25, 2019 7:03 am

[quote=TomL12953 post_id=37052 time=1559451059 user_id=5380]
I'm trying to compile MicroPython 1.11 in Windows by typing make at a command prompt and I get the errors below. I tried https://bestwashingmachine.in compiling in both Cygwin 64 and in native Windows and I get the same error in both. What am I doing wrong?

Errors:

../../py/obj.h:85:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 1) != 0); }
^
../../py/obj.h: In function 'mp_obj_is_qstr':
../../py/obj.h:90:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 3) == 2); }
^
../../py/obj.h: In function 'mp_obj_is_obj':
../../py/obj.h:106:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 3) == 0); }
^
cc1: all warnings being treated as errors
make: *** [../../py/mkrules.mk:47: build/py/mpstate.o] Error 1
[/quote]

Hi forum admin I'm facing same issue please help us
Last edited by markcowell23 on Thu Sep 12, 2019 6:10 am, edited 1 time in total.

stijn
Posts: 348
Joined: Thu Apr 24, 2014 9:13 am

Re: Windows Compile Error

Post by stijn » Sun Aug 25, 2019 7:54 am

I tried compiling in both Cygwin 64 and in native Windows and I get the same error in both
Can you explain what 'Cygwin 64' is, and 'native Windows'? I.e. which compiler version etc? And which port are you trying to build (the unix one or the windows one)?

In any case: the only thing which is completely supported and working on Windows is the windows port built with Mingw-w64 (well, and the msvc port). I.e. you need Cygwin or MSys2 with make and Mingw-w64 installed.

Other things like using Mingw or building the unix port with Cygwin's gcc aren't supported, though might build with a little bit of work.

Post Reply