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

LNK1104 (caused by path length) when building on Windows #14

Closed
James-E-A opened this issue Jan 23, 2024 · 3 comments
Closed

LNK1104 (caused by path length) when building on Windows #14

James-E-A opened this issue Jan 23, 2024 · 3 comments
Labels
wontfix This will not be worked on

Comments

@James-E-A
Copy link
Owner

James-E-A commented Jan 23, 2024

Quick fix:

md "C:\temp"
set "TMPDIR=C:\temp"
python -m pip install …

More information:


Original issue:

If I *manually download the sdist from pypy*, then run pip install pypqc-0.0.6.post1.tar.gz on the downloaded tarball itself, this error does not arise; for some reason beyond my comprehension, it only arises when you run pip install pypqc 💢

> python -m pip install -v pypqc
Using pip 23.3.2 from C:\…\Documents\code\pypqc\.venv-cpython\Lib\site-packages\pip (python 3.11)
Collecting pypqc
  Downloading pypqc-0.0.6.post1.tar.gz (710 kB)
     ---------------------------------------- 710.5/710.5 kB 3.0 MB/s eta 0:00:00
  Running command pip subprocess to install build dependencies
  Collecting cffi>=1.14.5
    Downloading cffi-1.16.0-cp311-cp311-win_amd64.whl.metadata (1.5 kB)
  Collecting setuptools>=49.5.0
    Downloading setuptools-69.0.3-py3-none-any.whl.metadata (6.3 kB)
  Collecting pycparser (from cffi>=1.14.5)
    Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
       ------------------------------------ 118.7/118.7 kB 690.8 kB/s eta 0:00:00
  Downloading cffi-1.16.0-cp311-cp311-win_amd64.whl (181 kB)
     ---------------------------------------- 181.5/181.5 kB 3.6 MB/s eta 0:00:00
  Downloading setuptools-69.0.3-py3-none-any.whl (819 kB)
     ---------------------------------------- 819.5/819.5 kB 7.4 MB/s eta 0:00:00
  Installing collected packages: setuptools, pycparser, cffi
  Successfully installed cffi-1.16.0 pycparser-2.21 setuptools-69.0.3
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  …
  running egg_info
  writing pypqc.egg-info\PKG-INFO
  writing dependency_links to pypqc.egg-info\dependency_links.txt
  writing requirements to pypqc.egg-info\requires.txt
  writing top-level names to pypqc.egg-info\top_level.txt
  reading manifest file 'pypqc.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*.py[cio]' found under directory 'pqc'
  warning: no previously-included files matching '*.py[co]' found under directory 'cffi_modules'
  warning: no files found matching '*' under directory 'Modules\PQClean\common\*\*\clean'
  adding license file 'LICENSE.txt'
  writing manifest file 'pypqc.egg-info\SOURCES.txt'
  Getting requirements to build wheel ... done
  Running command pip subprocess to install backend dependencies
  Collecting wheel
    Downloading wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
  Downloading wheel-0.42.0-py3-none-any.whl (65 kB)
     ---------------------------------------- 65.4/65.4 kB 393.8 kB/s eta 0:00:00
  Installing collected packages: wheel
  Successfully installed wheel-0.42.0
  Installing backend dependencies ... done
  Running command Preparing metadata (pyproject.toml)
  …
  running dist_info
  creating C:\…\AppData\Local\Temp\pip-modern-metadata-qdr1k4sg\pypqc.egg-info
  writing C:\…\AppData\Local\Temp\pip-modern-metadata-qdr1k4sg\pypqc.egg-info\PKG-INFO
  writing dependency_links to C:\…\AppData\Local\Temp\pip-modern-metadata-qdr1k4sg\pypqc.egg-info\dependency_links.txt
  writing requirements to C:\…\AppData\Local\Temp\pip-modern-metadata-qdr1k4sg\pypqc.egg-info\requires.txt
  writing top-level names to C:\…\AppData\Local\Temp\pip-modern-metadata-qdr1k4sg\pypqc.egg-info\top_level.txt
  writing manifest file 'C:\…\AppData\Local\Temp\pip-modern-metadata-qdr1k4sg\pypqc.egg-info\SOURCES.txt'
  reading manifest file 'C:\…\AppData\Local\Temp\pip-modern-metadata-qdr1k4sg\pypqc.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*.py[cio]' found under directory 'pqc'
  warning: no previously-included files matching '*.py[co]' found under directory 'cffi_modules'
  warning: no files found matching '*' under directory 'Modules\PQClean\common\*\*\clean'
  adding license file 'LICENSE.txt'
  writing manifest file 'C:\…\AppData\Local\Temp\pip-modern-metadata-qdr1k4sg\pypqc.egg-info\SOURCES.txt'
  creating 'C:\…\AppData\Local\Temp\pip-modern-metadata-qdr1k4sg\pypqc-0.0.6.post1.dist-info'
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: cffi>=1.0.0 in c:\…\documents\code\pypqc\.venv-cpython\lib\site-packages (from pypqc) (1.16.0)
Requirement already satisfied: pycparser in c:\…\documents\code\pypqc\.venv-cpython\lib\site-packages (from cffi>=1.0.0->pypqc) (2.21)
Building wheels for collected packages: pypqc
  Running command Building wheel for pypqc (pyproject.toml)
  …
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-cpython-311
  creating build\lib.win-amd64-cpython-311\pqc
  copying pqc\demo.py -> build\lib.win-amd64-cpython-311\pqc
  copying pqc\_util.py -> build\lib.win-amd64-cpython-311\pqc
  copying pqc\__init__.py -> build\lib.win-amd64-cpython-311\pqc
  copying pqc\__main__.py -> build\lib.win-amd64-cpython-311\pqc
  running egg_info
  writing pypqc.egg-info\PKG-INFO
  writing dependency_links to pypqc.egg-info\dependency_links.txt
  writing requirements to pypqc.egg-info\requires.txt
  writing top-level names to pypqc.egg-info\top_level.txt
  reading manifest file 'pypqc.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*.py[cio]' found under directory 'pqc'
  warning: no previously-included files matching '*.py[co]' found under directory 'cffi_modules'
  warning: no files found matching '*' under directory 'Modules\PQClean\common\*\*\clean'
  adding license file 'LICENSE.txt'
  writing manifest file 'pypqc.egg-info\SOURCES.txt'
  C:\…\AppData\Local\Temp\pip-build-env-gy57te5d\overlay\Lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'pqc.kem' is absent from the `packages` configuration.
  !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'pqc.kem' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'pqc.kem' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'pqc.kem' to be distributed and are
          already explicitly excluding 'pqc.kem' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  C:\…\AppData\Local\Temp\pip-build-env-gy57te5d\overlay\Lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'pqc.sign' is absent from the `packages` configuration.
  !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'pqc.sign' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'pqc.sign' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'pqc.sign' to be distributed and are
          already explicitly excluding 'pqc.sign' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  creating build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\__init__.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\hqc_128.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\hqc_192.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\hqc_256.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\kyber1024.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\kyber512.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\kyber768.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\mceliece348864.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\mceliece460896.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\mceliece6688128.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\mceliece6960119.py -> build\lib.win-amd64-cpython-311\pqc\kem
  copying pqc\kem\mceliece8192128.py -> build\lib.win-amd64-cpython-311\pqc\kem
  creating build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\dilithium2.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\dilithium3.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\dilithium5.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\falcon_1024.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\falcon_512.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_sha2_128f_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_sha2_128s_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_sha2_192f_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_sha2_192s_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_sha2_256f_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_sha2_256s_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_shake_128f_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_shake_128s_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_shake_192f_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_shake_192s_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_shake_256f_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  copying pqc\sign\sphincs_shake_256s_simple.py -> build\lib.win-amd64-cpython-311\pqc\sign
  running build_ext
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_shake_256s_simple_clean.c'
  creating build\temp.win-amd64-cpython-311
  creating build\temp.win-amd64-cpython-311\Release
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_shake_256s_simple_clean.c'
  already up-to-date
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_shake_192s_simple_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_shake_192f_simple_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_shake_128s_simple_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_shake_128f_simple_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_sha2_256s_simple_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_sha2_256f_simple_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_sha2_192s_simple_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_sha2_192f_simple_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_sha2_128s_simple_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libsphincs_sha2_128f_simple_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libmceliece8192128f_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libmceliece6960119f_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libmceliece6688128f_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libmceliece460896f_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libmceliece348864f_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libkyber1024_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libkyber768_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libkyber512_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libhqc_256_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libhqc_192_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libhqc_128_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libfalcon_1024_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libfalcon_512_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libdilithium5_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libdilithium3_clean.c'
  generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\pqc._lib.libdilithium2_clean.c'
  …
  building 'pqc._lib.libsphincs_sha2_128f_simple_clean' extension
  creating build\temp.win-amd64-cpython-311\Release\Modules\PQClean\crypto_sign\sphincs-sha2-128f-simple
  creating build\temp.win-amd64-cpython-311\Release\Modules\PQClean\crypto_sign\sphincs-sha2-128f-simple\clean
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common/randombytes.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common/randombytes.obj /TC
  randombytes.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common/sha2.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common/sha2.obj /TC
  sha2.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/address.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/address.obj /TC
  address.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/context_sha2.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/context_sha2.obj /TC
  context_sha2.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/fors.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/fors.obj /TC
  fors.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/hash_sha2.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/hash_sha2.obj /TC
  hash_sha2.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/merkle.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/merkle.obj /TC
  merkle.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/sign.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/sign.obj /TC
  sign.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/thash_sha2_simple.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/thash_sha2_simple.obj /TC
  thash_sha2_simple.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/utils.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/utils.obj /TC
  utils.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/utilsx1.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/utilsx1.obj /TC
  utilsx1.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/wots.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/wots.obj /TC
  wots.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/wotsx1.c /Fobuild\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/wotsx1.obj /TC
  wotsx1.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean -IModules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common -IC:\…\Documents\code\pypqc\.venv-cpython\include "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcbuild\temp.win-amd64-cpython-311\Release\pqc._lib.libsphincs_sha2_128f_simple_clean.c /Fobuild\temp.win-amd64-cpython-311\Release\build\temp.win-amd64-cpython-311\Release\pqc._lib.libsphincs_sha2_128f_simple_clean.obj /TC
  pqc._lib.libsphincs_sha2_128f_simple_clean.c
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\…\Documents\code\pypqc\.venv-cpython\libs "/LIBPATH:C:\Program Files\Python311\libs" "/LIBPATH:C:\Program Files\Python311" /LIBPATH:C:\…\Documents\code\pypqc\.venv-cpython\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x64" Advapi32.lib /EXPORT:PyInit_libsphincs_sha2_128f_simple_clean build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common/randombytes.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common/sha2.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/address.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/context_sha2.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/fors.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/hash_sha2.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/merkle.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/sign.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/thash_sha2_simple.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/utils.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/utilsx1.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/wots.obj build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/wotsx1.obj build\temp.win-amd64-cpython-311\Release\build\temp.win-amd64-cpython-311\Release\pqc._lib.libsphincs_sha2_128f_simple_clean.obj /OUT:build\lib.win-amd64-cpython-311\pqc\_lib\libsphincs_sha2_128f_simple_clean.pyd /IMPLIB:build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common\libsphincs_sha2_128f_simple_clean.lib
  LINK : fatal error LNK1104: cannot open file 'build\temp.win-amd64-cpython-311\Release\Modules/PQClean/crypto_sign/sphincs-sha2-128f-simple/clean/../../../common\libsphincs_sha2_128f_simple_clean.exp'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
  error: subprocess-exited-with-error

  × Building wheel for pypqc (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: 'C:\…\Documents\code\pypqc\.venv-cpython\Scripts\python.exe' 'C:\…\Documents\code\pypqc\.venv-cpython\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py' build_wheel 'C:\…\AppData\Local\Temp\tmpwxd5lsyr'
  cwd: C:\…\AppData\Local\Temp\pip-install-84_x42zq\pypqc_fe8352d51cfd4bac9fc3151f6c1acead
  Building wheel for pypqc (pyproject.toml) ... error
  ERROR: Failed building wheel for pypqc
Failed to build pypqc
ERROR: Could not build wheels for pypqc, which is required to install pyproject.toml-based projects
@James-E-A
Copy link
Owner Author

James-E-A commented Jan 25, 2024

Problem is that MSVC doesn't support long filepaths. (Like, totally doesn't support them, even with a registry entry.)

https://developercommunity.visualstudio.com/t/clexe-compiler-driver-cannot-handle-long-file-path/975889

@James-E-A James-E-A changed the title Compile error on Windows, only when installing from PyPI LNK1104 (caused by path length) when building on Windows Jan 26, 2024
@James-E-A
Copy link
Owner Author

Other than better error messages, there's basically nothing we can do about this.

Gonna go ahead and close this issue as Unfixable on account of:

  1. This isn't even a bug in our code or tooling anyway

  2. Setuptools has already been pinged about mitigating this

  3. #13 is already tracking the better error messages

  4. At least the CI builds are working around this issue for 99% of users

@James-E-A James-E-A closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2024
@James-E-A James-E-A added the wontfix This will not be worked on label Feb 16, 2024
@James-E-A James-E-A pinned this issue Feb 16, 2024
@James-E-A
Copy link
Owner Author

James-E-A commented Feb 26, 2024

Technically, I guess we could fix this ourselves by rolling our own implementation of setuptools._distutils.msvccompiler? 🥴

I'm not up for figuring out how to do that at the moment, though; just tracing the tangled mess of codepaths to diagnose the issue in the first place was a big enough task.

(Open to PRs, just not planning to do it myself in the forseeable future.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant