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.

Add support for MSYS2 based Python

See original GitHub issue

Hello! I am going to compile a helloworld script in MSYS2 on Windows x64. I have installed package mingw-w64-x86_64-python3 and Nuitka from git (I tested 0.6.1 and 0.6.2rc1). When I run python3 -m nuitka test.py --mingw I get: Error, cannot find 'python37m.lib' file. I found this file in MSVC compiled Python’s directory but I can’t use it there. I cannot use MSVC compiled Python because I am going to use a package for Python written in C99 and using some POSIX libraries.

Thanks for help!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Jan 19, 2019

@arkdlite I just succeeded in compiling with msys2, and more or less out of the box. It complained about missing crypt.h in the Python header file, so I did this:

pacman -S libcrypt-devel

I already had those, not sure if it’s automatic, or if I had sone those myself:

pacman -Qe | grep gcc
gcc 7.4.0-1
gcc-libs 7.4.0-1

And then this worked:

python bin/nuitka-run tests/basics/Asserts.py

But this one does not right away, although I think this may well have to do with exported symbols from the library, and could be fixable in Nuitka:

python2 bin/nuitka-run tests/basics/Asserts.py

Asserts.build/CompiledCellType.o:CompiledCellType.c:(.rdata$.refptr._PyGC_generation0[.refptr._PyGC_generation0]+0x0): Warnung: undefinierter Verweis auf »_PyGC_generation0«

Also nice, gcc is picked up from PATH automatically, so this is also an easy way to bootstrap things. Now let me check if that Python2 issue is easy to get by.

Yours, Kay

0reactions
zoolykacommented, Aug 21, 2019

I still got this Error, cannot find 'python37m.lib' file. error using latest MSYS2 and Nuitka 0.6.5. Also installed the above packages. Where can I find this file and where to put it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python - MSYS2
Python. Since the official CPython implementation doesn't support building with GCC/Clang on Windows and has its own Windows specific directory layout, ...
Read more >
3rd party libraries of Python cant be used on MSYS2 terminal ...
1 Answer 1 · Select the "MSYS2 MinGW 64-bit" shortcut or run mingw64.exe to start a MinGW 64-bit shell. (32-bit should work too.)...
Read more >
MSYS2 (MinGW) compilation guide - GemRB homepage
Install MSYS2 · Install build tools · Install dependencies · Get GemRB sources and build them · Configure and run the game ·...
Read more >
MSYS2 - Qt Wiki
MSYS2, MSYS2. Use HTTPS based secure connection and obtain MSYS2. Run the installer binary. Install MSYS2 in C:drive in "msys2" folder.
Read more >
Installation of Msys2 and MinGW64 on Windows - YouTube
eC Academy ( http://eCAcademy.US ) Elite On-line Computer Science Education Help you get prepared from high school to full stack developer.
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