acgessler / assimp2json

JSON exporter for Open Asset Import Library to make 3D models accessible from JS/WebGl
http://assimp.sf.net
Other
188 stars 44 forks source link

Fails with latest assimp #23

Open dakom opened 6 years ago

dakom commented 6 years ago

It seems the codebase relies on some deprecated code from the core lib:

https://github.com/acgessler/assimp2json/blob/master/assimp2json/json_exporter.cpp#L23

wants to pull in https://github.com/assimp/assimp/blob/93bb63fdb40d9682e60ca97b0eda4951a552c742/code/BoostWorkaround/boost/scoped_ptr.hpp

But this hasn't existed in ~3 years?

aabbtree77 commented 4 years ago

Similarly here on Ubuntu 20.04:

tokyo@tokyo-Z87-DS3H:~/assimp2json/build$ make [ 20%] Building CXX object CMakeFiles/assimp2json.dir/assimp2json/json_exporter.cpp.o /home/tokyo/assimp2json/assimp2json/json_exporter.cpp:23:10: fatal error: assimp/../../code/BoostWorkaround/boost/scoped_ptr.hpp: No such file or directory 23 | #include <assimp/../../code/BoostWorkaround/boost/scoped_ptr.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [CMakeFiles/assimp2json.dir/build.make:76: CMakeFiles/assimp2json.dir/assimp2json/json_exporter.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/assimp2json.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

Does anyone know how to fix this? Assimp homepage, building without Boost mentions this: `` These implementations are very limited and are not intended for use outside assimp. A compiler with full support for partial template specializations is required. To enable the workaround, put the following in your compiler's list of predefined macros:

define ASSIMP_BUILD_BOOST_WORKAROUND

``

Where exactly does this line need to be placed in order to compile assimp without Boost, why does assimp2json use this non-intended case of assimp?

aabbtree77 commented 4 years ago

In case someone makes this mistake, I forgot to git clone assimp2json recursively, i.e. use "git clone --recurse-submodules" or "git clone" followed by "git submodule init && git submodule update" as Readme.md indicates. This seems to be an old code base that uses assimp v3 provided with it, the error above is the case when I try to use assimp2json with the assimp version 5.0.0 supplied by default on Ubuntu 20.04.

The compilation via direct "make" fails indeed on gtest as indicated at issue #17, but fortunately this is just some testing phase irrelevant to the program binary produced correctly as indicated there, "make assimp2json" works fine.