Skip to content

[C++] unknown argument: '-Kc++' #47790

Closed
Closed

Description

@Chrismarsh

Describe the bug, including details regarding any error messages, version, and platform.

I'm trying to build arrow@19.0.1 which pulls in mimalloc (ARROW_MIMALLOC_BUILD_VERSION=v2.0.6). I am using the Intel OneAPI 2025.x compiler suite, which is Clang/LLVM based. This check doesn't seem to correctly detect this compiler:
https://github.com/microsoft/mimalloc/blob/09a27098aa6e9286518bd9c74e6ffa7199c3f04e/CMakeLists.txt#L361

resulting in

-- stderr output is:
icpx: error: unknown argument: '-Kc++'
icpx: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
make[5]: *** [CMakeFiles/mimalloc-static.dir/build.make:82: CMakeFiles/mimalloc-static.dir/src/stats.c.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:90: CMakeFiles/mimalloc-static.dir/all] Error 2
make[3]: *** [Makefile:139: all] Error 2

I've also reported this upstream microsoft/mimalloc#1153

Component(s)

C++

Activity

  1. changed the title [-]unknown argument: '-Kc++'[/-] [+][C++] unknown argument: '-Kc++'[/+] on Jan 21, 2026
  2. thisisnic commented on Oct 26, 2026

    @thisisnic
    Member

    Thanks for the report. This error comes from the bundled mimalloc v2.0.6, which adds the classic ICC flag -Kc++ for any compiler ID matching "Intel", including icpx (IntelLLVM). mimalloc fixed that detection in v2.0.7, and Arrow picked up a newer mimalloc (v2.2.4) in GH-45978, first released in Arrow 21.0.0. Arrow main is now on mimalloc v3.4.1. I am going to close this as resolved by GH-45978, but please open a new issue if you still hit the problem on 21.0.0 or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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