Skip to content

Unable to find c compiler #1495

@RampedIndent

Description

@RampedIndent

Package

ComfyUi
llama-cpp-python

When did the issue occur?

Installing the Package

What GPU / hardware type are you using?

AMD Radeon RX 7800 XT

What happened?

When i attempt to install the llama-cpp-python as a python dependency in comfyui it fails to install complaining about missing the c compiler.

I have tried setting the enviroment variable for the c compiler manually and passing it to the appimage but that does not appear to work.

sh -c "env CMAKE_C_COMPILER=/nix/store/vr15iyyykg9zai6fpgvhcgyw7gckl78w-gcc-wrapper-14.3.0/bin/gcc appimage-run /home/rampedindent/Apps/StabilityMatrix.AppImage &"

It could just be nixos weirdness but everything else seems to work fine.

Console output

So im having an issue when i try to install the llama-cpp-python package

Using Python 3.12.11 environment at: venv
Resolved 6 packages in 99ms
Building llama-cpp-python==0.3.16
× Failed to build llama-cpp-python==0.3.16
├─▶ The build backend returned an error
╰─▶ Call to scikit_build_core.build.build_wheel failed (exit status: 1)

  [stdout]
  *** scikit-build-core 0.11.6 using CMake 4.1.2 (wheel)
  *** Configuring CMake...
  loading initial cache file /tmp/tmprauh_3xo/build/CMakeInit.txt
  -- Configuring incomplete, errors occurred!

  [stderr]
  CMake Error at
  /usr/share/cmake-4.1/Modules/CMakeDetermineCCompiler.cmake:48 (message):
    Could not find compiler set in environment variable CC:

    cc -pthread.
  Call Stack (most recent call first):
    CMakeLists.txt:3 (project)

  
  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

  *** CMake configuration failed

  hint: This usually indicates a problem with the package or the build
  environment.

Error: StabilityMatrix.Core.Exceptions.ProcessException: pip install failed with code 1: 'Using Python 3.12.11 environment at: venv\nResolved 6 packages in 99ms\n Building llama-cpp-python==0.3.16\n \u00d7 Failed to build llama-cpp-python==0.3.16\n \u251c\u2500\u25b6 The build backend returned an error\n \u2570\u2500\u25b6 Call to scikit_build_core.build.build_wheel failed (exit status: 1)\n\n [stdout]\n *** scikit-build-core 0.11.6 using CMake 4.1.2 (wheel)\n *** Configuring CMake...\n loading initial cache file /tmp/tmprauh_3xo/build/CMakeInit.txt\n -- Configuring incomplete, errors occurred!\n\n [stderr]\n CMake Error at\n /usr/share/cmake-4.1/Modules/CMakeDetermineCCompiler.cmake:48 (message):\n Could not find compiler set in environment variable CC:\n\n cc -pthread.\n Call Stack (most recent call first):\n CMakeLists.txt:3 (project)\n\n \n CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage\n CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage\n\n *** CMake configuration failed\n\n hint: This usually indicates a problem with the package or the build\n environment.\n'
at StabilityMatrix.Core.Python.UvVenvRunner.PipInstall(ProcessArgs args, Action1 outputDataReceived) at StabilityMatrix.Core.Models.PackageModification.PipStep.ExecuteAsync(IProgress1 progress)
at StabilityMatrix.Core.Models.PackageModification.PipStep.ExecuteAsync(IProgress1 progress) at StabilityMatrix.Core.Models.PackageModification.PackageModificationRunner.ExecuteSteps(IEnumerable1 steps)


### Version

V2.15.4

### What Operating System are you using?

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions