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

Allow nvq++ for other filenames as *.cpp #2512

Open
1 task done
diehlpk opened this issue Jan 15, 2025 · 1 comment
Open
1 task done

Allow nvq++ for other filenames as *.cpp #2512

diehlpk opened this issue Jan 15, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@diehlpk
Copy link

diehlpk commented Jan 15, 2025

Required prerequisites

  • Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.

Describe the feature

In the current version, the files passed to nvq++ needs to end with .cpp. For any other file ending, we get the following error

nvq++ test.cc                  
mv: cannot stat 'test.cc.ll': No such file or directory
ld.lld: error: undefined symbol: main
>>> referenced by /lib/aarch64-linux-gnu/Scrt1.o:(_start)
>>> referenced by /lib/aarch64-linux-gnu/Scrt1.o:(_start)
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
failed: "/usr/local/llvm/bin/clang++ --ld-path=/usr/local/llvm/bin/ld.lld -Wl,-rpath,/opt/nvidia/cudaq/lib -Wl,-rpath,/opt/nvidia/cudaq/lib/plugins -Wl,-rpath,/home/git/distributed-quantum-simualtor/build -L/opt/nvidia/cudaq/lib -L/opt/nvidia/cudaq/lib/plugins test.cc.o -lcudaq -lcudaq-common -lcudaq-ensmallen -lcudaq-nlopt -lcudaq-spin -lcudaq-comm-plugin -lcudaq-pyscf -lcudaq-mlir-runtime -lcudaq-builder -lcudaq-em-default -lcudaq-platform-default -lnvqir -lnvqir-qpp"
@diehlpk diehlpk added the enhancement New feature or request label Jan 15, 2025
@diehlpk
Copy link
Author

diehlpk commented Jan 15, 2025

Ok, that might be an issue for cmake, since CMake uses .cxx to check if the compiler works

CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
  The C++ compiler

    "/opt/nvidia/cudaq/bin/nvq++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/git/distributed-quantum-simualtor/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_86ba7/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_86ba7.dir/build.make CMakeFiles/cmTC_86ba7.dir/build
    gmake[1]: Entering directory '/home/git/distributed-quantum-simualtor/build/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_86ba7.dir/testCXXCompiler.cxx.o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant