Skip to content

Building with jemalloc fails when using Ninja instead of GNU Make #1474

@blenderfreaky

Description

@blenderfreaky

Building UMF with jemalloc fails when using ninja instead of make

Environment Information

  • UMF version (hash commit or a tag): 1.0.0
  • OS(es) version(s): NixOS unstable latest
  • kernel version(s): 6.12.39
  • compiler, libraries, and other related tools version(s): n/a

Please provide a reproduction of the bug:

Simply make a clean build while enabling jemalloc and using ninja.

cmake -B build -DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=On -GNinja

How often bug is revealed:

always

Actual behavior:

CMake Error:
  Running

   '/nix/store/wws3zb9sa7b21msrwh0b2018pl7bpsw6-ninja-1.12.1/bin/ninja' '-C' '/home/blenderfreaky/src/stuff/intel/unified-memory-framework/build' '-t' 'recompact'

  failed with:

   ninja: error: build.ninja:550: bad $-escape (literal $ must be written as $$)

Expected behavior:

configures successfully

Details

The bug comes from this line.
It's a bug in CMake, as it should be escaping it properly (see e.g.: https://gitlab.kitware.com/cmake/cmake/-/issues/16395)

It can be patched by checking if CMAKE_GENERATOR is ninja and then simply manually escaping it

Additional information about Priority and Help Requested:

Are you willing to submit a pull request with a proposed change? Yes

Requested priority: Low

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