Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building qcor via appleclang #257

Open
owenarn opened this issue May 23, 2022 · 0 comments
Open

Building qcor via appleclang #257

owenarn opened this issue May 23, 2022 · 0 comments

Comments

@owenarn
Copy link

owenarn commented May 23, 2022

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant