×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Build issue with INDI GPS NMEA driver on OS X

  • Posts: 21
  • Thank you received: 1
Hello,

I'm trying to build the GPS NMEA driver on OS X (10.11.6), but I'm getting the following error:
"Scanning dependencies of target indi_gpsnmea
[ 33%] Building CXX object CMakeFiles/indi_gpsnmea.dir/gpsnmea_driver.cpp.o
.../indi/3rdparty/indi-gpsnmea/gpsnmea_driver.cpp:32:10: fatal error:
'libnova/julian_day.h' file not found
#include <libnova/julian_day.h>
^
1 error generated.
make[2]: *** [CMakeFiles/indi_gpsnmea.dir/gpsnmea_driver.cpp.o] Error 1
make[1]: *** [CMakeFiles/indi_gpsnmea.dir/all] Error 2
make: *** [all] Error 2"

I checked and I have libnova-0.15.0 already installed, since it's used by the indilib itself.
It seems to be an issue with OS X, since I can build the library on Ubuntu Mate/RPi.

Thanks,
Andre
5 years 2 months ago #33942

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
Are you trying to build it separate from the 3rd party build? There are a couple of lines in the 3rd party cmakelists.txt that help it to find packages on Mac OS X. The easiest thing to do is to just run the 3rd party build. See these lines that I wrote a few months ago in github.com/indilib/indi/blob/master/3rdparty/CMakeLists.txt specifically to solve this problem because it kept happening for different packages. Unless you want to copy this code in to each package, just run the 3rd party build. Of course if you just want to build the GPS NMEA driver, you can just copy it in.

Thanks,

Rob

## Some files like libnova.h and libusb.h are in in subdirectories of the include directory
## For the CMAKE Modules, they find the subdirectory, so then something like ln_types.h should be #include ln_types.h
## But some packages and drivers write their header files like this: #include libnova/ln_types.h
## On Linux, this is fine since the top include directory such as /usr/include is already included and therefore
## <libnova/ln_types.h> is resolved. But on Mac it its not already in the path and has to be explicitly added.

if (APPLE)
##This one is needed for homebrew
include_directories( "/usr/local/include")
## This one is needed for Craft
include_directories("${CMAKE_INSTALL_PREFIX}/include")
endif(APPLE)
The following user(s) said Thank You: Andre Kovacs
5 years 2 months ago #33954

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1
Rob,

The issue was related to mac ports, since it installs the headers for libnova in /opt/local/include.
I had to change your configuration to:

if (APPLE)
##This one is needed for homebrew
include_directories( "/usr/local/include")
## This one is needed for Craft
include_directories("${CMAKE_INSTALL_PREFIX}/include")
## This one is needed for mac ports
include_directories( "/opt/local/include")
endif(APPLE)

Thanks,
Andre
5 years 2 months ago #33958

Please Log in or Create an account to join the conversation.

  • Posts: 2877
  • Thank you received: 812
I see, you are using Mac Ports, not homebrew. You should note I found there was not as much support for Mac Ports as there was for homebrew.

But I think we could add that line to the files the same way I did the others. Then INDI could be built with craft, homebrew, and macports. It's better to support more configurations. I will check with Jasem.
5 years 2 months ago #33961

Please Log in or Create an account to join the conversation.

Time to create page: 0.400 seconds