Hi, I'm having problems building the latest EKOS on MacOS. I'm following instructions from here: "github.com/rlancaste/kstars-on-osx-craft". The build script fails compiling drvrnet.c in the cfitsio library.
Does anyone have any ideas?
-- Build files have been written to: /Users/johnevans/AstroRoot/craft-root/build/libs/cfitsio/work/build
executing command: /Users/johnevans/AstroRoot/craft-root/dev-utils/bin/ninja -j 16
[1/90] Building C object CMakeFiles/cfitsio.dir/drvrgsiftp.c.o
[2/90] Building C object CMakeFiles/cfitsio.dir/drvrsmem.c.o
[3/90] Building C object CMakeFiles/Fitscopy.dir/fitscopy.c.o
[4/90] Building C object CMakeFiles/Funpack.dir/funpack.c.o
[5/90] Building C object CMakeFiles/cfitsio.dir/drvrnet.c.o
FAILED: CMakeFiles/cfitsio.dir/drvrnet.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DCFITSIO_HAVE_CURL -DHAVE_NET_SERVICES -Dcfitsio_EXPORTS -isystem /Users/johnevans/AstroRoot/craft-root/include -fdiagnostics-color=always -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -mmacosx-version-min=10.13 -fPIC -MD -MT CMakeFiles/cfitsio.dir/drvrnet.c.o -MF CMakeFiles/cfitsio.dir/drvrnet.c.o.d -o CMakeFiles/cfitsio.dir/drvrnet.c.o -c /Users/johnevans/AstroRoot/craft-root/build/libs/cfitsio/work/cfitsio/drvrnet.c
/Users/johnevans/AstroRoot/craft-root/build/libs/cfitsio/work/cfitsio/drvrnet.c:313:7: error: implicit declaration of function 'alarm' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
alarm(0);
I seem to remember we had this issue before with a function called alarm. What version of macOS are you building on? There are several possible solutions. I will have to see if I can remember what caused it the last time. One solution if alarm is actually fine is to turn off the implicit declaration flag in the recipe. Another is that maybe a package is outdated and needs updating. Or maybe a header file needs to be included.
Also note that we now have daily builds on kde binary factory since I got most of the script functions into the craft recipes. So if you just want the latest version you can just download it.
Taking a step back, what I'm doing is trying to get a Qt environment working. I have some changes that I've made against a previous version of EKOS that I wanted to put into 3.6.8 and finish off what I'm doing. If what I'm doing works I'd like to push the changes back into the core product.
So previously I built Kstars using the script then followed the instructions to get Kstars working in Qt. So trying to get back to this point with 3.5.8
I'm aware of the daily builds but obviously that won't help with what I'm trying to do at the moment.
I haven't had this problem with "alarm" before so I guess previously something like your suggestion to "turn off the implicit declaration flag in the recipe" had been done but somehow now its turned on.