Opened 7 months ago
Closed 7 months ago
#69719 closed defect (fixed)
draco @1.5.7: error: no type named 'invoke_result' in namespace 'std'
Reported by: | Nicob73 | Owned by: | nilason (Nicklas Larsson) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | highsierra | Cc: | |
Port: | draco |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
:info:build [ 34%] Building CXX object CMakeFiles/draco_scene.dir/src/draco/scene/scene.cc.o :info:build /usr/bin/clang++ -DDRACO_CMAKE=1 -DDRACO_FLAGS_SRCDIR=\"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7\" -DDRACO_FLAGS_TMPDIR=\"/tmp\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7/src -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/build -I/opt/local/include/eigen3 -I/opt/local/include/ghc -I/opt/local/include -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -std=gnu++1z -arch x86_64 -mmacosx-version-min=10.13 -fPIC -Wno-deprecated-declarations -MD -MT CMakeFiles/draco_scene.dir/src/draco/scene/scene.cc.o -MF CMakeFiles/draco_scene.dir/src/draco/scene/scene.cc.o.d -o CMakeFiles/draco_scene.dir/src/draco/scene/scene.cc.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7/src/draco/scene/scene.cc :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7/src/draco/core/draco_test_utils.cc:15: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7/src/draco/core/draco_test_utils.h:28: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7/src/draco/io/scene_io.h:26: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7/src/draco/scene/scene.h:28: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7/src/draco/scene/instance_array.h:25: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7/src/draco/scene/trs_matrix.h:21: :info:build In file included from /opt/local/include/eigen3/Eigen/Geometry:11: :info:build In file included from /opt/local/include/eigen3/Eigen/Core:162: :info:build /opt/local/include/eigen3/Eigen/src/Core/util/Meta.h:504:25: error: no type named 'invoke_result' in namespace 'std' :info:build typedef typename std::invoke_result<F, ArgTypes...>::type type1; :info:build ~~~~~~~~~~~~~~^~~~~~~~~~~~~ :info:build /opt/local/include/eigen3/Eigen/src/Core/util/Meta.h:504:38: error: expected member name or ';' after declaration specifiers :info:build typedef typename std::invoke_result<F, ArgTypes...>::type type1; :info:build ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ :info:build /opt/local/include/eigen3/Eigen/src/Core/util/Meta.h:505:31: error: use of undeclared identifier 'type1' :info:build typedef typename remove_all<type1>::type type; :info:build ^ :info:build /opt/local/include/eigen3/Eigen/src/Core/util/Meta.h:505:39: error: non-friend class member 'type' cannot have a qualified name :info:build typedef typename remove_all<type1>::type type; :info:build ~~^ :info:build /opt/local/include/eigen3/Eigen/src/Core/util/Meta.h:505:39: error: typedef declarator cannot be qualified :info:build typedef typename remove_all<type1>::type type; :info:build ~~^ :info:build /opt/local/include/eigen3/Eigen/src/Core/util/Meta.h:505:43: error: expected ';' at end of declaration list :info:build typedef typename remove_all<type1>::type type; :info:build ^ :info:build ; :info:build /opt/local/include/eigen3/Eigen/src/Core/util/Meta.h:616:20: error: no template named 'invoke_result' in namespace 'std'; did you mean '::Eigen::internal::invoke_result'? :info:build typedef typename std::invoke_result<F, ArgTypes...>::type type1; :info:build ^~~~~~~~~~~~~~~~~~ :info:build ::Eigen::internal::invoke_result :info:build /opt/local/include/eigen3/Eigen/src/Core/util/Meta.h:615:8: note: '::Eigen::internal::invoke_result' declared here :info:build struct invoke_result { :info:build ^ :info:build /opt/local/include/eigen3/Eigen/src/Core/util/Meta.h:616:56: error: no type named 'type' in 'invoke_result<F, ArgTypes...>' :info:build typedef typename std::invoke_result<F, ArgTypes...>::type type1; :info:build ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ :info:build /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/draco_gtest_main.dir/build.make CMakeFiles/draco_gtest_main.dir/depend :info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/build' :info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/draco-1.5.7 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/build/CMakeFiles/draco_gtest_main.dir/DependInfo.cmake "--color=" :info:build 8 errors generated.
Conflict with eigen3 port
Change History (10)
comment:1 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | highsierra added |
Owner: | set to nilason |
Status: | new → assigned |
Summary: | MacPorts 2.9.3 on macOS 10.13.2 draco 1.5.7 failed to build → draco @1.5.7: error: no type named 'invoke_result' in namespace 'std' |
comment:2 Changed 7 months ago by Nicob73
I install 10.13.6 and all the security updates.
How can I specify C++14 for building this port ?
Best regards
Nicolas.
comment:3 follow-ups: 5 6 Changed 7 months ago by Nicob73
I progress a lot by using the following command : sudo port install draco configure.compiler=macports-clang-14
But the port still failed with the following statements :
:info:build [100%] Linking CXX executable draco_tests :info:build /opt/local/bin/cmake -E cmake_link_script CMakeFiles/draco_tests.dir/link.txt --verbose=ON :info:build /opt/local/bin/clang++-mp-14 -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -arch x86_64 -mmacosx-version-min=10.13 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names CMakeFiles/draco_tests.dir/src/draco/animation/keyframe_animation_encoding_test.cc.o CMakeFiles/draco_tests.dir/src/draco/animation/keyframe_animation_test.cc.o CMakeFiles/draco_tests.dir/src/draco/attributes/point_attribute_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/attributes/point_d_vector_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_canonicalized_transform_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_transform_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/attributes/sequential_integer_attribute_encoding_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/bit_coders/rans_coding_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/decode_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/encode_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/entropy/shannon_entropy_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/entropy/symbol_coding_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/mesh/mesh_edgebreaker_encoding_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/mesh/mesh_encoder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/point_cloud/point_cloud_kd_tree_encoding_test.cc.o CMakeFiles/draco_tests.dir/src/draco/compression/point_cloud/point_cloud_sequential_encoding_test.cc.o CMakeFiles/draco_tests.dir/src/draco/core/buffer_bit_coding_test.cc.o CMakeFiles/draco_tests.dir/src/draco/core/math_utils_test.cc.o CMakeFiles/draco_tests.dir/src/draco/core/quantization_utils_test.cc.o CMakeFiles/draco_tests.dir/src/draco/core/status_test.cc.o CMakeFiles/draco_tests.dir/src/draco/core/vector_d_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/file_utils_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/file_writer_utils_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/stdio_file_reader_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/stdio_file_writer_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/obj_decoder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/obj_encoder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/ply_decoder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/ply_reader_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/stl_decoder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/stl_encoder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/point_cloud_io_test.cc.o CMakeFiles/draco_tests.dir/src/draco/mesh/corner_table_test.cc.o CMakeFiles/draco_tests.dir/src/draco/mesh/mesh_are_equivalent_test.cc.o CMakeFiles/draco_tests.dir/src/draco/mesh/mesh_cleanup_test.cc.o CMakeFiles/draco_tests.dir/src/draco/mesh/triangle_soup_mesh_builder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/metadata/metadata_encoder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/metadata/metadata_test.cc.o CMakeFiles/draco_tests.dir/src/draco/point_cloud/point_cloud_builder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/point_cloud/point_cloud_test.cc.o CMakeFiles/draco_tests.dir/src/draco/animation/animation_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/gltf_decoder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/gltf_encoder_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/gltf_utils_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/gltf_test_helper.cc.o CMakeFiles/draco_tests.dir/src/draco/io/scene_io_test.cc.o CMakeFiles/draco_tests.dir/src/draco/io/texture_io_test.cc.o CMakeFiles/draco_tests.dir/src/draco/material/material_library_test.cc.o CMakeFiles/draco_tests.dir/src/draco/material/material_test.cc.o CMakeFiles/draco_tests.dir/src/draco/metadata/property_attribute_test.cc.o CMakeFiles/draco_tests.dir/src/draco/metadata/property_table_test.cc.o CMakeFiles/draco_tests.dir/src/draco/metadata/structural_metadata_test.cc.o CMakeFiles/draco_tests.dir/src/draco/metadata/structural_metadata_schema_test.cc.o CMakeFiles/draco_tests.dir/src/draco/scene/instance_array_test.cc.o CMakeFiles/draco_tests.dir/src/draco/scene/light_test.cc.o CMakeFiles/draco_tests.dir/src/draco/scene/mesh_group_test.cc.o CMakeFiles/draco_tests.dir/src/draco/scene/scene_test.cc.o CMakeFiles/draco_tests.dir/src/draco/scene/scene_are_equivalent_test.cc.o CMakeFiles/draco_tests.dir/src/draco/scene/scene_utils_test.cc.o CMakeFiles/draco_tests.dir/src/draco/scene/trs_matrix_test.cc.o CMakeFiles/draco_tests.dir/src/draco/texture/texture_library_test.cc.o CMakeFiles/draco_tests.dir/src/draco/texture/texture_map_test.cc.o CMakeFiles/draco_tests.dir/src/draco/texture/texture_transform_test.cc.o CMakeFiles/draco_tests.dir/src/draco/core/draco_test_utils.cc.o CMakeFiles/draco_tests.dir/src/draco/core/status.cc.o "CMakeFiles/draco_tests.dir/opt/local/src/googletest/src/gtest-all.cc.o" CMakeFiles/draco_tests.dir/opt/local/src/googletest/src/gtest_main.cc.o -o draco_tests-1.5.7 -Wl,-rpath,/opt/local/lib -Wl,--start-group libdraco.9.0.0.dylib libdraco_gtest.a libdraco_gtest_main.a libdraco_test_common.a -Wl,--end-group :info:build ld: unknown option: --start-group :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build make[2]: *** [draco_tests-1.5.7] Error 1 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/build' :info:build make[1]: *** [CMakeFiles/draco_tests.dir/all] Error 2 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/build' :info:build make: *** [all] Error 2 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/build' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/work/build" && /usr/bin/make -j8 -w all VERBOSE=ON :info:build Exit code: 2 :error:build Failed to build draco: command execution failed :debug:build Error code: CHILDSTATUS 23892 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec -callback portprogress::target_progress_callback build" :debug:build (procedure "portbuild::build_main" line 10) :debug:build invoked from within :debug:build "$procedure $targetname" :error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_draco/draco/main.log for details.
Any ideas to solve this issue ?
Nicolas.
comment:4 Changed 7 months ago by nilason (Nicklas Larsson)
A very short term "solution", if it is QGIS you want to install, is to install with qgis3
variant draco
turned off. E.g. sudo port install qgis3 -draco
.
I'll try update the Portfile as soon as possible to specify C++17 (in it self not complicated, but I discovered the tests are broken so I need to look in into that).
comment:5 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to Nicob73:
How can I specify C++14 for building this port ?
As I said, the port already specifies that it requires a C++14 compiler:
However, the build is failing with an error that suggests it actually needs a C++17 compiler:
/opt/local/include/eigen3/Eigen/src/Core/util/Meta.h:504:25: error: no type named 'invoke_result' in namespace 'std'
We see the same error on our highsierra buildbot worker. This error coming from an eigen3 header. It may be the case that everything that includes this eigen3 header now needs C++17 or newer. This is unexpected since eigen3 itself only declares that it requires C++11 or newer, and appears to build fine with that:
The draco build is already using the flag -std=gnu++1z
; 1z
is what the 17
standard was known as before it was known in what year it would be released. The compiler you were originally using (not sure which one since you didn't attach the main.log but clearly one provided by Xcode or its command line tools so based on XcodeVersionInfo the newest it could be is Apple LLVM version 10.0.0 (clang-1000.11.45.5)
) evidently claims to support some portion of C++17, but clearly not enough of it to satisfy draco. MacPorts believes (see CompilerSelection#LanguageStandards) that Apple LLVM version 10.0.0 (clang-1000.11.45.5)
(is the oldest version that) supports C++17, so if that's not enough for draco, the port may need to do additional compiler blacklisting.
Replying to Nicob73:
I progress a lot by using the following command :
sudo port install draco configure.compiler=macports-clang-14
But the port still failed with the following statements :
:info:build ld: unknown option: --start-groupAny ideas to solve this issue ?
It may not be productive to spend time diagnosing problems caused by selecting a compiler that MacPorts would not select. Let's let Nicklas fix the port so that it correctly indicates the language standard and what compilers it doesn't work with. Then, if the compiler MacPorts selects next still can't build it, we can investigate further.
comment:6 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to Nicob73:
:info:build ld: unknown option: --start-group
However a quick check suggests this is a mistake in the draco build system and I have filed a bug report with them about that: https://github.com/google/draco/issues/1058
comment:7 Changed 7 months ago by nilason (Nicklas Larsson)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:8 follow-up: 9 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Specifying the C++17 requirement is necessary but not sufficient to resolve the problem. When the Xcode version of clang doesn't support C++17 this will make MacPorts choose a MacPorts version of clang, which will then fail to build due to https://github.com/google/draco/issues/1058.
comment:9 Changed 7 months ago by nilason (Nicklas Larsson)
Replying to ryandesign:
Specifying the C++17 requirement is necessary but not sufficient to resolve the problem. When the Xcode version of clang doesn't support C++17 this will make MacPorts choose a MacPorts version of clang, which will then fail to build due to https://github.com/google/draco/issues/1058.
Thanks! PR23516 will hopefully address this, I'm not absolutely certain it will work for older systems with gcc though (not sure what linker they use).
comment:10 Changed 7 months ago by nilason (Nicklas Larsson)
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Any particular reason you're stuck on macOS 10.13.2? You should install 10.13.6 and all the security updates.
A quick search suggests
std::invoke_result
is C++17 but the port specifies that its requirement is C++14.