Skip to content

Building qcor via appleclang #257

@owenarn

Description

@owenarn

I've managed to get qcor building and installing locally via appleclang.

This is a two part issue.

  1. I had to make some minor changes to cmake and subsequently to some of the includes effectively undoing this I'm sure there are solid reasons for putting this in and it would be really useful to understand what they are. Could you explain please?

  2. With the above reverted, I get an illegal hardware instruction error when using qcor-mlir-tool

Stack trace

(base)  build % lldb -- ./install/bin/qcor-mlir-tool -emit=llvm test.qasm 
(lldb) target create "./install/bin/qcor-mlir-tool"
Current executable set to 'qcor/build/install/bin/qcor-mlir-tool' (x86_64).
(lldb) settings set -- target.run-args  "-emit=llvm" "test.qasm"
(lldb) env DYLD_LIBRARY_PATH=xacc/build/install/lib
(lldb) run
Process 30852 launched: 'qcor/build/install/bin/qcor-mlir-tool' (x86_64)
Process 30852 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x000000010cbf8e48 libopenqasmv3-mlir-generator.dylib`mlir::detail::StorageUniquerImpl::getOrCreate(mlir::TypeID, unsigned int, llvm::function_ref<bool (mlir::StorageUniquer::BaseStorage const*)>, llvm::function_ref<mlir::StorageUniquer::BaseStorage* (mlir::StorageUniquer::StorageAllocator&)>) + 3080
libopenqasmv3-mlir-generator.dylib`mlir::detail::StorageUniquerImpl::getOrCreate:
->  0x10cbf8e48 <+3080>: ud2    
    0x10cbf8e4a <+3082>: callq  0x10cbfb0e8               ; symbol stub for: llvm::SmallVectorBase<unsigned int>::report_at_maximum_capacity()
    0x10cbf8e4f <+3087>: leaq   0x356c7(%rip), %rdi       ; "Allocation failed"
    0x10cbf8e56 <+3094>: movl   $0x1, %esi
Target 0: (qcor-mlir-tool) stopped.

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