Next firmware build
« on: March 23, 2020, 03:06:18 pm »
Hi, after some time now, I'm trying to compile a next fw for my revolution build with no success,
I followed the steps in the ”Windows Building and Packaging” and got this output - see attachment.
Please advise,
Thanks.

Re: Next firmware build
« Reply #1 on: March 25, 2020, 08:46:45 am »
I see syntax errors happening when it is running the python build scripts.  To me that says you need a different numeric version of Python.  At least that is what I would try.

Also, make sure you have any needed additional Python packages installed.

Re: Next firmware build
« Reply #2 on: March 25, 2020, 09:53:29 am »
Thanks, I'll try to fix it.

jdl

  • ***
  • 246
Re: Next firmware build
« Reply #3 on: March 25, 2020, 10:54:26 am »

You can try installing python2:

From MinGw32 console, try installing Python ?
Code: [Select]
pacman -S --needed mingw-w64-i686-python2

Go to ...mingw32\bin directory, delete (or rename to something else) existing python.exe (currently version 3) and then finally rename (or copy and rename the copied file) python2.7.exe (version 2) to python.exe.

This may be a dirty solution but it works for me.

Re: Next firmware build
« Reply #4 on: March 25, 2020, 08:38:24 pm »
Thanks for advice,
I'll try this way too.
All the best!

Re: Next firmware build
« Reply #5 on: March 25, 2020, 09:16:49 pm »
Hi, tried, still I'm doing something wrong....
See file attached.
Thanks for your effort.

jdl

  • ***
  • 246
Re: Next firmware build
« Reply #6 on: March 25, 2020, 11:28:18 pm »
Just to verify you have python 2 installed: what do you see in MinGw32 console when you type python and press ENTER?

This is what I get:

Code: [Select]
# python
Python 2.7.16 (default, Apr 23 2019, 08:06:09)  [GCC 7.4.0 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Re: Next firmware build
« Reply #7 on: March 26, 2020, 05:44:49 am »
(got distracted before pressing Post :) )
It's good standard practice to get rid of the "first" error (repeat) :) and it looks like there is still something wrong with python.  I might suggest that you go over the setup with a fine toothed comb to see if something needs to be done differently.

I have an older Linux distro and here is my python info:
cliff@i925 ~ $ which python
/usr/bin/python
cliff@i925 ~ $ ll /usr/bin/python
lrwxrwxrwx 1 root root 9 Jun 16  2014 /usr/bin/python -> python2.7
cliff@i925 ~ $ python --version
Python 2.7.6

What does your setup show for this stuff?

Re: Next firmware build
« Reply #8 on: March 26, 2020, 09:21:46 am »
@jdl
"Octav@Octavian MINGW64 ~
$ python
Python 3.8.2 (default, Feb 27 2020, 05:27:33)  [GCC 9.2.0 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
"

Re: Next firmware build
« Reply #9 on: March 26, 2020, 09:25:32 am »
(got distracted before pressing Post :) )
It's good standard practice to get rid of the "first" error (repeat) :) and it looks like there is still something wrong with python.  I might suggest that you go over the setup with a fine toothed comb to see if something needs to be done differently.

I have an older Linux distro and here is my python info:
cliff@i925 ~ $ which python
/usr/bin/python
cliff@i925 ~ $ ll /usr/bin/python
lrwxrwxrwx 1 root root 9 Jun 16  2014 /usr/bin/python -> python2.7
cliff@i925 ~ $ python --version
Python 2.7.6

What does your setup show for this stuff?

Octav@Octavian MINGW64 ~
$ which python
/mingw64/bin/python
Octav@Octavian MINGW64 ~
$ python --version
Python 3.8.2
I see it's a newer version...

jdl

  • ***
  • 246
Re: Next firmware build
« Reply #10 on: March 26, 2020, 10:15:19 am »
Did you follow these steps? If so, you should see python 2.x version reported.


Go to ...mingw32\bin directory, delete (or rename to something else) existing python.exe (currently version 3) and then finally rename (or copy and rename the copied file) python2.7.exe (version 2) to python.exe.



Btw, just spotted you are using mingw64 console. Try using mingw32 instead, despite you have 64bit MSYS! I've never succeeded building package in mingw64, so only using mingw32.
Furthermore, if you have followed f5soh guideline for installing python2, it was installed in mingw32\bin directory!

From MinGw32 console, try installing Python ?
Code: [Select]
pacman -S --needed mingw-w64-i686-python2

Re: Next firmware build
« Reply #11 on: March 26, 2020, 12:38:40 pm »
Did you follow these steps? If so, you should see python 2.x version reported.


Go to ...mingw32\bin directory, delete (or rename to something else) existing python.exe (currently version 3) and then finally rename (or copy and rename the copied file) python2.7.exe (version 2) to python.exe.



Btw, just spotted you are using mingw64 console. Try using mingw32 instead, despite you have 64bit MSYS! I've never succeeded building package in mingw64, so only using mingw32.
Furthermore, if you have followed f5soh guideline for installing python2, it was installed in mingw32\bin directory!

From MinGw32 console, try installing Python ?
Code: [Select]
pacman -S --needed mingw-w64-i686-python2
Octav@Octavian MINGW32 ~
$ pacman -S --needed mingw-w64-i686-python2
warning: mingw-w64-i686-python2-2.7.17-1 is up to date -- skipping
there is nothing to do ...

I'll try building with MINGW32 the package ... and see further.
Thanks! 

Later edit: Reinstalled 32bit version and followed : "Go to ...mingw32\bin directory, delete (or rename to something else) existing python.exe (currently version 3) and then finally rename (or copy and rename the copied file) python2.7.exe (version 2) to python.exe."
Success!

and some more errors:

E:/msys32/mingw32/share/qt5/mkspecs/common/windows-vulkan.conf:1: Cannot find feature windows_vulkan_sdk
E:/msys32/mingw32/share/qt5/mkspecs/common/windows-vulkan.conf:1: Cannot find feature windows_vulkan_sdk
Project MESSAGE: Using python interpreter: "python"
WARNING: headers.path is not defined: install target not created

Project ERROR: gstreamer-app-1.0 development package not found
mingw32-make: *** [Makefile:296: E:/msys32/home/Octav/librepilot/build/librepilot-gcs_release/Makefile] Error 3


Thanks again.
« Last Edit: March 26, 2020, 02:24:38 pm by octavvian »

jdl

  • ***
  • 246
Re: Next firmware build
« Reply #12 on: March 28, 2020, 09:28:29 pm »
I've yesterday installed a fresh build environment using Windows Building and Packaging manual, as usual. Then installed python2 and tried to build librepilot next. No success!

Seems like the code is no more compilable with the current C compiler versions, they had become quite restrictive. While librepilot code could (and probably will) be fixed to comply with the C compiler restrictions, I prefer to use my older working build environment to make my private builds (minor mods on next 735), until the main repository is fixed.

If you find it helpful, here is a backup of my working msys32, I have it running on 32bit and 64bit Windows7. Unrar it in drive E !

Link: https://drive.google.com/u/0/uc?id=1ULDYV4zcf3DUr8-fty9ZfzaM32ZWrUGr&export=download



Edit: Download link updated.
« Last Edit: December 31, 2021, 09:06:29 am by jdl »

Re: Next firmware build
« Reply #13 on: March 29, 2020, 10:32:29 am »
Thanks a lot for your effort! :)