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

karla

  • *****
  • 629
Re: Error compiling in Windows Msys2
« Reply #9 on: November 02, 2018, 08:53:53 am »
I know this is an old thread, but seems very relevant to continue.
I know the Msys package is broken but could be fixed with Filnets two actions mentioned here.

Maybe something new occurred, I just followed all instructions and did:

Quote
pacman -S mingw-w64-i686-python2
and
Quote
GCS_WITH_OSGEARTH := 0

but still it will not compile the package but ends with errors.
Any ideas ?

here are the details

Quote
ABC@DESKTOP-CDUNNSL MINGW32 ~/librepilot
# make package
- LibrePilot UAVObject Generator -
Done: processed 122 XML files and generated 122 objects with no ID collisions. Total size of the data fields is 5110 bytes.
generating flight code
 FWINFO    [fw|cc  ]  D:/msys32/home/ABC/librepilot/build/firmware/fw_coptercontrol/fw_coptercontrol.bin.firmware_info.c
 FWINFO    [fw|revo]  D:/msys32/home/ABC/librepilot/build/firmware/fw_revolution/fw_revolution.bin.firmware_info.c
 FWINFO    [fw|revn]  D:/msys32/home/ABC/librepilot/build/firmware/fw_revonano/fw_revonano.bin.firmware_info.c
 FWINFO    [fw|spk2]  D:/msys32/home/ABC/librepilot/build/firmware/fw_sparky2/fw_sparky2.bin.firmware_info.c
 FWINFO    [fw|oplm]  D:/msys32/home/ABC/librepilot/build/firmware/fw_oplinkmini/fw_oplinkmini.bin.firmware_info.c
 FWINFO    [fw|gps9]  D:/msys32/home/ABC/librepilot/build/firmware/fw_gpsplatinum/fw_gpsplatinum.bin.firmware_info.c

.
. too large text...
.

mingw32-make[3]: Entering directory 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release/src/share'
cd translations/ && ( test -e Makefile || D:/msys32/mingw32/bin/qmake.exe -o Makefile D:/msys32/home/ABC/librepilot/ground/gcs/src/share/translations/translations.pro 'CONFIG+=release osg copy_osg gstreamer copy_gstreamer silent' 'GCS_BIG_NAME="LibrePilot GCS"' GCS_SMALL_NAME=librepilot-gcs 'ORG_BIG_NAME="LibrePilot"' ORG_SMALL_NAME=librepilot 'WIKI_URL_ROOT="https://librepilot.atlassian.net/wiki/display/LPDOC/"' 'USAGETRACKER_URL="https://usagetracker.librepilot.org/"' GCS_LIBRARY_BASENAME= ) && D:/msys32/mingw32/bin/mingw32-make -f Makefile
mingw32-make[4]: Entering directory 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release/src/share/translations'
mingw32-make[4]: Leaving directory 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release/src/share/translations'
( test -e Makefile.copydata || D:/msys32/mingw32/bin/qmake.exe -o Makefile.copydata D:/msys32/home/ABC/librepilot/ground/gcs/src/share/copydata.pro 'CONFIG+=release osg copy_osg gstreamer copy_gstreamer silent' 'GCS_BIG_NAME="LibrePilot GCS"' GCS_SMALL_NAME=librepilot-gcs 'ORG_BIG_NAME="LibrePilot"' ORG_SMALL_NAME=librepilot 'WIKI_URL_ROOT="https://librepilot.atlassian.net/wiki/display/LPDOC/"' 'USAGETRACKER_URL="https://usagetracker.librepilot.org/"' GCS_LIBRARY_BASENAME= ) && D:/msys32/mingw32/bin/mingw32-make -f Makefile.copydata
mingw32-make[4]: Entering directory 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release/src/share'
mingw32-make[4]: Nothing to be done for 'first'.
mingw32-make[4]: Leaving directory 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release/src/share'
mingw32-make[3]: Leaving directory 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release/src/share'
mingw32-make[2]: Leaving directory 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release/src'
( test -e Makefile.copydata || D:/msys32/mingw32/bin/qmake.exe -o Makefile.copydata D:/msys32/home/ABC/librepilot/ground/gcs/copydata.pro 'CONFIG+=release osg copy_osg gstreamer copy_gstreamer silent' 'GCS_BIG_NAME="LibrePilot GCS"' GCS_SMALL_NAME=librepilot-gcs 'ORG_BIG_NAME="LibrePilot"' ORG_SMALL_NAME=librepilot 'WIKI_URL_ROOT="https://librepilot.atlassian.net/wiki/display/LPDOC/"' 'USAGETRACKER_URL="https://usagetracker.librepilot.org/"' GCS_LIBRARY_BASENAME= ) && D:/msys32/mingw32/bin/mingw32-make -f Makefile.copydata
mingw32-make[2]: Entering directory 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release'
mingw32-make[2]: *** No rule to make target 'D:/msys32/mingw32/bin/ssleay32.dll', needed by 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release/bin/ssleay32.dll'.  Stop.
mingw32-make[2]: Leaving directory 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release'
mingw32-make[1]: *** [Makefile:83: sub-copydata-pro-make_first-ordered] Error 2
mingw32-make[1]: Leaving directory 'D:/msys32/home/ABC/librepilot/build/librepilot-gcs_release'
mingw32-make: *** [Makefile:308: gcs] Error 2

ABC@DESKTOP-CDUNNSL MINGW32 ~/librepilot
#

best
Karl

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Error compiling in Windows Msys2
« Reply #10 on: November 02, 2018, 10:18:33 am »
Is the Msys installation up to date ?
Try
Code: [Select]
pacman -Syu
'D:/msys32/mingw32/bin/ssleay32.dll' is missing and only installed with older openssl package version (1.02) 
http://repo.msys2.org/mingw/i686/mingw-w64-i686-openssl-1.0.2.p-1-any.pkg.tar.xz

