SoftFever / OrcaSlicer

G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
https://discord.gg/P4VE9UY9gJ
GNU Affero General Public License v3.0
5.96k stars 676 forks source link

Build failed @ Gentoo -- YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY #5954

Open dsiggi opened 5 days ago

dsiggi commented 5 days ago

Is there an existing issue for this problem?

OrcaSlicer Version

2.1.1

Operating System (OS)

Linux

OS Version

Gentoo Linux

Additional system information

No response

Printer

Ender 3 with Klipper

How to reproduce

Build OrcaSlicer: Build line:

cmake -C /var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DSLIC3R_GTK=3 -DSLIC3R_PCH=0 -DSLIC3R_WX_STABLE=1 -DSLIC3R_STATIC=0 -DORCA_TOOLS=ON -DOPENVDB_FIND_MODULE_PATH=/usr/lib64/cmake/OpenVDB -DBBL_RELEASE_TO_PUBLIC=1 -DBBL_INTERNAL_TESTING=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1

ninja -v -j9 -l17

Actual results

Build failed with this message.

[98/538] /usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CHRONO_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_LOCALE_DYN_LINK -DBOOST_LOCALE_NO_LIB -DBOOST_LOG_DYN_LINK -DBOOST_LOG_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DLIBNEST2D_GEOMETRIES_libslic3r -DLIBNEST2D_OPTIMIZER_nlopt -DLIBNEST2D_STATIC -DLIBNEST2D_THREADING_tbb -DOPENVDB_ABI_VERSION_NUMBER=11 -DOPENVDB_USE_DELAYED_LOADING -DSLIC3R_DESKTOP_INTEGRATION -DSLIC3R_GUI -DTBB_USE_CAPTURED_EXCEPTION=0 -DUNICODE -DUSE_TBB -DWXINTL_NO_GETTEXT_MACRO -D_UNICODE -DwxNO_UNSAFE_WXSTRING_CONV -DwxUSE_UNICODE -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1_build/src/platform -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libslic3r -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1_build/src/libslic3r -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libnest2d/include -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/miniz -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/glu-libtess/include -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/clipper2/Clipper2Lib/include -isystem /usr/include/eigen3 -isystem /var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libigl -isystem /usr/include/opencascade -isystem /usr/include/Imath  -O2 -pipe -fomit-frame-pointer -fext-numeric-literals -Wall -Wno-reorder -std=gnu++17 -fPIC -fsigned-char -Werror=return-type -Wno-ignored-attributes -Wno-unknown-pragmas -gz=zstd -MD -MT src/libslic3r/CMakeFiles/libslic3r.dir/Emboss.cpp.o -MF src/libslic3r/CMakeFiles/libslic3r.dir/Emboss.cpp.o.d -o src/libslic3r/CMakeFiles/libslic3r.dir/Emboss.cpp.o -c /var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libslic3r/Emboss.cpp
FAILED: src/libslic3r/CMakeFiles/libslic3r.dir/Emboss.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CHRONO_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_LOCALE_DYN_LINK -DBOOST_LOCALE_NO_LIB -DBOOST_LOG_DYN_LINK -DBOOST_LOG_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DLIBNEST2D_GEOMETRIES_libslic3r -DLIBNEST2D_OPTIMIZER_nlopt -DLIBNEST2D_STATIC -DLIBNEST2D_THREADING_tbb -DOPENVDB_ABI_VERSION_NUMBER=11 -DOPENVDB_USE_DELAYED_LOADING -DSLIC3R_DESKTOP_INTEGRATION -DSLIC3R_GUI -DTBB_USE_CAPTURED_EXCEPTION=0 -DUNICODE -DUSE_TBB -DWXINTL_NO_GETTEXT_MACRO -D_UNICODE -DwxNO_UNSAFE_WXSTRING_CONV -DwxUSE_UNICODE -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1_build/src/platform -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libslic3r -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1_build/src/libslic3r -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libnest2d/include -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/miniz -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/glu-libtess/include -I/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/clipper2/Clipper2Lib/include -isystem /usr/include/eigen3 -isystem /var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libigl -isystem /usr/include/opencascade -isystem /usr/include/Imath  -O2 -pipe -fomit-frame-pointer -fext-numeric-literals -Wall -Wno-reorder -std=gnu++17 -fPIC -fsigned-char -Werror=return-type -Wno-ignored-attributes -Wno-unknown-pragmas -gz=zstd -MD -MT src/libslic3r/CMakeFiles/libslic3r.dir/Emboss.cpp.o -MF src/libslic3r/CMakeFiles/libslic3r.dir/Emboss.cpp.o.d -o src/libslic3r/CMakeFiles/libslic3r.dir/Emboss.cpp.o -c /var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libslic3r/Emboss.cpp
In file included from /usr/include/eigen3/Eigen/Core:164,
                 from /usr/include/eigen3/Eigen/Geometry:11,
                 from /var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/admesh/stl.h:31,
                 from /var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libslic3r/Emboss.hpp:8,
                 from /var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libslic3r/Emboss.cpp:2:
/usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h: In instantiation of ‘Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::CwiseBinaryOp(const Lhs&, const Rhs&, const BinaryOp&) [with BinaryOp = Eigen::numext::equal_to<long int>; LhsType = const Eigen::Matrix<long int, 2, 1, 2>; RhsType = const Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<double, int>, const Eigen::Matrix<double, 2, 1, 2> >; Lhs = Eigen::Matrix<long int, 2, 1, 2>; Rhs = Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<double, int>, const Eigen::Matrix<double, 2, 1, 2> >]’:
/usr/include/eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h:45:10:   required from ‘const Eigen::CwiseBinaryOp<Eigen::numext::equal_to<typename Eigen::internal::traits<T>::Scalar>, const Derived, const OtherDerived> Eigen::MatrixBase<Derived>::cwiseEqual(const Eigen::MatrixBase<OtherDerived>&) const [with OtherDerived = Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<double, int>, const Eigen::Matrix<double, 2, 1, 2> >; Derived = Eigen::Matrix<long int, 2, 1, 2>; typename Eigen::internal::traits<T>::Scalar = long int]’
/usr/include/eigen3/Eigen/src/Core/MatrixBase.h:291:24:   required from ‘bool Eigen::MatrixBase<Derived>::operator==(const Eigen::MatrixBase<OtherDerived>&) const [with OtherDerived = Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<double, int>, const Eigen::Matrix<double, 2, 1, 2> >; Derived = Eigen::Matrix<long int, 2, 1, 2>]’
/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1/src/libslic3r/Emboss.cpp:337:17:   required from here
/usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:113:7: error: static assertion failed: YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY
  113 |       EIGEN_CHECK_BINARY_COMPATIBILIY(BinaryOp,typename Lhs::Scalar,typename Rhs::Scalar);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:113:7: note: ‘Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<long int, int, Eigen::numext::equal_to<long int> > >::value’ evaluates to false
ninja: build stopped: subcommand failed.
 * ERROR: media-gfx/OrcaSlicer-2.1.1::dsiggis-gentoo-overlay failed (compile phase):
 *   ninja -v -j1 -l0 failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 2537:  Called cmake_src_compile
 *   environment, line  974:  Called cmake_build
 *   environment, line  941:  Called eninja
 *   environment, line 1438:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "${*} failed"
 * 
 * If you need support, post the output of `emerge --info '=media-gfx/OrcaSlicer-2.1.1::dsiggis-gentoo-overlay'`,
 * the complete build log and the output of `emerge -pqv '=media-gfx/OrcaSlicer-2.1.1::dsiggis-gentoo-overlay'`.
 * The complete build log is located at '/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1_build'
 * S: '/var/tmp/portage/media-gfx/OrcaSlicer-2.1.1/work/OrcaSlicer-2.1.1'

Expected results

A working build :D.

Project file & Debug log uploads

build.log: build.log

Checklist of files to include

Anything else?

No response

Noisyfox commented 2 days ago

Not sure why macro NDEBUG is not defined when you are building with release config. Have you tried the BuildLinux.sh?