boschmitt / tweedledum

C++17 Library for analysis, compilation/synthesis, and optimization of quantum circuits
MIT License
97 stars 36 forks source link

Building fails #169

Closed iyanmv closed 2 years ago

iyanmv commented 2 years ago

Describe the bug

Cannot build the C++ library or the python package from source code.

Reproducible example code

Both

git clone https://github.com/boschmitt/tweedledum.git
cd tweedledum
mkdir build && cd build
cmake ..
make

and

git clone https://github.com/boschmitt/tweedledum.git
cd tweedledum
python setup.py build

fail to compile.

Information

CMakeError.log CMakeOutput.log

iyanmv commented 2 years ago

Seems that the issue is caused because of my local version of fmt (8.0.1). If I used version 7.0.3 included in the tarball, I can compile. But of course, both ninja and unix makefiles by default try to use the local one.

boschmitt commented 2 years ago

Seems that the issue is caused because of my local version of fmt (8.0.1). If I used version 7.0.3 included in the tarball, I can compile. But of course, both ninja and unix makefiles by default try to use the local one.

Thanks for the detailed report and finding a workaround. I will look into it.

iyanmv commented 2 years ago

Any news about this?

boschmitt commented 2 years ago

Any news about this?

Sorry for the late reply. I will fix this on the coming week together with a bunch of other fixes.

iyanmv commented 2 years ago

Thanks! ;) Looking forward for those patches.

iyanmv commented 2 years ago

Thanks for the patch! I confirm it works. I get this warning though:

CMake Warning (dev) at /usr/share/cmake/Modules/CMakeDependentOption.cmake:84 (message):
  Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
  Syntax.  Run "cmake --help-policy CMP0127" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
  external/pybind11/CMakeLists.txt:98 (cmake_dependent_option)
This warning is for project developers.  Use -Wno-dev to suppress it.

Not sure if it is relevant, so I paste here just in case.