Maybe some package still need ssleay32.dll because is not updated/rebuild with current openssl version in MSys.

Re: Error compiling in Windows Msys2
« Reply #11 on: November 03, 2018, 12:43:34 am »
If you are feeling adventurous enough, I would suggest that you install Linux in a "dual boot" setup.  :)  You can select which OS to boot each time you power up or let it default after a configurable timeout.

By downloading and booting a Linux DVD, you can also just run Linux in a temporary fashion, from the DVD, without changing your hard disk, and things that look like they are written to disk are just stored in memory,  It is slow, and when you run out of memory you are stuck, and when you reboot, anything you did is gone, but you can install programs and run them and get used to the feel and command prompt.

If you have a writeable DVD drive and a big external USB drive for backup, installing Linux is just:
- clean big truly worthless junk off your PC so you won't be backing it up, 100meg and larger video files are a common source of big junk
- download Clonezilla Live and burn ISO image to CD or DVD
- download Linux ISO file and burn ISO image to DVD
- delete the ISO files because they don't need to be backed up
- boot Clonezilla CD and tell it to back up (select your drive and select your backup drive)
- boot Linux DVD, follow the instructions to do things like select language, time zone, etc. and verify that it will repartition your drive to shrink Windows to make space for Linux
- the final shrink, partition, install could take 30 minutes or 4 hours

If you don't have a writable DVD, it can still be done with a thumb drive, but it is more complicated.

Of course you can skip the backing up if there is nothing important on the PC.

There is UEFI vs. legacy.  I am running Windows 7 in legacy mode.  Legacy always works easily and is at least five times as easy as UEFI.  I can't really recommend this if you are running Windows in UEFI mode, unless you are a hard core geek with time on your hands and an attitude that says "failure is not an option."  ... but maybe it is easier than it was 3 years ago.

The default for all distros I have tried is to shrink the Windows partition and add a new partition for Linux to live in.  Generally, you just need to be sensible, read the prompts so that you understand not to do something like select an option that says "Erase whole disk and use whole disk for Linux".   :'(

I like Mint Mate 64 bit, because it is understandable to Windows users (but not exactly the same).  It doesn't try to act like an over grown smart phone with hidden stuff only accessible with swipe left/right, etc.

I really need to update my PCs.  The most recent thing I am running is Mint 18 when 19 has been out since June.

Link to 64 bit Linux Mint Mate 19:
https://linuxmint.com/edition.php?id=256
« Last Edit: November 03, 2018, 12:55:22 am by TheOtherCliff »

karla

  • *****
  • 629
Re: Error compiling in Windows Msys2
« Reply #12 on: November 03, 2018, 04:13:45 am »
Thank you Cliff,
this machine actually have Linux installed on a separate partition and also have a r/w unit.
However, not feel adventurous enough to explore it :) yet

Laurent,
What type of file is that? some zip? How to open it?
Quote
http://repo.msys2.org/mingw/i686/mingw-w64-i686-openssl-1.0.2.p-1-any.pkg.tar.xz
Yes, already tried updated all with pacman -Syu.

Re: Error compiling in Windows Msys2
« Reply #13 on: November 03, 2018, 04:32:46 am »
That is a tar file compressed with xz compression.  A tar file is an archive like a zip file.  The linux tar command would be first choice.  You should be able to use the tar command line utility built into your Windows hosted Msys2 Linux command prompt.

What directory to extract the files into is the question.  I would start by listing the archive to see if there are "full paths" on the files (there probably are), and try to match it up with the file system structure inside of Msys2.

For instructions try:
man tar

For extracting, generally:
tar -xvf tarfile.tar.compressionletters
does what you want once you are inside the directory you want the archive tree extracted into (like maybe the root of the Msys2 inside of Windows).

I think I recall that 7-zip might handle it native under Windows, and Winzip says it at least handles the .xz format, but then there is the .tar container.
« Last Edit: November 03, 2018, 04:43:40 am by TheOtherCliff »

karla

  • *****
  • 629
Re: Error compiling in Windows Msys2
« Reply #14 on: November 03, 2018, 05:55:52 am »
Thanks a lot guys

I downloaded winzip and copied the whole mingw32 directory over my previously installed mingw32 directory. There were several files that was not in there, just like Laurent said.
Then I run the make package again

look and behold it succeeded!

Quote
Processed 1 file, writing output:
warning: Generating version information for language "0000-TradChinese" without standard key "FileVersion"

Output: "D:\msys32\home\ABC\librepilot\build\LibrePilot-16.09+r735-gaba11f0-dirty_i686.exe"
Install: 7 pages (448 bytes), 11 sections (6 required) (180576 bytes), 1586 instructions (44408 bytes), 1503 strings (1411752 bytes), 6 language tables (2436 bytes).
Uninstall: 6 pages (384 bytes),
4 sections (1 required) (65664 bytes), 517 instructions (14476 bytes), 552 strings (29012 bytes), 6 language tables (2004 bytes).
Datablock optimizer saved 27170714 bytes (~7.3%).

Using lzma (compress whole) compression.

EXE header size:               70656 / 38400 bytes
Install code:                          (1640020 bytes)
Install data:                          (340976426 bytes)
Uninstall code+data:                   (214344 bytes)
Compressed data:            97891327 / 342830790 bytes
CRC (0x40FDA787):                  4 / 4 bytes

Total size:                 97961987 / 342869194 bytes (28.5%)

1 warning:
  Generating version information for language "0000-TradChinese" without standard key "FileVersion"

ABC@DESKTOP-CDUNNSL MINGW32 ~/librepilot
#