mmdeploy icon indicating copy to clipboard operation
mmdeploy copied to clipboard

[Bug] error: cannot declare variable ‘mmdeploy::status_domain’ to be of abstract type ‘mmdeploy::StatusDomain’

Open jhxiang opened this issue 2 years ago • 3 comments

Checklist

  • [X] I have searched related issues but cannot get the expected help.
  • [x] 2. I have read the FAQ documentation but cannot get the expected help.
  • [ ] 3. The bug has not been fixed in the latest version.

Describe the bug

When I use mmdeploy on the jetson platform, I encounter the following problem: In file included from /home/nvidia/ws/mmdeploy/csrc/mmdeploy/core/serialization.h:14:0, from /home/nvidia/ws/mmdeploy/csrc/mmdeploy/core/model.h:12, from /home/nvidia/ws/mmdeploy/csrc/mmdeploy/core/model.cpp:3: /home/nvidia/ws/mmdeploy/csrc/mmdeploy/core/status_code.h:152:31: error: cannot declare variable ‘mmdeploy::status_domain’ to be of abstract type ‘mmdeploy::StatusDomain’ constexpr inline StatusDomain status_domain; ^~~~~~~~~~~~~ /home/nvidia/ws/mmdeploy/csrc/mmdeploy/core/status_code.h:98:20: note: because the following virtual functions are pure within ‘mmdeploy::StatusDomain’: class MMDEPLOY_API StatusDomain : public SYSTEM_ERROR2_NAMESPACE::status_code_domain {

Reproduction

This error occurred when I compiled the mmdeploy library and I don't modify the code.

Environment

jetpack==4.6
python==3.6
cuda==10.2
tensorrt==8.2
mmpose==0.29.0
mmdeploy==0.12.0

Error traceback

No response

jhxiang avatar Oct 20 '23 15:10 jhxiang

I also have this error. in status_code.h

line 152
constexpr inline StatusDomain status_domain;

Gives me the compile error 'mmdeploy::StatusDomain': cannot instantiate abstract class. This occurred after I packaged mmdeploy using vcpkg. Any fixes?

cravies avatar Sep 24 '24 21:09 cravies

Is there any progress or workaround for this bug?

arpit15 avatar Jan 16 '25 17:01 arpit15

The problem is due to a version mismatch between MMDeploy and the outcome library. You need to specify the outcome library to use at compile time, which is in your MMDeploy installation path. For example/share/jobdata/d2023305142 / mmdeploy/include/mmdeploy/third_party/outcome. Make sure to specify this path at compile time, not outcome in the system.

william20001120 avatar Jun 08 '25 16:06 william20001120