hiveeyes / terkin-datalogger

Datalogger for MicroPython and CPython.
https://terkin.org
GNU Affero General Public License v3.0
59 stars 28 forks source link

Problems invoking "make" on WSL #45

Closed poesel closed 4 years ago

poesel commented 4 years ago

Running 'make' on Win10 produces a slightly weird output. First there are two faults from 'sh'. Second: in the rules the first character is strangely missing.

markus@Calvin:/mnt/c/Users/Markus/Documents/GitHub/hiveeyes-micropython-firmware$ make
/bin/sh: 1: test: Linux: unexpected operator
Available rules:

 etup                         Prepare sandbox environment and download requirements
 erkin-agent                  Run the MicroTerkin Agent, e.g. "make terkin-agent action=maintain"
 rovide-wifi                  Load the MiniNet module to the device and start a WiFi access point.
 onnect-wifi                  Load the MiniNet module to the device and start a WiFi STA connection.
 p-address                    Load the MiniNet module to the device and get IP address.
 py-compile                   Compile all library files using mpy-cross
 ecycle                       Upload framework, program and settings and restart attached to REPL
 ecycle-ng                    Upload framework, program and settings and restart device
 ketch-and-run                Upload program and settings and restart attached to REPL
 yboard-install               Pyboard-D transfer
 nstall                       Install all files to the device, using rshell
 nstall-ftp                   Install all files to the device, using FTP
 nstall-rshell                Install all files to the device, using USB (rshell)
 nstall-ng                    Install all files to the device, using best method
 name                         Display operating system information
 rint-%                       It allows you to quickly get the value of any makefile variable, e.g. "make print-MCU_PORT"
 estart-device-http           Restart device using the HTTP API
 hip_id                       Display chip_id
 nstall-pycom-firmware        Install Pycom firmware on device
 ormat-flash                  Format flash filesystem with LittleFS
 rase-fs                      Erase flash filesystem
 rase-device                  Erase flash filesystem
 repare-modem-upgrade         Put Sequans modem into recovery mode to prepare firmware upgrade
 ist-serials                  List all serial interfaces
 eset-port                    Reset port or even USB subsystem
 ist-boards                   List all MicroPython boards
 evice-info                   Inquire device information
 onsole                       Open console over serial or telnet
 shell                        Run interactive rshell on the device
 epl                          Run interactive REPL on the device
 eset-device                  Send reset command to device
 eset-device-attached         Send reset command to device and keep the REPL shell attached

/bin/sh: 2: @#: not found
Documentation:

Please check https://community.hiveeyes.org/t/operate-the-terkin-datalogger-sandbox/2332 in order to get an idea how to operate this software sandbox.

Have fun!

poesel commented 4 years ago

Edit: the first missing character is actually a space. That was eaten by formatting. Strangely the line with 'print-% ...' is correct.

poesel commented 4 years ago

Another thing: 'make setup' needs curl which - I think - wasn't mentioned anywhere.

amotl commented 4 years ago

Thanks for reporting your observations!

  1. Does export TERM=xterm-256color makes this work for you?
  2. Feel free to add a remark about the missing curl to the setup documentation.
poesel commented 4 years ago
  1. tried & no (its already a color terminal)
  2. will do for the next PR
amotl commented 4 years ago

Would you please try again, @poesel?

poesel commented 4 years ago

Tried - no joy :(

amotl commented 4 years ago

The reports about unexpected operator and @#: not found should have been mitigated through d7ffaaf, make setup is now checking for the presence of wget and curl through 8ad4b87.

I also checked invoking make help on macOS (GNU Make 3.81) and Linux (GNU Make 4.1), where the formatting is fine.

What else are you still observing on your workstation and which version of Make are you running actually?

poesel commented 4 years ago

GNU Make 4.2.1

Main 'issue' is that the first character is still missing. I've also checked that it not a black on black character.

'make | less' gives me this:

ESC[1mAvailable rules:ESC(BESC[m

ESC[36msetup ESC(BESC[m Prepare sandbox environment and download requirements^M ESC[36mterkin-agent ESC(BESC[m Run the MicroTerkin Agent, e.g. "make terkin-agent action=maintain"^M ESC[36mprovide-wifi ESC(BESC[m Load the MiniNet module to the device and start a WiFi access point.^M ...

'ESC[36msetup...' is printed as ' etup...' in dark blue (in the terminal, not in less of course)

amotl commented 4 years ago

Thanks. Maybe https://github.com/microsoft/WSL/issues/1173 gives some more hints to work around that problem on WSL. Do you actually observe similar things on WSL, @ClemensGruber?

poesel commented 4 years ago

Not an issue any more. Did nothing on my side.

amotl commented 4 years ago

@thiasB probably fixed that within 3704ad00. Thanks again!