question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make west posix compliant also for Cygwin

See original GitHub issue

As an avid Cygwin user, I like to to be able to also use Cygwin on all windows machines. Since Cygwin is almost completely POSIX compliant, I don’t see a reason why west treating it as something weird. It’s simply bash and python…

$ west --help

Traceback (most recent call last):
  File "/usr/bin/west", line 10, in <module>
    sys.exit(main())
  File "/cygdrive/c/cygwin64/lib/python3.8/site-packages/west/main.py", line 562, in main
    config.read_config()
  File "/cygdrive/c/cygwin64/lib/python3.8/site-packages/west/configuration.py", line 92, in read_config
    config.read(_gather_configs(configfile), encoding='utf-8')
  File "/cygdrive/c/cygwin64/lib/python3.8/site-packages/west/configuration.py", line 215, in _gather_configs
    ret.append(_location(ConfigFile.SYSTEM))
  File "/cygdrive/c/cygwin64/lib/python3.8/site-packages/west/configuration.py", line 191, in _location
    raise ValueError('unsupported platform ' + plat)
ValueError: unsupported platform CYGWIN_NT-6.3-9600

Can someone enlighten me as what problems this could create, if any?

Possibly related to #259.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
mbolivarcommented, Sep 13, 2019

Oh my goodness. Thank you so much for the details. I’ll keep all this in mind in case we ever need to modify environment variables from west and expect them to map down.

Right now we do set ZEPHYR_BASE, but that only needs to propagate to subprocesses, so either I assume it’s working for you or you have it set in the parent environment via some other means.

I’ve posted #309 based on your information, for which I’m very grateful.

1reaction
mbolivarcommented, Sep 5, 2019

Yeah, I don’t see a clear way to get the raw Windows %PROGRMADATA%, but the mintty (bash) shell does add it as: $ProgramData. But it’s not clear how general this is across different languages etc.

I like your idea of using os.environ. But I’m confused about the case difference (PROGRAMDATA vs. ProgramData). Are environment variables case insensitive in Cygwin? Is there a map from Cygwin variables to the underlying Windows ones?

WEST_CONFIG_SYSTEM=none west list

Be careful. If you write to any system config values, it will create a file named “none” in the current working directory and put them there. Not always what you want.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cygwin User's Guide
Cygwin is a Linux-like environment for Windows. It consists of a DLL (cygwin1.dll), which acts as an emulation layer providing substantial POSIX (Portable ......
Read more >
Using POSIX Supertest on Windows with Cygwin - Solid Sands
USING POSIX SUPERTEST ON MICROSOFT WINDOWS. SuperTest is available in two versions: a native Windows version and a POSIX version. The native Windows...
Read more >
Creating a file using the Cygwin environment
Cygwin is a Linux-like environment for Windows. It gives you programs and tools common on a Linux environment without the cost of running...
Read more >
Creating a Linux-Windows hybrid system with Cygwin - Red Hat
The default is C:\cygwin64, but I change it to C:\cygwin to make future me a little happier. I also allow all users to...
Read more >
RE: Version 1.8.1 does not compile on Cygwin 1.7.14 - Jason Pyeron
The > problems have their root in > > adbc0b6b6e57c11ca49779d01f549260a920a97d > > Cygwin's entire goal is a completely POSIX compliant > environment ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found