opencv: error: 'posix_memalign' was not declared in this scope
Env:
OS: Windows 10 , 64 bits
CMake: 3.12.0
Compiler: mingw-w64 with x86_64-8.1.0-posix-seh-rt_v6-rev0
Replication:
- Git clone OpenCV.git and OpenCV_contrib.git. Here:
OpenCV: 5115e5decbef657ceb234d21ad8e8e33a6c96ca4 OpenCV_Contrib: 7c619cba3379342aa59461dfb055acdb03b439f1
- Build with the command :
cmake -DCMAKE_BUILD_TYPE=Release ^
-DENABLE_PRECOMPILED_HEADERS=OFF ^
-DWITH_CUDA=OFF ^
-DWITH_IPP=OFF ^
-DWITH_MSMF=OFF ^
-DWITH_OPENCL=OFF ^
-DOPENCV_EXTRA_MODULES_PATH=c:\OpenCVContrib_GitDir\modules ^
-G "MinGW Makefiles" ^
c:\OpenCV_GitDir
then mingw32-make -j8
. This will produce:
...\3rdparty\ade\ade-0.1.1c\sources\ade\source\alloc.cpp:31:16: error: 'posix_memalign' was not declared in this scope
auto res = posix_memalign(&ret, std::max(sizeof(void*), alignment), size);
Observation:
Maybe the line jas_malloc.c#L106 https://github.com/opencv/opencv/blob/b39cd06249213220e802bb64260727711d9fc98c/3rdparty/libjasper/jas_malloc.c#L106 missed the HAVE_POSIX_MEMALIGN
checking.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 28 (13 by maintainers)
Wow, just noticed that. Let’s bump the ADE version to address this issue as well
D’oh! Okay, after fixing my typo, unfortunately, the problem persists.
/cc @dmatveev @Hardcode84 relates #9237
ADE fix: https://github.com/opencv/ade/pull/6