Hi, I am developing INDI focuser driver for my electronic focuser. Basically I have finished the driver code, built and test on X86 Ubuntu machine. Now the focuser can be controlled with indiserver running on x86 Ubuntu machine, and ekos on Windows.

Now I want to cross-compile INDI and the driver for Raspberry PI. I still use the 64bit X86 Ubuntu machine. I tried to build the indi core:
First I set the cross-compile tools:
export CC=arm-linux-gnueabihf-gcc
export CXX=arm-linux-gnueabihf-g++

Then I run cmake:
cmake -DCMAKE_INSTALL_PREFIX=~/indi/installarm -DCMAKE_BUILD_TYPE=Debug -DINDI_BUILD_UNITTESTS=1 -DINDI_BUILD_INTEGTESTS=1 ../../indi

Now I got the errors:
......
-- Looking for timespec_get
-- Looking for timespec_get - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.16/Modules/FindZLIB.cmake:115 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
libs/indidevice/CMakeLists.txt:5 (find_package)[/color]

It seems there is lack of ZLIB (and probably there are lack of other libs).

Could someone please help on that. Do I need to cross-compile those libs manually? Or is there any instructions for cross-compile INDI for Raspberry PI? Thanks!

Read More...