zukenj

  • ***
  • 202
Error compiling in Windows Msys2
« on: June 14, 2018, 02:56:48 pm »
Hello,

I am getting the following error when I try to compile Next.

process_begin: CreateProcess(NULL, C:/msys64/mingw64/bin/python C:/msys64/home/arman/librepilot/make/scripts/version-info.py --path=C:/msys64/home/arman/librepilot --template=C:/msys64/home/arman/librepilot/flight/templates/firmware_info.c.template --outfile=C:/msys64/home/arman/librepilot/build/firmware/fw_coptercontrol/fw_coptercontrol.bin.firmware_info.c --image=C:/msys64/home/arman/librepilot/build/firmware/fw_coptercontrol/fw_coptercontrol.bin --type=0x04 --revision=0x02 --uavodir=C:/msys64/home/arman/librepilot/flight/../shared/uavobjectdefinition, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[1]: *** [C:/msys64/home/arman/librepilot/flight/make/common-defs.mk:290: C:/msys64/home/arman/librepilot/build/firmware/fw_coptercontrol/fw_coptercontrol.bin.firmware_info.c] Error 2
mingw32-make: *** [C:/msys64/home/arman/librepilot/flight/Makefile:227: fw_coptercontrol_opfw] Error 2

I did (git Status) nothing to check out.

I will appreciated any help.

Thanks
FS-TH9X RC
F450 Clone
Revolution FC
EMAX 2213 935 KV
HK 30A ESC UBEC running BLHeli 14.4
10x4.5 Propellers
DJI Naza clone Ublox M8N GPS

Re: Error compiling in Windows Msys2
« Reply #1 on: June 14, 2018, 03:13:05 pm »
A quick forum search for 'msys2' yields several things, among them to upgrade msys2 and the fact that msys2 often has very new packages in it that conflict with LP.  I suggest searching "most recent first" and "show results as messages".
https://forum.librepilot.org/index.php?action=search2

After that I would simply look at each complete file path in the error message to see if any don't exist as the error says.  Starting with (for example):
C:/msys64/mingw64/bin/python
  (should be an executable binary program)
C:/msys64/home/arman/librepilot/make/scripts/version-info.py
  (should be a human readable text python program)

zukenj

  • ***
  • 202
Re: Error compiling in Windows Msys2
« Reply #2 on: June 14, 2018, 04:18:29 pm »
TheOtherClift,

When I exec make it will look for python:
 
$ mingw32-make package
/usr/bin/sh: /mingw64/bin/python: No such file or directory

and what it is in mingw64/bin/

is:
pydoc3             python3.6.exe      python3.6m.exe     python3.exe        python3w.exe       pyvenv-3.6
pydoc3.6           python3.6-config   python3.6m-config  python3-config     pyvenv

I don't see python alone.

I found a tread where f5 suggested to install python.

https://forum.librepilot.org/index.php?topic=4155.msg28210#msg28210

I did but did not solve the issue. I don't know if I have to create a link or what will be the possible solution.

« Last Edit: June 14, 2018, 04:23:18 pm by zukenj »
FS-TH9X RC
F450 Clone
Revolution FC
EMAX 2213 935 KV
HK 30A ESC UBEC running BLHeli 14.4
10x4.5 Propellers
DJI Naza clone Ublox M8N GPS

zukenj

  • ***
  • 202
Re: Error compiling in Windows Msys2
« Reply #3 on: June 14, 2018, 04:36:29 pm »
I found the following.

When you run msys2 mingw 64-bit there is no LN to python, but if you run  msys2 mingw 32-bit there is a LN to python.

I will try with the 32 bit shell.

FS-TH9X RC
F450 Clone
Revolution FC
EMAX 2213 935 KV
HK 30A ESC UBEC running BLHeli 14.4
10x4.5 Propellers
DJI Naza clone Ublox M8N GPS

Re: Error compiling in Windows Msys2
« Reply #4 on: June 14, 2018, 04:51:53 pm »
I think I do recall something about needing to use the 32 bit shell.

zukenj

  • ***
  • 202
Re: Error compiling in Windows Msys2
« Reply #5 on: June 14, 2018, 08:53:58 pm »
No.

I got an error almost finishing the compilation.

mingw32-make[4]: *** No rule to make target 'C:/msys64/mingw32/bin/osgPlugins-3.6.1/mingw_osgdb_earth.dll', needed by 'C:/msys64/home/arman/librepilot/build/librepilot-gcs_release/lib/librepilot-gcs/osg/osgPlugins-3.6.1/mingw_osgdb_earth.dll'.  Stop.
mingw32-make[4]: Leaving directory 'C:/msys64/home/arman/librepilot/build/librepilot-gcs_release/src/libs/osgearth'
mingw32-make[3]: *** [Makefile:437: sub-osgearth-make_first-ordered] Error 2
mingw32-make[3]: Leaving directory 'C:/msys64/home/arman/librepilot/build/librepilot-gcs_release/src/libs'
mingw32-make[2]: *** [Makefile:44: sub-libs-make_first-ordered] Error 2
mingw32-make[2]: Leaving directory 'C:/msys64/home/arman/librepilot/build/librepilot-gcs_release/src'
mingw32-make[1]: *** [Makefile:43: sub-src-make_first-ordered] Error 2
mingw32-make[1]: Leaving directory 'C:/msys64/home/arman/librepilot/build/librepilot-gcs_release'
mingw32-make: *** [Makefile:308: gcs] Error 2

FS-TH9X RC
F450 Clone
Revolution FC
EMAX 2213 935 KV
HK 30A ESC UBEC running BLHeli 14.4
10x4.5 Propellers
DJI Naza clone Ublox M8N GPS

filnet

  • *****
  • 113
Re: Error compiling in Windows Msys2
« Reply #6 on: June 14, 2018, 09:36:20 pm »
LP compiles fine with mingw32 and mingw64.

Your are missing python2.
Another package was probably pulling it as a dependency but not anymore.
We should add it to the list of packages to install (https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/14876735/Windows+Building+and+Packaging)

To get python2 on mingw64, use this command:
Code: [Select]
pacman -S mingw-w64-x86_64-python2
To get python2 on mingw32, use this command:
Code: [Select]
pacman -S mingw-w64-i686-python2
The other compilation error is due to a recent upgrade of osg to version 3.6.1.
This broke osgEarth. I'll get it sorted out.
In the meantime, you can edit the LP Makefile and change the line 146 from:
Code: [Select]
GCS_WITH_OSGEARTH := 1to
Code: [Select]
GCS_WITH_OSGEARTH := 0


Re: Error compiling in Windows Msys2
« Reply #7 on: June 14, 2018, 11:52:40 pm »
Maybe it was the 64 bit version of Msys or what was it we used before Msys?  Something about that cross compile didn't work if it was 64 bit.

zukenj

  • ***
  • 202
Re: Error compiling in Windows Msys2
« Reply #8 on: June 15, 2018, 05:34:13 am »
filenet,

you are right after I did the GCS_WITH_OSGEARTH := 0 that I found in this tread
https://forum.librepilot.org/index.php?topic=4044.0

it compiled perfect.

Yes the python64 is needed for the 64-bit shell as python32 is for the 32-bit shell.

Thanks to filnet, and TheOtherCliff for all the help.

Now ready to test is the problem is windows with the oplink configuration.

Thanks again
FS-TH9X RC
F450 Clone
Revolution FC
EMAX 2213 935 KV
HK 30A ESC UBEC running BLHeli 14.4
10x4.5 Propellers
DJI Naza clone Ublox M8N GPS