openvdb icon indicating copy to clipboard operation
openvdb copied to clipboard

[BUG] SOP_OpenVDB_Activate.cc doesn't compile successfully with Houdini 21

Open callen128 opened this issue 3 months ago • 4 comments

Environment

Operating System: Linux Rocky 9.5 Commit SHA: 584b2b5a1b43641d54f942d981d7b50887b27d92

Describe the bug

When SOP_OpenVDB_Activate.cc was updated for Houdini 21.0's API changes, the function prototypes for inputLabel() and isRefInput() were updated to take an OP_InputIdx instead of an unsigned int, but the implementations at the bottom of the file still take unsigned int, giving a compiler error.

To Reproduce

Steps to reproduce the behavior: Build the Houdini plugin SOP_OpenVDB_Activate.cc with Houdini 21.0.440 See the compiler error:

openvdb/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Activate.cc:1297:1: error: no declaration matches ‘const char* SOP_VDBActivate::inputLabel(unsigned int) const’
 1297 | SOP_VDBActivate::inputLabel(unsigned index) const
      | ^~~~~~~~~~~~~~~
openvdb/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Activate.cc:63:18: note: candidate is: ‘virtual const char* SOP_VDBActivate::inputLabel(OP_InputIdx) const’
   63 |     const char  *inputLabel(OP_InputIdx idx) const override;
      |                  ^~~~~~~~~~
openvdb/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Activate.cc:60:7: note: ‘class SOP_VDBActivate’ defined here
   60 | class SOP_VDBActivate : public hvdb::SOP_NodeVDB
      |       ^~~~~~~~~~~~~~~
openvdb/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Activate.cc:1310:1: error: no declaration matches ‘int SOP_VDBActivate::isRefInput(unsigned int) const’
 1310 | SOP_VDBActivate::isRefInput(unsigned i) const
      | ^~~~~~~~~~~~~~~
openvdb/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Activate.cc:64:18: note: candidate is: ‘virtual int SOP_VDBActivate::isRefInput(OP_InputIdx) const’
   64 |     int          isRefInput(OP_InputIdx i) const override;
      |                  ^~~~~~~~~~
openvdb/openvdb_houdini/openvdb_houdini/SOP_OpenVDB_Activate.cc:60:7: note: ‘class SOP_VDBActivate’ defined here
   60 | class SOP_VDBActivate : public hvdb::SOP_NodeVDB
      |       ^~~~~~~~~~~~~~~
gmake[2]: *** [openvdb_houdini/openvdb_houdini/CMakeFiles/SOP_OpenVDB_Activate.dir/build.make:79: openvdb_houdini/openvdb_houdini/CMakeFiles/SOP_OpenVDB_Activate.dir/SOP_OpenVDB_Activate.cc.o] Error 1

callen128 avatar Sep 11 '25 00:09 callen128

Hey @callen128 thanks for this report. I've just bumped our CI to build for Houdini 21 and can see the error too.

@jmlait is there anything additional you have to downstream here? CI builds logs here: https://github.com/AcademySoftwareFoundation/openvdb/actions/runs/17843908858

Idclip avatar Sep 19 '25 00:09 Idclip

I see that the repo has now been tagged with v13.0.0. Is it possible to get the Houdini 21.0 fix back-ported to v12.0? We're hoping to switch to H21 soon, and like to be on the same major version that ships with Houdini. :)

callen128 avatar Nov 08 '25 00:11 callen128

Hi @callen128, I believe this fix was released with 12.1.1:

Image

Can you give that a shot?

Idclip avatar Nov 08 '25 00:11 Idclip

An additional note:

Wanting to be on the same major version to that which is shipped with Houdini makes total sense - but we also guarantee ABI compatibility with Houdini via OpenVDB's ABI version. In a given major release, we currently support the previous 2 ABI's - e.g. for OpenVDB 13, ABI's 12 and 11 are supported. So you can use newer versions with the older ABI, should you wish to. In this case, you would build OpenVDB 13.0.0 with : -D OPENVDB_ABI_VERSION_NUMBER=12 for H21 (you may also need to specify -D DISABLE_DEPENDENCY_VERSION_CHECKS=ON)

Idclip avatar Nov 08 '25 01:11 Idclip