Stellarium compilation with INDI support in Windows.

11 views
Skip to first unread message

Oriol de la Vega

unread,
Sep 12, 2025, 9:39:20 PM (9 days ago) Sep 12
to Stellarium
Hi, 
Just to report I could compile Stellarium with INDI support in Windows. Couldn't test if the scope control works well but I see no reason why it shouldn't.

Note that I'm no expert, I got a lot of help from ChatGPT... I built it using MSYS2/mingw-w64. I probably do not remember it all but basically what I did is:

Update the environment:

$pacman -Syu

 Install all dependencies could be more but this is a good start:

pacman -S --needed \
  mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja \
  mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-svg \
  mingw-w64-x86_64-qt6-serialport mingw-w64-x86_64-qt6-multimedia \
  mingw-w64-x86_64-cfitsio mingw-w64-x86_64-zlib \
  mingw-w64-x86_64-qt6-charts mingw-w64-x86_64-qt6-tools \
  mingw-w64-x86_64-qt6-declarative mingw-w64-x86_64-qt6-quickcontrols2 \ 
  mingw-w64-x86_64-qt6-shadertools mingw-w64-x86_64-libnova git 

Compile and install INDI:

$cd ~
$git clone https://github.com/indilib/indi.git
$cd indi && mkdir build && cd build
$cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/mingw64 \
      -DBUILD_LIBS=ON -DBUILD_CLIENT=ON -DBUILD_DRIVERS=OFF -DBUILD_SERVER=OFF ..
