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

ld.exe unable to find import libraries #159

Open
clin1234 opened this issue Aug 15, 2024 · 2 comments
Open

ld.exe unable to find import libraries #159

clin1234 opened this issue Aug 15, 2024 · 2 comments

Comments

@clin1234
Copy link

While building a mixed C and Python wheel, I got the following error:

~ $ pip install -U llama_cpp_python
Requirement already satisfied: llama_cpp_python in c:\usersינשגכהד\scoop\apps\python-alpha\current\lib\site-packages (0.2.87)
Collecting llama_cpp_python
  Using cached llama_cpp_python-0.2.88.tar.gz (63.7 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: typing-extensions>=4.5.0 in c:\usersינשגכהד\scoop\apps\python-alpha\current\lib\site-packages (from llama_cpp_python) (4.12.2)
Requirement already satisfied: numpy>=1.20.0 in c:\usersינשגכהד\scoop\apps\python-alpha\current\lib\site-packages (from llama_cpp_python) (2.2.0.dev0)
Requirement already satisfied: diskcache>=5.6.1 in c:\usersינשגכהד\scoop\apps\python-alpha\current\lib\site-packages (from llama_cpp_python) (5.6.3)
Requirement already satisfied: jinja2>=2.11.3 in c:\usersינשגכהד\scoop\apps\python-alpha\current\lib\site-packages (from llama_cpp_python) (3.1.4)
Requirement already satisfied: MarkupSafe>=2.0 in c:\usersינשגכהד\scoop\apps\python-alpha\current\lib\site-packages (from jinja2>=2.11.3->llama_cpp_python) (2.1.5)
Building wheels for collected packages: llama_cpp_python
  Building wheel for llama_cpp_python (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for llama_cpp_python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [72 lines of output]
      *** scikit-build-core 0.10.3 using CMake 3.30.2 (wheel)
      *** Configuring CMake...
      loading initial cache file C:\Users\0BAC~1\AppData\Local\Temp\tmpgthsh4tw\build\CMakeInit.txt
      -- Building for: Ninja
      -- The C compiler identification is GNU 14.1.0
      -- The CXX compiler identification is GNU 14.1.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - failed
      -- Check for working C compiler: C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/cc.exe
      -- Check for working C compiler: C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/cc.exe - broken
      CMake Error at C:/Users/ךינשגכהד/scoop/apps/mingw-winlibs/14.2.0-12.0.0-r1/share/cmake-3.30/Modules/CMakeTestCCompiler.cmake:67 (message):
        The C compiler

          "C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/cc.exe"

        is not able to compile a simple test program.

        It fails with the following output:

          Change Dir: 'C:/Users/ךינשגכהד/AppData/Local/Temp/tmpgthsh4tw/build/CMakeFiles/CMakeScratch/TryCompile-a4a74x'

          Run Build Command(s): C:\Usersינשגכהד\scoop\apps\mingw-winlibs\current\bin\ninja.EXE -v cmTC_a86ce
          [1/2] C:\Usersינשגכהד\scoop\apps\w64devkit\current\bin\cc.exe    -o CMakeFiles/cmTC_a86ce.dir/testCCompiler.c.obj -c C:/Users/ךינשגכהד/AppData/Local/Temp/tmpgthsh4tw/build/CMakeFiles/CMakeScratch/TryCompile-a4a74x/testCCompiler.c
          [2/2] C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Users\ךינשגכהד\scoop\apps\w64devkit\current\bin\cc.exe   CMakeFiles/cmTC_a86ce.dir/testCCompiler.c.obj -o cmTC_a86ce.exe -Wl,--out-implib,libcmTC_a86ce.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
          FAILED: cmTC_a86ce.exe
          C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Users\ךינשגכהד\scoop\apps\w64devkit\current\bin\cc.exe   CMakeFiles/cmTC_a86ce.dir/testCCompiler.c.obj -o cmTC_a86ce.exe -Wl,--out-implib,libcmTC_a86ce.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find C:/Users/ךינשגכהד/scoop/apps/w64devkit/1.23.0/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find C:/Users/ךינשגכהד/scoop/apps/w64devkit/1.23.0/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/crtbegin.o: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lkernel32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -luser32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lgdi32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lwinspool: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lshell32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lole32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -loleaut32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -luuid: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lcomdlg32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -ladvapi32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lmingw32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lgcc: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lmingwex: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lmsvcrt: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lkernel32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lpthread: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -ladvapi32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lshell32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -luser32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lkernel32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lmingw32: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lgcc: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lmingwex: No such file or directory
          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lmsvcrt: No such file or directory

          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find -lkernel32: No such file or directory

          C:/Users/ךינשגכהד/scoop/apps/w64devkit/current/bin/ld.exe: cannot find C:/Users/ךינשגכהד/scoop/apps/w64devkit/1.23.0/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/crtend.o: No such file or directory

          collect2.exe: error: ld returned 1 exit status
          ninja: build stopped: subcommand failed.





        CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
        CMakeLists.txt:3 (project)


      -- Configuring incomplete, errors occurred!

      *** CMake configuration failed
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for llama_cpp_python
Failed to build llama_cpp_python
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (llama_cpp_python)
@skeeto
Copy link
Owner

skeeto commented Aug 15, 2024 via email

@clin1234
Copy link
Author

If it helps:
Screenshot 2024-07-27 121703

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

2 participants