ORNL-QCI / tnqvm

Tensor Network QPU Simulator for Eclipse XACC
43 stars 10 forks source link

Default INSTALL path #69

Closed DmitryLyakh closed 3 years ago

DmitryLyakh commented 3 years ago

When building the latest commit from Sep 22, 2020, it tried to install itself in the default path of /usr/local/, instead of the one provided by -DXACC_DIR (-DCMAKE_INSTALL_PREFIX was necessary to correct this). Did something change in the build system that could cause this behavior? If not, this could be just a problem with the platform where I tried to install it.

amccaskey commented 3 years ago

All XACC plugins have to be installed to the original XACC install location (specifically, they get installed to ${XACC_ROOT}/plugins). Since TNQVM is a collection of XACC plugins, you can't specify a different CMAKE_INSTALL_PREFIX for TNQVM than that of your XACC build. It has to be installed to the original XACC install.

If you want the TNQVM plugins to be installed to a different location, then you would have to install XACC to that location first. For that you can use CMAKE_INSTALL_PREFIX for your XACC build, and then ensure that downstream plugin builds pass -DXACC_DIR=NEW_XACC_INSTALL_LOCATION

DmitryLyakh commented 3 years ago

@amccaskey Yes, that's how it used to work before. Yesterday on Rhea I provided -DXACC_DIR=location, but TNQVM install tried to install files into /usr/local/something, no idea where /usr/local came from. The only way I could fix it is to provide the CMAKE_INSTALL_PREFIX=XACC_DIR. That's why I was asking what could potentially affect the build system recently.

amccaskey commented 3 years ago

I've seen this sometimes when the CMake Cache gets messed up. Let me know if it still happens after you delete your TNQVM build directory and re-run CMake.