Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build in MSYS2+Mingw64 on windows 10 64 bits? #103

Open
retsyo opened this issue Jul 12, 2022 · 10 comments
Open

build in MSYS2+Mingw64 on windows 10 64 bits? #103

retsyo opened this issue Jul 12, 2022 · 10 comments

Comments

@retsyo
Copy link

retsyo commented Jul 12, 2022

as the title says, I am using windows 10, but I can't make a fresh python:

Any hints? Thanks

$ ./configure --enable-optimizations
...
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Misc/python.pc
config.status: creating Misc/python-embed.pc
config.status: creating Misc/python-config.sh
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
config.status: pyconfig.h is unchanged
creating Modules/Setup.local
creating Makefile


$ make
make: *** No rule to make target 'Modules/Setup.config', needed by 'Makefile'.  Stop.
@naveen521kk
Copy link
Member

Any hints?

I guess maybe you didn't set the default line ending as lf, in CI we do so

git config --global core.autocrlf false
git config --global core.eol lf

Afair, this error happened to me and cloning with lf line ending did fix the issue.
If that's not the issue, I'm not sure why it's happening.

@retsyo
Copy link
Author

retsyo commented Jul 16, 2022

even I run

           git config --global core.autocrlf false 
           git config --global core.eol lf 

I still get

$ ./configure --enable-optimizations
...
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Misc/python.pc
config.status: creating Misc/python-embed.pc
config.status: creating Misc/python-config.sh
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
config.status: pyconfig.h is unchanged
creating Modules/Setup.local
creating Makefile


$ make
make: *** No rule to make target 'Modules/Setup.config', needed by 'Makefile'.  Stop.

@naveen521kk
Copy link
Member

Then I think you didn't run autoreconf before running the configure script. (we didn't update after running it for some reason)

@retsyo
Copy link
Author

retsyo commented Jul 19, 2022

thanks, finnally I compiled python*.exe on windows 10 64bits in MSYS2+MingW64 by using

autoreconf
./configure --enable-optimizations
make 

however, I get

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_crypt                _dbm                  _gdbm
_posixshmem           _posixsubprocess      fcntl
grp                   nis                   ossaudiodev
pwd                   readline              resource
spwd                  syslog                termios
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  msvcrt                time


Failed to build these modules:
_asyncio              _bisect               _blake2
_bz2                  _codecs_cn            _codecs_hk
_codecs_iso2022       _codecs_jp            _codecs_kr
_codecs_tw            _contextvars          _csv
_ctypes               _ctypes_test          _curses
_curses_panel         _datetime             _decimal
_elementtree          _hashlib              _heapq
_json                 _lsprof               _lzma
_md5                  _msi                  _multibytecodec
_multiprocessing      _opcode               _overlapped
_pickle               _queue                _random
_sha1                 _sha256               _sha3
_sha512               _socket               _sqlite3
_ssl                  _statistics           _struct
_testbuffer           _testcapi             _testconsole
_testimportmultiple   _testinternalcapi     _testmultiphase
_tkinter              _uuid                 _xxsubinterpreters
_xxtestfuzz           _zoneinfo             array
audioop               binascii              cmath
math                  mmap                  pyexpat
select                unicodedata           winsound
xxlimited             xxlimited_35          zlib

It is so strange, even math module is not compiled

@lazka
Copy link
Member

lazka commented Jul 19, 2022

it should show you the build errors of each module before that summary

@retsyo
Copy link
Author

retsyo commented Jul 20, 2022

the message is too long, so I post it here: https://github.com/retsyo/misc_bugs/blob/main/cpython20220720.md

@lazka
Copy link
Member

lazka commented Jul 22, 2022

hard to say, everything fails to link..

@duanev
Copy link

duanev commented Jan 26, 2024

It would be nice to see autoreconf in the build docs somewhere... And currently on a msys2/mingw64 system, there are three versions of autoconf: 2.13, 2.69, and 2.71 - any preference?

@lazka
Copy link
Member

lazka commented Jan 26, 2024

Just install the autotools package, it will select the right version at runtime.

Note that the build is currently broken due to a regression in another package.

@duanev
Copy link

duanev commented Jan 27, 2024

Ah, I see, autotools picks a working combination of autoconf and automake... Oh and autoconf-archive is needed as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants