Skip to content

Building on aarch64 MacOS / with LLVM 21 #65

@wolfgangwalther

Description

@wolfgangwalther

While packaging orioledb in Nixpkgs I failed to build orioledb/postgres on MacOS (aarch64) with:

llvmjit_wrap.cpp:60:18: error: no matching constructor for initialization of 'llvm::orc::RTDyldObjectLinkingLayer'
   60 |         return wrap(new llvm::orc::RTDyldObjectLinkingLayer(
      |                         ^
   61 |                 *unwrap(ES), [] { return std::make_unique<llvm::backport::SectionMemoryManager>(nullptr, true); }));
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/store/k71q2lxpdih3znara5x88saz881k49gs-llvm-21.1.8-dev/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h:58:3: note: candidate constructor not viable: no known conversion from '(lambda at llvmjit_wrap.cpp:61:16)' to 'GetMemoryManagerFunction' (aka 'unique_function<std::unique_ptr<RuntimeDyld::MemoryManager> (const MemoryBuffer &)>') for 2nd argument
   58 |   RTDyldObjectLinkingLayer(ExecutionSession &ES,
      |   ^
   59 |                            GetMemoryManagerFunction GetMemoryManager);
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/store/k71q2lxpdih3znara5x88saz881k49gs-llvm-21.1.8-dev/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h:37:16: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
   37 | class LLVM_ABI RTDyldObjectLinkingLayer
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [<builtin>: llvmjit_wrap.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/nix/var/nix/builds/nix-51456-598611611/source/src/backend/jit/llvm'
make[1]: *** [Makefile:42: all-backend/jit/llvm-recurse] Error 2
make[1]: Leaving directory '/nix/var/nix/builds/nix-51456-598611611/source/src'
make: *** [GNUmakefile:16: world-src-recurse] Error 2

It seems like the patch in postgres/postgres@0dceba2 should fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions