Skip to content
TheChatArchiveThe Chat Archive
grok-3-mini-beta· xAIHugging Face LMArena Human Preference 140K

tdadmin@sandlogic:~/edgematrix/llama.cpp$ cmake -B build cmake --build build --config…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Qwenqwen3-235b-a22b’s answer.
  1. User

    tdadmin@sandlogic:~/edgematrix/llama.cpp cmake -B build cmake --build build --config Release Command 'cmake' not found, but can be installed with: sudo snap install cmake # version 4.0.2, or sudo apt install cmake # version 3.22.1-1ubuntu1.22.04.2 See 'snap info cmake' for additional versions. Command 'cmake' not found, but can be installed with: sudo snap install cmake # version 4.0.2, or sudo apt install cmake # version 3.22.1-1ubuntu1.22.04.2 See 'snap info cmake' for additional versions. tdadmin@sandlogic:~/edgematrix/llama.cpp sudo snap install cmake error: This revision of snap "cmake" was published using classic confinement and thus may perform arbitrary system changes outside of the security sandbox that snaps are usually confined to, which may put your system at risk.

       If you understand and want to proceed repeat the command including --classic.
    
  2. Assistant

    It looks like you're trying to build the Llama.cpp project, but CMake isn't installed on your system. The error messages indicate that CMake can be installed via either Snap or APT, but the Snap installation requires additional confirmation due to its "classic confinement" mode, which could pose security risks.

    Let me guide you through this step by step. I'll recommend the safer and more straightforward option first (using APT), as it's the standard package manager for Ubuntu and avoids the confinement issues.

    Recommended Option: Install CMake via APT

    Since you're on Ubuntu 22.04 (based on the error message), using APT is generally the best choice. It installs a stable version of CMake (3.22.1 in this case) without any security warnings.

    1. Update your package list (this ensures you get the latest available packages):

      sudo apt update
      
    2. Install CMake:

      sudo apt install cmake
      
      • This will install CMake version 3.22.1, which is more than sufficient for building projects like Llama.cpp.
      • You'll be prompted to enter your password and confirm the installation.
    3. Verify the installation: After installation, check if CMake is available:

      cmake --version
      

      You should see something like:

      cmake version 3.22.1
      
    4. Proceed with your original commands: Once CMake is installed, you can run the commands you tried earlier:

      cmake -B build
      cmake --build build --config Release
      

      This should build the Llama.cpp project without issues.

    Alternative Option: Install CMake via Snap (with Caution)

    If you specifically want the newer version available via Snap (4.0.2), you can proceed, but be aware of the risks. Snap packages with classic confinement can access and modify system files outside the usual sandbox, which might compromise your system's security. Only use this if you're comfortable with that or if you have a specific reason (e.g., needing the latest features).

    1. Install CMake via Snap with classic confinement:

      sudo snap install cmake --classic
      
      • This will install CMake version 4.0.2.
      • You'll need to confirm the command as it explicitly warns about the risks.
    2. Verify the installation:

      cmake --version
      

      You should see the Snap-installed version.

    3. Proceed with building: Run your CMake commands as before.

    Additional Advice

    • Why APT is preferred here: For most development tasks, including building C++ projects like Llama.cpp, CMake 3.22.1 from APT is perfectly fine and avoids unnecessary complications. Snap is useful for apps that need to be isolated, but it's overkill for a tool like CMake.
    • Potential issues: If you encounter any errors during the build process (e.g., related to dependencies), you might need to install additional packages like build-essential (for compilers) or git if it's not already installed:
      sudo apt install build-essential git
      
    • Troubleshooting: If the installation fails or you run into permission issues, double-check your internet connection and ensure your system is up to date. If you're still having problems, feel free to provide more details from the error messages.

    Once CMake is installed, you should be good to go with your Llama.cpp build. Let me know if you need further help!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.