Opened 4 years ago
Closed 4 years ago
#62462 closed defect (fixed)
opencv4 upgrade fails
Reported by: | dershow | Owned by: | stromnov (Andrey Stromnov) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | mascguy (Christopher Nielsen), cjones051073 (Chris Jones) | |
Port: | opencv4 |
Description
I have 4.5.0_5 installed and just tried to upgrade to 4.5.1_0. But, it fails with a bunch of implicit conversion errors. Log is attached.
Attachments (1)
Change History (11)
Changed 4 years ago by dershow
comment:1 Changed 4 years ago by mf2k (Frank Schima)
Cc: | mascguy added; stromnov removed |
---|---|
Owner: | set to stromnov |
Status: | new → assigned |
comment:2 Changed 4 years ago by cjones051073 (Chris Jones)
Cc: | cjones051073 added |
---|
comment:3 Changed 4 years ago by mascguy (Christopher Nielsen)
comment:4 Changed 4 years ago by mascguy (Christopher Nielsen)
Maintainers: This problem will be eliminated once all dependent ports have been migrated from opencv
to opencv3
. The latter is fully isolated, to avoid possible clashes like this.
But if we want to fix this ASAP, it might be possible to do so via one or more CMake arguments. Haven't looked yet, but my guess is that it might be possible...
comment:5 Changed 4 years ago by cjones051073 (Chris Jones)
Note that the builds are also failing in the buildbots for mac OS 10.12 and older
Maybe for different reasons
comment:6 Changed 4 years ago by mascguy (Christopher Nielsen)
We may want to revert back to 4.5.0 for now, as 4.5.1 also breaks the contrib variant.
The contrib-related issue is mentioned in the following ticket:
comment:7 Changed 4 years ago by mascguy (Christopher Nielsen)
The compilation error on the 10.12 buildbot is as follows:
In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/imgcodecs/src/macosx_conversions.mm:6: In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/imgcodecs/src/apple_conversions.h:8: In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core.hpp:54: In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core/base.hpp:58: In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core/cvstd.hpp:81: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core/cvstd_wrapper.hpp:45:160: error: too many arguments provided to function-like macro invocation static CV_CONSTEXPR std::true_type check(typename std::is_same<typename std::decay<decltype(std::declval<T>().operator()(std::declval<Args>()...))>::type, Ret>::type*); ^ /usr/include/AssertMacros.h:1291:10: note: macro 'check' defined here #define check(assertion) __Check(assertion) ^ In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/imgcodecs/src/macosx_conversions.mm:6: In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/imgcodecs/src/apple_conversions.h:8: In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core.hpp:54: In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core/base.hpp:58: In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core/cvstd.hpp:81: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core/cvstd_wrapper.hpp:45:40: warning: variable templates are a C++14 extension [-Wc++14-extensions] static CV_CONSTEXPR std::true_type check(typename std::is_same<typename std::decay<decltype(std::declval<T>().operator()(std::declval<Args>()...))>::type, Ret>::type*); ^ /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core/cvstd_wrapper.hpp:45:40: error: declaration of constexpr static data member 'check' requires an initializer /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core/cvstd_wrapper.hpp:47:31: error: constexpr can only be used in variable and function declarations template<typename> static CV_CONSTEXPR std::false_type check(...); ^ /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core/cvdef.h:757:26: note: expanded from macro 'CV_CONSTEXPR' # define CV_CONSTEXPR constexpr ^
With the following potential hint:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_opencv4/opencv4/work/opencv-4.5.1/modules/core/include/opencv2/core/utility.hpp:53:4: warning: Detected Apple 'check' macro definition, it can cause build conflicts. Please, include this header before any Apple headers. [-W#warnings] # warning Detected Apple 'check' macro definition, it can cause build conflicts. Please, include this header before any Apple headers. ^
Not yet sure whether the errors are caused by header file include order (per the hint), the C++ standard declaration, Xcode Clang 9.0, or...
Need to do more digging...
comment:8 Changed 4 years ago by mascguy (Christopher Nielsen)
@cjones051073, it looks like a patch was committed for the build errors on 3/20? I'm also seeing a published binary for 10.12 with that date.
Can you confirm that we're all good...?
comment:9 Changed 4 years ago by mascguy (Christopher Nielsen)
Folks, I believe this defect can be closed, as binaries are being successfully built across-the-board.
comment:10 Changed 4 years ago by Christopher Nielsen <mascguy@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Based on what I'm seeing in the build log, it looks like
opencv4
is referencing headers provided byopencv
. This only occurs whenopencv4
is built from source, ANDopencv
is already installed.To fix the issue, do the following:
opencv
(viasudo port -f deactivate opencv
);opencv4
(viasudo port upgrade opencv4
);opencv
(viasudo port activate opencv
).Let us know if that fixes the problem.