I'm trying to build from source on Solaris 10 as explained in the build from source .
But while compiling at about 11% for latest git code it fails with the following error:
In file included from /usr/include/stdlib.h:17:0,
from /opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include/mm_malloc.h:27,
..............................................
from /opt/opencv/release/modules/core/precomp.hpp:49:
/usr/include/iso/stdlib_iso.h:118:38: error: conflicting declaration of 'void* std::bsearch(const void, const void, std::size_t, std::size_t, int ()(const void, const void))' with 'C++' linkage
int ()(const void , const void *));
^
/usr/include/iso/stdlib_iso.h:113:14: note: previous declaration with 'C' linkage
extern void *bsearch(const void *, const void *, size_t, size_t,
......................................................................................
Error code 1
The following command caused the error:
cd /opt/opencv/release/modules/core && /opt/csw/bin/c++ -O2 -DNDEBUG -DNDEBUG -fPIC "-D__OPENCV_BUILD=1" "-DCVAPI_EXPORTS" -isystem"/opt/opencv/release" -isystem"/opt/opencv/release" -I"/opt/opencv/modules/core/include" -I"/opt/opencv/modules/core/src" -isystem"/opt/opencv/release/modules/core" -I"/opt/opencv/modules/core/include" -isystem"/usr/include" -isystem"/opt/opencv/3rdparty/include/opencl/1.2" -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -pthread -march=i686 -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mfpmath=sse -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -DCVAPI_EXPORTS -x c++-header -o /opt/opencv/release/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch /opt/opencv/release/modules/core/precomp.hpp
make: Fatal error: Command failed for target modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch'
Current working directory /opt/opencv/release
*** Error code 1
The following command caused the error:
make -f modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build
make: Fatal error: Command failed for target
modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all'
Current working directory /opt/opencv/release
* Error code 1
The following command caused the error:
make -f CMakeFiles/Makefile2 all
make: Fatal error: Command failed for target `all'
The same error occurs for 2.4.13 .
I am using the OpenCSW packages, equivalent, to compile (gcc5core, gcc5g++, etc)
Does anybody have any recommendation on how I could get the JAVA jar and the libopencv_java2413.so.
I compiled the source packages on Windows and Ubuntu without any issues but the final package will be ran on a Solaris machine.