Skip to content

'stdlib.h' file not found during 1st install on AMD/Windows #7595

Closed

Description

@rs38
(...)
In file included from \\?\C:\Users\Falco\AppData\Local\Temp\tmpfwwudrt2\hip_utils.c:2:
C:\Users\Falco\.unsloth\studio\unsloth_studio\Lib\site-packages\triton\backends\amd\include\hip/hip_runtime.h(49,10): fatal error:

      'stdlib.h' file not found

   49 | #include <stdlib.h>

The error you are encountering happens because the clang-cl.exe compiler (used by the Triton/ROCm backend in your Unsloth environment) cannot locate the standard C library headers. On Windows, files like stdlib.h are provided by the Windows SDK and Visual Studio C++ Build Tools, and your current terminal environment does not have the correct paths set to find them.

installation instruction are not mentioning the fix or would be nice to add it to the installer.

Here is how you can fix this issue:

  1. Install Visual Studio Build Tools
    If you haven't already installed the required C++ build tools, you need to add them via the Visual Studio Installer.

winget install Microsoft.VisualStudio.2022.BuildTools --override "--passive --wait --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions