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

Build Docker GPU: Error pose_detection.cpp:35:82: error: too many arguments to function 'int mmdeploy_pose_detector_apply #306

Closed
oliver0706 opened this issue Apr 2, 2022 · 3 comments

Comments

@oliver0706
Copy link

When I failed to build a gpu docker image. There is a error blow:

/root/workspace/mmdeploy/build/install/example/pose_detection.cpp: In function 'int main(int, char**)':
/root/workspace/mmdeploy/build/install/example/pose_detection.cpp:35:82: error: too many arguments to function 'int mmdeploy_pose_detector_apply(mm_handle_t, const mm_mat_t*, int, mm_pose_detect_t**)'
   35 |   status = mmdeploy_pose_detector_apply(pose_estimator, &mat, 1, &res, &res_count);
      |                                                                                  ^
In file included from /root/workspace/mmdeploy/build/install/example/pose_detection.cpp:7:
/root/workspace/mmdeploy/build/install/include/c/pose_detector.h:59:18: note: declared here
   59 | MMDEPLOY_API int mmdeploy_pose_detector_apply(mm_handle_t handle, const mm_mat_t* mats,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/pose_detection.dir/build.make:63: CMakeFiles/pose_detection.dir/pose_detection.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:110: CMakeFiles/pose_detection.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:84: all] Error 2
The command '/bin/sh -c cd /root/workspace/mmdeploy &&    rm -rf build/CM* build/cmake-install.cmake build/Makefile build/csrc &&    mkdir -p build && cd build &&    cmake ..         -DMMDEPLOY_BUILD_SDK=ON         -DCMAKE_CXX_COMPILER=g++         -Dpplcv_DIR=/root/workspace/ppl.cv/cuda-build/install/lib/cmake/ppl         -DTENSORRT_DIR=${TENSORRT_DIR}         -DMMDEPLOY_BUILD_SDK_PYTHON_API=ON         -DMMDEPLOY_TARGET_DEVICES="cuda;cpu"         -DMMDEPLOY_TARGET_BACKENDS="trt"         -DMMDEPLOY_CODEBASES=all &&    make -j$(nproc) && make install &&    cd install/example  && mkdir -p build && cd build &&    cmake -DMMDeploy_DIR=/root/workspace/mmdeploy/build/install/lib/cmake/MMDeploy .. &&    make -j$(nproc) && export SPDLOG_LEVEL=warn &&    if [ -z ${VERSION} ] ; then echo "Built MMDeploy master for GPU devices successfully!" ; else echo "Built MMDeploy version v${VERSION} for GPU devices successfully!" ; fi' returned a non-zero code: 2

How would I fix this error?

@wangqixun
Copy link

+1

@irexyc
Copy link
Collaborator

irexyc commented Apr 2, 2022

@oliver0706 @wangqixun

Sorry, I forget to remove the unused variable in demo code.

You could remove the res_count variable for now.

remove line 34 and change line 35 to

status = mmdeploy_pose_detector_apply(pose_estimator, &mat, 1, &res);

@irexyc
Copy link
Collaborator

irexyc commented Apr 2, 2022

rebuild should be ok now

@lvhan028 lvhan028 closed this as completed Apr 5, 2022
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

4 participants