$ninja
$ninja install
$install -Dm644 ~/indi/libs/indibase/*.h /mingw64/include/libindi/
$install -Dm644 ~/indi/libs/indicore/libastro.h /mingw64/include/libindi/libastro.h

Then we should clone stellarium:

$cd ~
$git clone https://github.com/Stellarium/stellarium.git
$cd stellarium && mkdir build && cd build

Change CmakeLists.txt, from line 427:
# Activate support for INDI client in Telescope Control plugin
IF(WIN32)
     # Disable support for INDI client in Windows
     SET(ENABLE_INDI 1 CACHE BOOL "Define whether to use INDI client in Telescope Control plugin.")
ELSE()
     SET(ENABLE_INDI 1 CACHE BOOL "Define whether to use INDI client in Telescope Control plugin.")
ENDIF()
Of course I should have get rid of the IF but I really didn't want to broke anything.

Then we should configure the compiler:

$cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=6 \
      -DENABLE_INDI=ON -DCMAKE_PREFIX_PATH=/mingw64 ..

If there are errors at this stage it's probably because of missing dependencies. Installing them should resolve these errors. After that the usual would be to try and compile. But it resulted in a lot of errors and the compilation failing. This required patching the supplied libnova.h. I would advise a backup it before that (or you could reinstall it later of course if something goes wrong)

$ cp /mingw64/include/libnova/utility.h /mingw64/include/libnova/utility.h.bak

After that, you should edit  /mingw64/include/libnova/utility.h and, at line 219:

int gettimeofday(struct posix_timeval *tp, struct posix_timezone *tzp);

Should be disabled for WIN32 because there is another definition coming from INDI. So:

#ifndef _WIN32
int gettimeofday(struct posix_timeval *tp, struct posix_timezone *tzp);
#endif


After all that, it SHOULD compile... I I did not forgot anything that is...

$ninja -j8

After compilation, you should copy stellarium.exe and libstelMain.dll from ~/stellarium/src/ to ~/stellarium/dist/

From dist/ you should run:
$/mingw64/bin/windeployqt6.exe --dir dist dist/stellarium.exe
MAYBE it's needed to copy:

$cp -u /mingw64/bin/libindiclient.dll dist/

I say maybe because my official installation of stellarium 24.x with indi support does not have it and it happily runs. But that was not compiled using the same environment so who knows.

$cp -u ~/stellarium/util/spout2/x64/SpoutLibrary.dll dist/
$cp -u /mingw64/bin/libgcc_s_seh-1.dll /mingw64/bin/libstdc++-6.dll /mingw64/bin/libwinpthread-1.dll dist/

That's not exhaustive. I ended up with the followind dlls:

08/09/2025  06:28        20.363.247 avcodec-62.dll
08/09/2025  06:28         2.872.925 avformat-62.dll
08/09/2025  06:28         1.332.084 avutil-60.dll
10/09/2025  16:05         4.669.440 D3Dcompiler_47.dll
12/09/2025  01:47            34.653 libb2-1.dll
12/09/2025  01:46           143.429 libbrotlicommon.dll
12/09/2025  01:46            60.413 libbrotlidec.dll
12/09/2025  01:46           100.964 libbz2-1.dll
12/09/2025  01:29         1.948.214 libcfitsio-10.dll
12/05/2025  20:16            99.228 libdeflate.dll
12/09/2025  01:47            77.298 libdouble-conversion.dll
12/09/2025  01:46           792.187 libfreetype-6.dll
12/09/2025  01:25           150.196 libgcc_s_seh-1.dll
12/09/2025  01:51         1.555.906 libglib-2.0-0.dll
12/09/2025  01:52           152.538 libgraphite2.dll
12/09/2025  01:46         1.519.028 libharfbuzz-0.dll
12/09/2025  01:53         1.136.529 libiconv-2.dll
12/09/2025  01:52        31.908.902 libicudt77.dll
12/09/2025  01:47         3.199.298 libicuin77.dll
12/09/2025  01:48         1.953.046 libicuuc77.dll
12/09/2025  01:25         1.407.538 libindiclient.dll
12/09/2025  01:52           301.688 libintl-8.dll
10/09/2025  20:38           452.001 libjasper.dll
18/08/2023  11:47            62.083 libjbig-0.dll
05/09/2025  14:11           929.188 libjpeg-8.dll
10/02/2025  08:17           444.409 liblcms2-2.dll
29/07/2022  10:34           761.261 libLerc.dll
11/04/2025  14:15           188.764 liblzma-5.dll
12/09/2025  01:49           113.597 libmd4c-html.dll
12/09/2025  01:46            87.001 libmd4c.dll
19/02/2024  23:04           429.536 libmng-2.dll
12/09/2025  01:48           646.756 libpcre2-16-0.dll
12/09/2025  01:52           708.739 libpcre2-8-0.dll
12/09/2025  01:46           259.156 libpng16-16.dll
10/07/2025  21:07            53.757 libsharpyuv-0.dll
12/09/2025  01:25         2.461.848 libstdc++-6.dll
13/09/2025  01:57        37.875.668 libstelMain.dll
19/09/2024  14:05           600.981 libtiff-6.dll
10/07/2025  21:07           749.724 libwebp-7.dll
10/07/2025  21:07            25.726 libwebpdemux-2.dll
10/07/2025  21:07            82.858 libwebpmux-3.dll
12/09/2025  01:25            64.403 libwinpthread-1.dll
12/09/2025  01:48         1.196.744 libzstd.dll
12/09/2025  01:50         2.020.031 Qt6Charts.dll
12/09/2025  01:49            29.857 Qt6Concurrent.dll
06/09/2025  08:00         6.792.163 Qt6Core.dll
06/09/2025  08:00        10.177.685 Qt6Gui.dll
12/09/2025  01:50         1.191.840 Qt6Multimedia.dll
12/09/2025  01:50            60.688 Qt6MultimediaWidgets.dll
06/09/2025  08:00         2.166.273 Qt6Network.dll
12/09/2025  01:50           619.442 Qt6OpenGL.dll
12/09/2025  01:51            65.572 Qt6OpenGLWidgets.dll
12/09/2025  01:51           678.417 Qt6Positioning.dll
12/09/2025  01:51         6.476.289 Qt6Qml.dll
06/09/2025  09:06           180.164 Qt6QmlMeta.dll
06/09/2025  09:06           910.546 Qt6QmlModels.dll
06/09/2025  09:06            86.024 Qt6QmlWorkerScript.dll
06/09/2025  09:06         7.486.902 Qt6Quick.dll
06/09/2025  11:06           514.925 Qt6Quick3DUtils.dll
12/09/2025  01:51           147.215 Qt6SerialPort.dll
06/09/2025  08:51           642.135 Qt6Svg.dll
06/09/2025  11:46           508.008 Qt6VirtualKeyboard.dll
06/09/2025  08:00         7.586.582 Qt6Widgets.dll
22/09/2024  13:46           457.728 SpoutLibrary.dll
08/09/2025  06:28           187.582 swresample-6.dll
08/09/2025  06:28         1.890.760 swscale-9.dll
12/09/2025  01:46           120.814 zlib1.dll
              67 File(s)    174.970.593 bytes
               0 Dir(s)  471.003.660.288 bytes free

And after that I have a working up-to-date Stellarium with INDI support. 
Reply all
Reply to author
Forward
0 new messages