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

Building meshlabJS error in vcglib #145

Open
MikeCernea opened this issue Oct 19, 2021 · 1 comment
Open

Building meshlabJS error in vcglib #145

MikeCernea opened this issue Oct 19, 2021 · 1 comment

Comments

@MikeCernea
Copy link

No description provided.

@MikeCernea MikeCernea changed the title Helo, Building meshlabJS error in vcglib Oct 19, 2021
@MikeCernea MikeCernea reopened this Oct 19, 2021
@MikeCernea
Copy link
Author

Hello,

I am trying to compile MeshLabJS in order to learn how Emscripten and WASM works in conjunction with ThreeJS, but following the documentation, it fails with an error in vcglib unable to initialize Inertia.

Here is the complete output on Linux:
emcc -c -o Measure.bc Measure.cpp -I. -I ../../vcglib/ -I ../../vcglib/eigenlib -s TOTAL_MEMORY=536870912 -std=c++11 -s PRECISE_F32=1 -s DEMANGLE_SUPPORT=1 --bind -s LINKABLE=1 -Os emcc: warning: linker setting ignored during compilation: 'TOTAL_MEMORY' [-Wunused-command-line-argument] emcc: warning: linker setting ignored during compilation: 'PRECISE_F32' [-Wunused-command-line-argument] emcc: warning: linker setting ignored during compilation: 'DEMANGLE_SUPPORT' [-Wunused-command-line-argument] emcc: warning: linker setting ignored during compilation: 'LINKABLE' [-Wunused-command-line-argument] In file included from Measure.cpp:1: In file included from ./mesh_def.h:10: In file included from ../../vcglib/vcg/complex/algorithms/update/quality.h:25: ../../vcglib/vcg/complex/algorithms/stat.h:255:23: error: no matching constructor for initialization of 'Inertia<vcg::tri::Stat<MyMesh>::MeshType>' (aka 'Inertia<MyMesh>') Inertia<MeshType> I(m); ^ ~ Measure.cpp:161:38: note: in instantiation of member function 'vcg::tri::Stat<MyMesh>::ComputeMeshVolume' requested here float meshVol = tri::Stat<MyMesh>::ComputeMeshVolume(baseM); ^ ../../vcglib/vcg/complex/algorithms/inertia.h:54:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const vcg::tri::Stat<MyMesh>::MeshType' (aka 'const MyMesh') to 'const vcg::tri::Inertia<MyMesh>' for 1st argument class Inertia ^ ../../vcglib/vcg/complex/algorithms/inertia.h:54:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'const vcg::tri::Stat<MyMesh>::MeshType' (aka 'const MyMesh') to 'vcg::tri::Inertia<MyMesh>' for 1st argument ../../vcglib/vcg/complex/algorithms/inertia.h:91:2: note: candidate constructor not viable: 1st argument ('const vcg::tri::Stat<MyMesh>::MeshType' (aka 'const MyMesh')) would lose const qualifier Inertia(MeshType &m) {Compute(m);} ^ 1 error generated. emcc: error: '/home/poly/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fno-inline-functions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=31 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/home/poly/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -c -I. -I../../vcglib/ -I../../vcglib/eigenlib -std=c++11 -Os Measure.cpp -o Measure.bc' failed (returned 1) make: *** [MakefileJS:27: Measure.bc] Error 1

It is the same output on Windows, sort of speak, as build.bat does not exist, so I am using the same make -f MakefileJS command.

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

No branches or pull requests

1 participant