Closed JulienBeg closed 5 months ago
The solution from the issue "Build error for Intel Xeon E5-2697 #153" to build without using BLIS by removing lines 42-43 in setup.py." worked. Problem solved.
Glad that you found a workaround, but its not an ideal solution (disabling BLIS has some performance impact, in particular when dealing with large matrices in LDA).
This is most likely due to https://github.com/cassiersg/blis-sys2/issues/3 so the fix should be simple: upgrade that dependency (and also the bindgen dependency, which is the root cause of the issue, otherwise we might get failures with other C libraries that we build).
In the install output is was indicated "Fresh bindgen v0.64.0" which is above 0.62. I think I miss something here.
How do you install SCALib ?
From source on a remote server using ssh.
Explain what steps you followed to install SCALib.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh . "$HOME/.cargo/env" rustc --version pip install build cd SCALib pip install .
If installing from git, what is the git commit id (
git rev-parse HEAD
) ?e604836123c878e982e70cbd3c9c6dd292cf5fef
Observed behavior
Defaulting to user installation because normal site-packages is not writeable Processing /home/infres/beguinot/SCALib Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting numpy~=1.19 (from scalib==0.5.8.dev1+ge604836) Using cached numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB) Collecting py-cpuinfo~=9.0 (from scalib==0.5.8.dev1+ge604836) Using cached py_cpuinfo-9.0.0-py3-none-any.whl.metadata (794 bytes) Using cached numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.0 MB) Using cached py_cpuinfo-9.0.0-py3-none-any.whl (22 kB) Building wheels for collected packages: scalib Building wheel for scalib (pyproject.toml) ... error error: subprocess-exited-with-error
× Building wheel for scalib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [370 lines of output] Build config: noflags=False portable=False use_avx2=False rustflags=' -C target-cpu=native'. running bdist_wheel running build running build_py copying src/scalib/init.py -> build/lib.linux-x86_64-cpython-312/scalib copying src/scalib/version.py -> build/lib.linux-x86_64-cpython-312/scalib copying src/scalib/utils.py -> build/lib.linux-x86_64-cpython-312/scalib copying src/scalib/build_config.py -> build/lib.linux-x86_64-cpython-312/scalib copying src/scalib/tools.py -> build/lib.linux-x86_64-cpython-312/scalib copying src/scalib/config/threading.py -> build/lib.linux-x86_64-cpython-312/scalib/config copying src/scalib/config/init.py -> build/lib.linux-x86_64-cpython-312/scalib/config copying src/scalib/attacks/init.py -> build/lib.linux-x86_64-cpython-312/scalib/attacks copying src/scalib/attacks/factor_graph.py -> build/lib.linux-x86_64-cpython-312/scalib/attacks copying src/scalib/attacks/sascagraph.py -> build/lib.linux-x86_64-cpython-312/scalib/attacks copying src/scalib/metrics/ttest.py -> build/lib.linux-x86_64-cpython-312/scalib/metrics copying src/scalib/metrics/snr.py -> build/lib.linux-x86_64-cpython-312/scalib/metrics copying src/scalib/metrics/init.py -> build/lib.linux-x86_64-cpython-312/scalib/metrics copying src/scalib/metrics/information.py -> build/lib.linux-x86_64-cpython-312/scalib/metrics copying src/scalib/postprocessing/rankestimation.py -> build/lib.linux-x86_64-cpython-312/scalib/postprocessing copying src/scalib/postprocessing/init.py -> build/lib.linux-x86_64-cpython-312/scalib/postprocessing copying src/scalib/modeling/rldaclassifier.py -> build/lib.linux-x86_64-cpython-312/scalib/modeling copying src/scalib/modeling/ldaclassifier.py -> build/lib.linux-x86_64-cpython-312/scalib/modeling copying src/scalib/modeling/init.py -> build/lib.linux-x86_64-cpython-312/scalib/modeling running build_ext running build_rust cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/scalib_ext/scalib-py/Cargo.toml --release -v --features blis pyo3/extension-module pyo3/abi3 --crate-type cdylib -- Fresh autocfg v1.1.0 Fresh unicode-ident v1.0.6 Fresh version_check v0.9.4 Fresh cc v1.0.79 Fresh glob v0.3.1 Fresh cfg-if v1.0.0 Fresh scopeguard v1.1.0 Fresh termcolor v1.2.0 Fresh regex-syntax v0.6.28 Fresh bitflags v1.3.2 Fresh lazycell v1.3.0 Fresh peeking_take_while v0.1.2 Fresh shlex v1.1.0 Fresh once_cell v1.17.0 Fresh rawpointer v0.2.1 Fresh bytemuck v1.13.1 Fresh strsim v0.8.0 Fresh cxxbridge-flags v1.0.89 Fresh strength_reduce v0.2.4 Fresh minimal-lexical v0.2.1 Fresh humantime v2.1.0 Fresh ansi_term v0.12.1 Fresh vec_map v0.8.2 Fresh either v1.8.1 Fresh smallvec v1.10.0 Fresh unicode-width v0.1.10 Fresh byteorder v1.4.3 Fresh libloading v0.7.4 Fresh matrixmultiply v0.3.2 Fresh textwrap v0.11.0 Fresh codespan-reporting v0.11.1 Fresh safe_arch v0.6.0 Fresh lazy_static v1.4.0 Fresh color_quant v1.1.0 Fresh itertools v0.10.5 Fresh thread_local v1.1.6 Fresh fixedbitset v0.4.2 Fresh yansi v0.5.1 Fresh unindent v0.1.11 Fresh indoc v1.0.9 Fresh number_prefix v0.4.0 Fresh rustc-hash v1.1.0 Fresh proc-macro2 v1.0.51 Fresh num-traits v0.2.15 Fresh memchr v2.5.0 Fresh libc v0.2.139 Fresh crossbeam-utils v0.8.14 Fresh log v0.4.17 Fresh memoffset v0.7.1 Fresh target-lexicon v0.12.5 Fresh scratch v1.0.3 Fresh paste v1.0.11 Fresh wide v0.7.8 Fresh typenum v1.16.0 Fresh lock_api v0.4.9 Fresh blis-src v0.2.1 Fresh memoffset v0.8.0 Fresh atomic v0.5.1 Fresh portable-atomic v0.3.19 Fresh ariadne v0.1.5 Fresh quote v1.0.23 Fresh num-integer v0.1.45 Fresh num-complex v0.4.3 Fresh aho-corasick v0.7.20 Fresh clang-sys v1.4.0 Fresh crossbeam-epoch v0.9.13 Fresh num_cpus v1.15.0 Fresh crossbeam-channel v0.5.6 Fresh atty v0.2.14 Fresh nom v5.1.2 Fresh getrandom v0.2.8 Fresh nom v7.1.3 Fresh approx v0.4.0 Fresh which v3.1.1 Fresh approx v0.5.1 Fresh which v4.4.0 Fresh parking_lot_core v0.9.7 Fresh psm v0.1.21 Fresh link-cplusplus v1.0.8 Fresh console v0.15.5 Fresh syn v1.0.107 Fresh regex v1.7.1 Fresh crossbeam-deque v0.8.2 Fresh ahash v0.7.6 Fresh cexpr v0.4.0 Fresh primal-check v0.3.3 Fresh clap v2.34.0 Fresh transpose v0.2.2 Fresh cexpr v0.6.0 Fresh num-rational v0.4.1 Fresh simba v0.7.3 Fresh parking_lot v0.12.1 Fresh stacker v0.1.15 Fresh indicatif v0.17.3 Fresh serde_derive v1.0.152 Fresh rayon-core v1.11.0 Fresh pyo3-build-config v0.18.1 Fresh env_logger v0.8.4 Fresh cxx-build v1.0.89 Fresh hashbrown v0.12.3 Fresh rustfft v6.1.0 Fresh nalgebra-macros v0.1.0 Fresh bindgen v0.64.0 Fresh cxxbridge-macro v1.0.89 Fresh pyo3-macros-backend v0.18.1 Fresh thiserror-impl v1.0.38 Fresh image v0.24.5 Fresh serde v1.0.152 Fresh rayon v1.7.0 Fresh bindgen v0.58.1 Fresh pyo3-macros v0.18.1 Fresh thiserror v1.0.38 Fresh nalgebra v0.30.1 Fresh cxx v1.0.89 Fresh chumsky v0.9.2 Fresh realfft v2.0.1 Fresh realfft v3.2.0 Fresh ndarray v0.15.6 Fresh indexmap v1.9.2 Fresh index_vec v0.1.3 Fresh kdtree v0.5.1 Fresh hytra v0.1.2 Fresh bincode v1.3.3 warning: geigen@0.1.0: In file included from /home/infres/beguinot/SCALib/src/scalib_ext/geigen/include/Eigen/Core:503, warning: geigen@0.1.0: from /home/infres/beguinot/SCALib/src/scalib_ext/geigen/include/Eigen/Eigenvalues:11, warning: geigen@0.1.0: from src/geigen.cpp:3: warning: geigen@0.1.0: /home/infres/beguinot/SCALib/src/scalib_ext/geigen/include/Eigen/src/Core/products/SelfadjointMatrixVector.h: In function ‘static void Eigen::internal::selfadjoint_product_impl<Lhs, LhsMode, false, Rhs, 0, true>::run(Dest&, const Lhs&, const Rhs&, const Scalar&) [with Dest = Eigen::Block<Eigen::Matrix<double, -1, 1>, -1, 1, false>; Lhs = Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, false>; int LhsMode = 17; Rhs = Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::Matrix<double, -1, 1> >, const Eigen::Block<Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, -1, 1, false> >]’:
warning: geigen@0.1.0: /home/infres/beguinot/SCALib/src/scalib_ext/geigen/include/Eigen/src/Core/products/SelfadjointMatrixVector.h:227:7: warning: ‘result’ may be used uninitialized [-Wmaybe-uninitialized]
warning: geigen@0.1.0: 225 | internal::selfadjoint_matrix_vector_product<Scalar, Index, (internal::traits::Flags&RowMajorBit) ? RowMajor : ColMajor,
warning: geigen@0.1.0: | ::Flags&RowMajorBit) ? RowMajor : ColMajor,
warning: geigen@0.1.0: |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: geigen@0.1.0: 226 | int(LhsUpLo), bool(LhsBlasTraits::NeedToConjugate), bool(RhsBlasTraits::NeedToConjugate)>::run warning: geigen@0.1.0: |~~~~~~~~~~~~~~~~~~~~~~ warning: geigen@0.1.0: 227 | ( warning: geigen@0.1.0: | ^ warning: geigen@0.1.0: 228 | lhs.rows(), // size warning: geigen@0.1.0: |~~~~~~~~~~~ warning: geigen@0.1.0: 229 | &lhs.coeffRef(0,0), lhs.outerStride(), // lhs info warning: geigen@0.1.0: |~~~~~~~~~~~ warning: geigen@0.1.0: 230 | actualRhsPtr, // rhs info warning: geigen@0.1.0: |~~~~~~~~~~~ warning: geigen@0.1.0: 231 | actualDestPtr, // result info warning: geigen@0.1.0: |~~~~~~~~~~~~~~ warning: geigen@0.1.0: 232 | actualAlpha // scale factor warning: geigen@0.1.0: |~~~~~~~~~~~warning: geigen@0.1.0: 233 | ); warning: geigen@0.1.0: | ~ warning: geigen@0.1.0: /home/infres/beguinot/SCALib/src/scalib_ext/geigen/include/Eigen/src/Core/products/SelfadjointMatrixVector.h:39:24: note: by argument 4 of type ‘const double’ to ‘static void Eigen::internal::selfadjoint_matrix_vector_product<Scalar, Index, StorageOrder, UpLo, ConjugateLhs, ConjugateRhs, Version>::run(Index, const Scalar, Index, const Scalar, Scalar, Scalar) [with Scalar = double; Index = long int; int StorageOrder = 0; int UpLo = 1; bool ConjugateLhs = false; bool ConjugateRhs = false; int Version = 0]’ declared here warning: geigen@0.1.0: 39 | EIGEN_DONT_INLINE void selfadjoint_matrix_vector_product<Scalar,Index,StorageOrder,UpLo,ConjugateLhs,ConjugateRhs,Version>::run( warning: geigen@0.1.0: | ^~~~~~~~~~~~~~~~~~~~~~~ warning: geigen@0.1.0: /home/infres/beguinot/SCALib/src/scalib_ext/geigen/include/Eigen/src/Core/products/SelfadjointMatrixVector.h: In function ‘static void Eigen::internal::selfadjoint_product_impl<Lhs, LhsMode, false, Rhs, 0, true>::run(Dest&, const Lhs&, const Rhs&, const Scalar&) [with Dest = Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >; Lhs = const Eigen::Ref<const Eigen::Matrix<double, -1, -1>, 0, Eigen::OuterStride<> >; int LhsMode = 17; Rhs = Eigen::Map<const Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >]’: warning: geigen@0.1.0: /home/infres/beguinot/SCALib/src/scalib_ext/geigen/include/Eigen/src/Core/products/SelfadjointMatrixVector.h:227:7: warning: ‘result’ may be used uninitialized [-Wmaybe-uninitialized] warning: geigen@0.1.0: 225 | internal::selfadjoint_matrix_vector_product<Scalar, Index, (internal::traits~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: geigen@0.1.0: 226 | int(LhsUpLo), bool(LhsBlasTraits::NeedToConjugate), bool(RhsBlasTraits::NeedToConjugate)>::run warning: geigen@0.1.0: |~~~~~~~~~~~~~~~~~~~~~~ warning: geigen@0.1.0: 227 | ( warning: geigen@0.1.0: | ^ warning: geigen@0.1.0: 228 | lhs.rows(), // size warning: geigen@0.1.0: |~~~~~~~~~~~ warning: geigen@0.1.0: 229 | &lhs.coeffRef(0,0), lhs.outerStride(), // lhs info warning: geigen@0.1.0: |~~~~~~~~~~~ warning: geigen@0.1.0: 230 | actualRhsPtr, // rhs info warning: geigen@0.1.0: |~~~~~~~~~~~ warning: geigen@0.1.0: 231 | actualDestPtr, // result info warning: geigen@0.1.0: |~~~~~~~~~~~~~~ warning: geigen@0.1.0: 232 | actualAlpha // scale factor warning: geigen@0.1.0: |~~~~~~~~~~~warning: geigen@0.1.0: 233 | ); warning: geigen@0.1.0: | ~ warning: geigen@0.1.0: /home/infres/beguinot/SCALib/src/scalib_ext/geigen/include/Eigen/src/Core/products/SelfadjointMatrixVector.h:39:24: note: by argument 4 of type ‘const double’ to ‘static void Eigen::internal::selfadjoint_matrix_vector_product<Scalar, Index, StorageOrder, UpLo, ConjugateLhs, ConjugateRhs, Version>::run(Index, const Scalar, Index, const Scalar, Scalar, Scalar) [with Scalar = double; Index = long int; int StorageOrder = 0; int UpLo = 1; bool ConjugateLhs = false; bool ConjugateRhs = false; int Version = 0]’ declared here warning: geigen@0.1.0: 39 | EIGEN_DONT_INLINE void selfadjoint_matrix_vector_product<Scalar,Index,StorageOrder,UpLo,ConjugateLhs,ConjugateRhs,Version>::run( warning: geigen@0.1.0: | ^~~~~~~~~~~~~~~~~~~~~~~ Compiling blis-sys2 v0.2.1 Fresh pyo3-ffi v0.18.1 Fresh petgraph v0.6.3 Fresh nshare v0.9.0 Fresh geigen v0.1.0 (/home/infres/beguinot/SCALib/src/scalib_ext/geigen) Fresh ranklib v0.1.0 (/home/infres/beguinot/SCALib/src/scalib_ext/ranklib) Fresh pyo3 v0.18.1 Fresh numpy v0.18.0 Running/home/infres/beguinot/SCALib/src/scalib_ext/target/release/build/blis-sys2-1cb5ce5ff4db3df2/build-script-build
error: failed to run custom build command forblis-sys2 v0.2.1
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for scalib Failed to build scalib ERROR: Could not build wheels for scalib, which is required to install pyproject.toml-based projects
Environment :
OS: Fedora Linux version 39
Python version: Python 3.12.2
numpy version: numpy-1.26.4
What CPU do you have? Intel(R) Xeon(R) CPU E7- 4870 @ 2.40GHz