Compiling mantaflow with OpenVDB

135 views
Skip to first unread message

Samuel G-C

unread,
Oct 18, 2018, 1:29:58 PM10/18/18
to mantaflow Forum
Hi,

I am just trying to compile mantaflow with OpenVDB, but running into some trouble.
I can compile it fine without OpenVDB, but not with. OpenVDB is installed in my <manta-dir> as explained in the Cmake file.
And running the cmake works. It finds OpenVDB and such. Here is my cmake command for reference:

cmake .. -DOPENMP=ON -DPYTHON_VERSION=2.7 -DNUMPY=ON -DOPENVDB=ON

However when I run the resulting make I get this error:

make[2]: *** No rule to make target `../openVDB/lib/openVDB.lib', needed by `manta'.  Stop.
make[2]: *** Waiting for unfinished jobs....
[ 98%] Building CXX object CMakeFiles/manta.dir/pp/source/registration.cpp.o
make[1]: *** [CMakeFiles/manta.dir/all] Error 2

I have looked around in the make files and saw that it is in fact requesting the .lib file.
I do not know how to build said lib file though if that is something that must be done before running mantaflow's make.
Any help would be appreciated.

Thanks.

Nils Thuerey

unread,
Oct 26, 2018, 4:27:27 AM10/26/18
to mantaflow Forum
Hi, it looks like you're using linux? There it's usually easiest to install openvdb via apt. We've tested on ubuntu, and there it should work using the system wide library files.

Cheers, Nils

Samuel G-C

unread,
Oct 26, 2018, 2:42:46 PM10/26/18
to mantaflow Forum
Thanks for getting back to me quickly on this.

I am using a linux system, but I am not sure I understand the linking still.
I have installed openvdb through apt-get so I have the .so's in my system. I am just not sure how to link this to mantaflow.
Do I have to modify any of the cmake files for it to look for these elsewhere?
I have been looking at the FindOpenVDB.cmake file and am not sure how to modify it to look for openvdb elsewher than the manta directory.
I have tried modifying several of the parameters in there but nothing has seemed to work.

Sorry for the bother if this is a simplistic problem.
Thanks again,
Samuel

Nils Thuerey

unread,
Oct 29, 2018, 2:08:37 PM10/29/18
to mantaflow Forum
No problem! The OpenVDB integration is tested much to be honest, so it's good to get feedback there! And you're right, no .lib files should be included when linking under linux. Could you try moving/renaming the mantaflow/openVDB directory? Under linux, the .so files should be automatically found, the FindOpenVDB code is mostly for windows. When the openVDB directory is found, it tries to add the libraries from there, but that shouldnt be necessary.

Cheers, Nils

Samuel G-C

unread,
Oct 29, 2018, 2:27:19 PM10/29/18
to mantaflow Forum
That did the trick.
Looks like having the mantaflow/openVDB directory there was stopping it from automatically finding the built in .so files. I simply deleted it and it works great.
Thanks again.

Cheers, Samuel

Nils Thuerey

unread,
Oct 29, 2018, 2:41:46 PM10/29/18
to mantaflow Forum
That's good to hear! We'll clarify that for the next release.

Cheers, Nils
Reply all
Reply to author
Forward
0 new messages