Install Issue on m1 macs
The-Real-Thisas opened this issue · 4 comments
Describe the bug
Does not install on m1 macs.
Reproducible example code
pip install tweedledum
Expected behavior
Successful installation.
Information
- tweedledum version: Latest
- Python version: Python 3.9.13
- C++ compiler: NA
- Operating system: MacOS 12.5.1 Monterey
Additional context
I got this issue while installing qiskit which depends on tweedledum.
I can confirm that pip install tweedledum==1.1.0
works but pip install tweedledum
doesn't.
(base) ~/Downloads/ pip install tweedledum
Collecting tweedledum
Using cached tweedledum-1.1.1.tar.gz (4.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: tweedledum
Building wheel for tweedledum (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for tweedledum (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [282 lines of output]
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-7mx474op/overlay/lib/python3.9/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-7mx474op/overlay/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py:129: _InvalidFile: The given `pyproject.toml` file is invalid and would be ignored.
!!
############################
# Invalid `pyproject.toml` #
############################
Any configurations in `pyproject.toml` will be ignored.
Please note that future releases of setuptools will halt the build process
if an invalid file is given.
To prevent setuptools from considering `pyproject.toml` please
DO NOT include the `[project]` or `[tool.setuptools]` tables in your file.
!!
if _skip_bad_config(project_table, orig_setuptools_table, dist):
Not searching for unused variables given on the command line.
-- The C compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/_cmake_test_compile/build
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2")
-- Found Eigen3: /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/eigen (found suitable version "3.4.0", minimum required is "3.3")
-- Found fmt: /opt/homebrew/include (found suitable version "9.1.0", minimum required is "7.0.0")
-- Found nlohmann_json: /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/nlohmann (found suitable version "3.9.1", minimum required is "3.9.0")
-- Found phmap: /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/parallel_hashmap (found suitable version "1.0.0", minimum required is "1.0.0")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- pybind11 v2.6.2
CMake Warning (dev) at /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-7mx474op/overlay/lib/python3.9/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.24/Modules/CMakeDependentOption.cmake:89 (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.
-- Found PythonInterp: /Users/thisas/miniforge3/bin/python3.9 (found version "3.9.13")
-- Found PythonLibs: /Users/thisas/miniforge3/lib/libpython3.9.dylib
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Performing Test HAS_FLTO_THIN
-- Performing Test HAS_FLTO_THIN - Success
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
Python3_EXECUTABLE
Python3_INCLUDE_DIR
Python3_LIBRARY
Python_EXECUTABLE
Python_INCLUDE_DIR
Python_LIBRARY
-- Build files have been written to: /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/_skbuild/macosx-12.0-arm64-3.9/cmake-build
[1/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/classical/kitty.cpp.o
[2/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/ir/wires.cpp.o
[3/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/bindings.cpp.o
[4/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/operators/meta.cpp.o
[5/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/operators/ising.cpp.o
[6/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/operators/extension.cpp.o
[7/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/ir/instruction.cpp.o
[8/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Parser/QASM/Lexer.cpp.o
[9/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/target/mapping.cpp.o
[10/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/utils/utils.cpp.o
[11/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/ir/circuit.cpp.o
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/python/tweedledum/ir/circuit.cpp:86:35: warning: 'size' is deprecated: Use num_instructions(). [-Wdeprecated-declarations]
.def("__len__", &Circuit::size)
^
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/include/tweedledum/Utils/Visualization/../../IR/Circuit.h:41:7: note: 'size' has been explicitly marked deprecated here
[[deprecated("Use num_instructions().")]]
^
1 warning generated.
[12/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/target/device.cpp.o
[13/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/operators/standard.cpp.o
[14/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Parser/qasm.cpp.o
[15/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Parser/QASM/Parser.cpp.o
[16/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Parser/tfc.cpp.o
[17/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Decomposition/BridgeDecomposer.cpp.o
[18/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Decomposition/ParityDecomposer.cpp.o
[19/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Decomposition/barenco_decomp.cpp.o
[20/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/classical/mockturtle.cpp.o
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/python/tweedledum/classical/mockturtle.cpp:54:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
lorina::read_aiger(filename, aiger_reader(xag));
^~~~~~~~~~~~~~~~~~
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/python/tweedledum/classical/mockturtle.cpp:60:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
lorina::read_dimacs(filename, dimacs_reader(xag));
^~~~~~~~~~~~~~~~~~~
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/python/tweedledum/classical/mockturtle.cpp:66:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
lorina::read_verilog(filename, verilog_reader(xag));
^~~~~~~~~~~~~~~~~~~~
3 warnings generated.
[21/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/passes/passes.cpp.o
[22/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Decomposition/BarencoDecomposer.cpp.o
[23/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Decomposition/bridge_decomp.cpp.o
[24/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Decomposition/OneQubitDecomposer.cpp.o
[25/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Decomposition/parity_decomp.cpp.o
[26/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Decomposition/one_qubit_decomp.cpp.o
[27/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Placer/LinePlacer.cpp.o
[28/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Placer/RandomPlacer.cpp.o
[29/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Placer/TrivialPlacer.cpp.o
[30/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/synthesis/synthesis.cpp.o
[31/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Placer/ApprxSatPlacer.cpp.o
[32/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Placer/SatPlacer.cpp.o
[33/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Optimization/gate_cancellation.cpp.o
[34/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/RePlacer/JitRePlacer.cpp.o
[35/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/RePlacer/SabreRePlacer.cpp.o
[36/73] Building CXX object CMakeFiles/_tweedledum.dir/python/tweedledum/classical/utils.cpp.o
[37/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Optimization/linear_resynth.cpp.o
[38/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Router/BridgeRouter.cpp.o
[39/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Optimization/steiner_resynth.cpp.o
[40/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Optimization/phase_folding.cpp.o
[41/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Router/JitRouter.cpp.o
[42/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Passes/Mapping/Router/SabreRouter.cpp.o
[43/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/all_linear_synth.cpp.o
[44/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/a_star_swap_synth.cpp.o
[45/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/xag/xag_synth.cpp.o
[46/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/decomp_synth.cpp.o
[47/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/diagonal_synth.cpp.o
[48/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/cx_dihedral_synth.cpp.o
[49/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/linear_synth.cpp.o
[50/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/lhrs/lhrs_synth.cpp.o
[51/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exorBits.cpp.o
[52/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exor.cpp.o
[53/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exorCubes.cpp.o
[54/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exorLink.cpp.o
[55/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exorUtil.cpp.o
[56/73] Building CXX object external/abcesop/CMakeFiles/libabcesop.dir/exorList.cpp.o
[57/73] Linking CXX static library external/abcesop/liblibabcesop.a
[58/73] Building CXX object external/abcsat/CMakeFiles/libabcsat.dir/AbcGlucose.cpp.o
[59/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/gray_synth.cpp.o
[60/73] Building CXX object external/abcsat/CMakeFiles/libabcsat.dir/SimpSolver.cpp.o
[61/73] Building CXX object external/abcsat/CMakeFiles/libabcsat.dir/satStore.cpp.o
[62/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o
FAILED: CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DABC_NAMESPACE=pabc -DABC_NO_USE_READLINE -DDISABLE_NAUTY -DFMT_HEADER_ONLY=1 -DLIN64 -D_tweedledum_EXPORTS -I/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/include -I/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/abcsat -I/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/abcesop -I/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/abcresub -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/pybind11/include -isystem /Users/thisas/miniforge3/include/python3.9 -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/eigen -isystem /opt/homebrew/include -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/mockturtle -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/kitty -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/lorina -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/rang -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/parallel_hashmap -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/percy -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/nlohmann -isystem /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/external/bill -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.0 -fPIC -fvisibility=hidden -flto -std=gnu++17 -MD -MT CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o -MF CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o.d -o CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o -c /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/src/Utils/Visualization/string_utf8.cpp
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/src/Utils/Visualization/string_utf8.cpp:328:15: error: no matching function for call to 'format'
fmt::format(U"{:>2}", wire - diagram.num_qubits());
^~~~~~~~~~~
/opt/homebrew/include/fmt/core.h:3204:31: note: candidate function [with T = <unsigned int>] not viable: no known conversion from 'const char32_t [6]' to 'format_string<unsigned int>' (aka 'basic_format_string<char, unsigned int>') for 1st argument
FMT_NODISCARD FMT_INLINE auto format(format_string<T...> fmt, T&&... args)
^
/opt/homebrew/include/fmt/format.h:4183:13: note: candidate template ignored: requirement 'detail::is_locale<char32_t [6], void>::value' was not satisfied [with Locale = char32_t [6], T = <>]
inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
^
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/src/Utils/Visualization/string_utf8.cpp:327:34: error: no viable conversion from 'basic_string<char, char_traits<char>, allocator<char>>' to 'const basic_string<char32_t, char_traits<char32_t>, allocator<char32_t>>'
std::u32string const wire_label =
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:822:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'const std::u32string &' for 1st argument
basic_string(const basic_string& __str);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:827:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'std::u32string &&' for 1st argument
basic_string(basic_string&& __str)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:840:5: note: candidate constructor template not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'const char32_t *' for 1st argument
basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:895:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'initializer_list<char32_t>' for 1st argument
basic_string(initializer_list<_CharT> __il);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:815:40: note: explicit constructor is not a candidate
_LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:881:18: note: explicit constructor is not a candidate
explicit basic_string(const _Tp& __t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:903:5: note: candidate function
operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); }
^
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/src/Utils/Visualization/string_utf8.cpp:424:11: error: no matching function for call to 'format'
fmt::format(U"{:>2}", wires_.back() - diagram.num_qubits());
^~~~~~~~~~~
/opt/homebrew/include/fmt/core.h:3204:31: note: candidate function [with T = <unsigned int>] not viable: no known conversion from 'const char32_t [6]' to 'format_string<unsigned int>' (aka 'basic_format_string<char, unsigned int>') for 1st argument
FMT_NODISCARD FMT_INLINE auto format(format_string<T...> fmt, T&&... args)
^
/opt/homebrew/include/fmt/format.h:4183:13: note: candidate template ignored: requirement 'detail::is_locale<char32_t [6], void>::value' was not satisfied [with Locale = char32_t [6], T = <>]
inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
^
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/src/Utils/Visualization/string_utf8.cpp:423:30: error: no viable conversion from 'basic_string<char, char_traits<char>, allocator<char>>' to 'const basic_string<char32_t, char_traits<char32_t>, allocator<char32_t>>'
std::u32string const wire_label =
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:822:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'const std::u32string &' for 1st argument
basic_string(const basic_string& __str);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:827:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'std::u32string &&' for 1st argument
basic_string(basic_string&& __str)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:840:5: note: candidate constructor template not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'const char32_t *' for 1st argument
basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:895:5: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'initializer_list<char32_t>' for 1st argument
basic_string(initializer_list<_CharT> __il);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:815:40: note: explicit constructor is not a candidate
_LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:881:18: note: explicit constructor is not a candidate
explicit basic_string(const _Tp& __t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:903:5: note: candidate function
operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); }
^
4 errors generated.
[63/73] Building CXX object external/abcsat/CMakeFiles/libabcsat.dir/Glucose.cpp.o
[64/73] Building CXX object external/abcsat/CMakeFiles/libabcsat.dir/satSolver.cpp.o
[65/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Target/Device.cpp.o
[66/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/pprm_synth.cpp.o
[67/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/transform_synth.cpp.o
[68/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/steiner_gauss_synth.cpp.o
[69/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/spectrum_synth.cpp.o
[70/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/pkrm_synth.cpp.o
ninja: build stopped: subcommand failed.
File "/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-7mx474op/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
cmkr.make(make_args, install_target=cmake_install_target, env=env)
File "/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-7mx474op/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 680, in make
self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
File "/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-7mx474op/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 704, in make_impl
raise SKBuildError(
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - success
--------------------------------------------------------------------------------
Configuring Project
Working directory:
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/_skbuild/macosx-12.0-arm64-3.9/cmake-build
Command:
cmake /private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/_skbuild/macosx-12.0-arm64-3.9/cmake-install/python -DPYTHON_VERSION_STRING:STRING=3.9.13 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-7mx474op/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DPython3_EXECUTABLE:FILEPATH=/Users/thisas/miniforge3/bin/python3.9 -DPython3_INCLUDE_DIR:PATH=/Users/thisas/miniforge3/include/python3.9 -DPython3_LIBRARY:PATH=/Users/thisas/miniforge3/lib/libpython3.9.dylib -DPython_EXECUTABLE:FILEPATH=/Users/thisas/miniforge3/bin/python3.9 -DPython_INCLUDE_DIR:PATH=/Users/thisas/miniforge3/include/python3.9 -DPython_LIBRARY:PATH=/Users/thisas/miniforge3/lib/libpython3.9.dylib -DPYTHON_EXECUTABLE:FILEPATH=/Users/thisas/miniforge3/bin/python3.9 -DPYTHON_INCLUDE_DIR:PATH=/Users/thisas/miniforge3/include/python3.9 -DPYTHON_LIBRARY:PATH=/Users/thisas/miniforge3/lib/libpython3.9.dylib -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-build-env-7mx474op/overlay/lib/python3.9/site-packages/ninja/data/bin/ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=12.0 -DCMAKE_OSX_ARCHITECTURES:STRING=arm64
Traceback (most recent call last):
An error occurred while building with CMake.
Command:
cmake --build . --target install --config Release --
Install target:
install
Source directory:
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1
Working directory:
/private/var/folders/z8/sp2w4vyj3q71z22h0hz0vxs00000gn/T/pip-install-ecsfj_0r/tweedledum_73fddbf973d0489580a9594f5ae33ec1/_skbuild/macosx-12.0-arm64-3.9/cmake-build
Please check the install target is valid and see CMake's output for more information.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tweedledum
Failed to build tweedledum
ERROR: Could not build wheels for tweedledum, which is required to install pyproject.toml-based projects
It looks like the wheels are missing from pypi on arm64 macOS on the latest 1.1.1 release. The build job looks like it failed: https://github.com/boschmitt/tweedledum/actions/runs/1218553134 but it was long enough ago that the logs are gone. @boschmitt can you retrigger the job so we can see what the failure is?
In the meantime you can probably just run pip install --prefer-binary tweedledum tweedldum
and it will install tweedledum from 1.1.0 which has the missing wheels available.
Thanks @mtreinish.
I will investigate this further.
@mtreinish this does not work with arm64, I have the same issue.
arch -arm64 pip install cmake tweedledum --no-binary :all:
[58/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/xag/xag_synth.cpp.o
[59/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/decomp_synth.cpp.o
[60/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/diagonal_synth.cpp.o
[61/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Synthesis/gray_synth.cpp.o
[62/73] Building CXX object CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o
FAILED: CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DABC_NAMESPACE=pabc -DABC_NO_USE_READLINE -DDISABLE_NAUTY -DFMT_HEADER_ONLY=1 -DLIN64 -D_tweedledum_EXPORTS -I/private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/include -I/private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/abcsat -I/private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/abcesop -I/private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/abcresub -isystem /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/pybind11/include -isystem /Users/sol/.pyenv/versions/3.9.7/include/python3.9 -isystem /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/eigen -isystem /opt/homebrew/include -isystem /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/mockturtle -isystem /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/kitty -isystem /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/lorina -isystem /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/rang -isystem /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/parallel_hashmap -isystem /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/percy -isystem /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/nlohmann -isystem /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/external/bill -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.0 -fPIC -fvisibility=hidden -flto -std=gnu++17 -MD -MT CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o -MF CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o.d -o CMakeFiles/_tweedledum.dir/src/Utils/Visualization/string_utf8.cpp.o -c /private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/src/Utils/Visualization/string_utf8.cpp
/private/var/folders/4y/fksy204x14b55bxyl0ytbjwm0000gn/T/pip-install-dli152zz/tweedledum_35ba19d29c9444f9b3bf756075aa975e/src/Utils/Visualization/string_utf8.cpp:328:15: error: no matching function for call to 'format'
fmt::format(U"{:>2}", wire - diagram.num_qubits());
^~~~~~~~~~~
/opt/homebrew/include/fmt/core.h:3204:31: note: candidate function [with T = <unsigned int>] not viable: no known conversion from 'const char32_t [6]' to 'format_string<unsigned int>' (aka 'basic_format_string<char, unsigned int>') for 1st argument
FMT_NODISCARD FMT_INLINE auto format(format_string<T...> fmt, T&&... args)
^
I have had the same issue on an M1 MacBook with macOS Ventura 13.0.1.
There is a workaround:
- pip install tweedledum-dev
- hack the installation as follows:
a) in the site-packages directory rename tweedledum_dev-1.2.0.dev202109060824.dist-info/ to tweedledum_dev-1.2.0.dist-info/
b) edit the METADATA file in the dist-info directory as follows:
i) change tweedledum-dev in the Name: line to tweedledum
ii) change 1.2.0.dev202109060824 in the Version: line to 1.2.0
After you do this, pip will think you have satisfied the requirement for tweedledum (rather than tweedledum-dev) and so will allow you to install packages that depend on tweedledum.
If this approach does not appeal to you, you can punt on virtual environment and use Anaconda, which also works.