Skip to content

[Issue]: musl does not define _SC_LEVEL1_DCACHE_SIZE #318

Open
@omcaif

Description

@omcaif

Problem Description

Failed to compile because of use of _SC_LEVEL1_DCACHE_SIZE

Operating System

Gentoo Musl

CPU

N/A

GPU

N/A

ROCm Version

6.4.1

ROCm Component

ROCR-Runtime

Steps to Reproduce

Try to compile on a musl system and encounter this error

In file included from /var/tmp/portage/dev-libs/rocr-runtime-6.4.1/work/ROCR-Runtime-rocm-6.4.1/runtime/hsa-runtime/core/inc/memory_region.h:52,
                 from /var/tmp/portage/dev-libs/rocr-runtime-6.4.1/work/ROCR-Runtime-rocm-6.4.1/runtime/hsa-runtime/core/inc/driver.h:49,
                 from /var/tmp/portage/dev-libs/rocr-runtime-6.4.1/work/ROCR-Runtime-rocm-6.4.1/runtime/hsa-runtime/core/inc/amd_kfd_driver.h:51,
                 from /var/tmp/portage/dev-libs/rocr-runtime-6.4.1/work/ROCR-Runtime-rocm-6.4.1/runtime/hsa-runtime/core/driver/kfd/amd_kfd_driver.cpp:43:
/var/tmp/portage/dev-libs/rocr-runtime-6.4.1/work/ROCR-Runtime-rocm-6.4.1/runtime/hsa-runtime/core/util/utils.h: In function 'void rocr::FlushCpuCache(const void*, size_t, size_t)':
/var/tmp/portage/dev-libs/rocr-runtime-6.4.1/work/ROCR-Runtime-rocm-6.4.1/runtime/hsa-runtime/core/util/utils.h:360:23: error: '_SC_LEVEL1_DCACHE_LINESIZE' was not declared in this scope
  360 |     long sz = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions