Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meshoptimizersceneconverter build failed because meshoptimizer has updated #138

Closed
LilyWangLL opened this issue Apr 26, 2023 · 2 comments
Closed

Comments

@LilyWangLL
Copy link

Hi, I installed meshoptimizersceneconverter plugin failed with the following error:

C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(318): error C2660: 'meshopt_simplifySloppy': function does not take 7 arguments
C:\Users\admin\git_projects\vcpkg2\vcpkg_installed\x64-windows\include\meshoptimizer.h(354): note: see declaration of 'meshopt_simplifySloppy'
C:\Users\admin\git_projects\vcpkg2\vcpkg_installed\x64-windows\include\meshoptimizer.h(620): note: could be 'size_t meshopt_simplifySloppy(T *,const T *,size_t,const float *,size_t,size_t,size_t,float,float *)'
C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(318): note: 'size_t meshopt_simplifySloppy(T *,const T *,size_t,const float *,size_t,size_t,size_t,float,float *)': expects 9 arguments - 7 provided
C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(318): note: while trying to match the argument list '(T *, Corrade::Containers::ArrayView<const Magnum::UnsignedInt>, Magnum::UnsignedInt, const float *, Magnum::UnsignedInt, __int64, const Magnum::UnsignedInt)'
        with
        [
            T=Magnum::UnsignedInt
        ]
C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(320): error C2660: 'meshopt_simplify': function does not take 8 arguments
C:\Users\admin\git_projects\vcpkg2\vcpkg_installed\x64-windows\include\meshoptimizer.h(339): note: see declaration of 'meshopt_simplify'
C:\Users\admin\git_projects\vcpkg2\vcpkg_installed\x64-windows\include\meshoptimizer.h(618): note: could be 'size_t meshopt_simplify(T *,const T *,size_t,const float *,size_t,size_t,size_t,float,unsigned int,float *)'
C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(320): note: 'size_t meshopt_simplify(T *,const T *,size_t,const float *,size_t,size_t,size_t,float,unsigned int,float *)': could not deduce template argument for 'const T *' from 'Corrade::Containers::ArrayView<const Magnum::UnsignedInt>'
C:\Users\admin\git_projects\vcpkg2\buildtrees\magnum-plugins\src\v2020.06-79ad147c2a.clean\src\MagnumPlugins\MeshOptimizerSceneConverter\MeshOptimizerSceneConverter.cpp(320): note: while trying to match the argument list '(T *, Corrade::Containers::ArrayView<const Magnum::UnsignedInt>, Magnum::UnsignedInt, const float *, Magnum::UnsignedInt, __int64, const Magnum::UnsignedInt, const Magnum::Float)'
        with
        [
            T=Magnum::UnsignedInt
        ]

The reason is meshoptimizer modified function meshopt_simplifySloppy and meshopt_simplify, their parameters have changed, the related link: zeux/meshoptimizer@66040c7 and zeux/meshoptimizer#217

Can someone help fix this error please? Thank you.

@mosra
Copy link
Owner

mosra commented Apr 26, 2023

Hi, I think this should work in current master, I did a similar fix in 408c973 (August 2022).

As far as I can see, you're building version 2020.06 which is too old to work with current meshoptimizer. If you build current HEAD instead it should work, but note you have to do that for Corrade and Magnum too:

vcpkg install --head corrade magnum magnum-plugins

Unfortunately due to time pressure on my side I'm unable to tag a new version anytime soon, so you have to keep using the --head, sorry. Which also means the 2020.06 version in vcpkg either can't build with the meshoptimizer plugin or it has to pin the meshoptimizer dependency to an older version, if that's possible.

You can subscribe to mosra/magnum#453 for updates about the new release.

@mosra
Copy link
Owner

mosra commented Nov 2, 2024

Closing as there's nothing actionable left to do, besides making the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants