-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix compatibility with OpenCV 4.x #13
Conversation
I just tested it inside my project buildconf. I have issues
I fixed it with
Probably, it is matter of the project setup. |
About the CMake stuff, that's the meaning of
It should, at least that was my assumption. I was letting our CI test it. Can you do I haven't added explicit version checks. I definitely should. |
Sorry, just took a look inside the dep after my first post. I fixed the issue with not found opencv4. But the 2. issue remains. Here is output fo pkg-config with env.sh loaded:
opencv is 3.2 and installed by rock as os dep under system location |
Note that "sometimes" CMake "forgets" to rebuild things. Try maybe to clean the build between changes to So far, the introduction of this patch does not break the build on Ubuntu 18.04, which I would expect if it was trying to resolve |
@annaborn do you still have problems ? I can vouch that it builds on 18.04 with a "normal" environment and on 20.04 with Ubuntu's packaged opencv 4. Have you figured out your problem with the self-built opencv ? |
@doudou I did not have time to test it, but I will do it today or next days. |
@doudou: Even in new buildconf check the problem remains. After external/opencv4.2 gets installed, frame_helper links against it, not against From CMakeCache.txt you can see that pkgconfig_lib is set wrong:
Also LIB_DEPENDS contains a mix of opencv lib from system and from rock install.
I looked inside of Rock.cmake. The problem starts from
Theoretically, the In case of opencv4.2 both pathes are set correctly. Output for build frame_helper with opencv 3.2 (OPENCV4 OFF)
Output for build frame_helper with opencv 4.2 (OPENCV4 ON)
|
That is not exactly true. The dirs are used as a hint, since pkg-config filter out system paths... And herein lies the problem. I've been building all my projects for year with autoproj's You found the right place indeed. The I just created rock-core/base-cmake#60. However, there's another problem: include path collision. In this particular instance, there's no way to make sure you pick the right opencv: the CMake macros resolve the full path to the libraries, but the compiler is resolving the path to the includes and all of them need to be passed "as one". The most robust way to solve your particular problem is to enable separate prefixes in autoproj. It will make the dependencies a lot stricter (so, be aware that you might discover non-existing dependencies). The surest way is to delete the current prefix,
If you want to set it for all workspaces on your machine, add the line in Once it is set, you can also set
in my |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally the changes look fine to me, but since rock-core/base-cmake/pull/64 is still open some minor changes to CMakeLists.txt might still be required.
Depends on: