Skip to content

fatal error: libs/indiclient/baseclient.h: No such file or directoryΒ #4019

Closed

Description

@carlosal1015

Expected Behaviour

Compiles fine.

Actual Behaviour

Compilation failed. https://aur.archlinux.org/packages/stellarium#comment-1003064

In file included from /build/stellarium/src/build/plugins/TelescopeControl/src/INDI/TelescopeControl_INDI_autogen/EWIEGA46WW/moc_INDIConnection.cpp:9,
                 from /build/stellarium/src/build/plugins/TelescopeControl/src/INDI/TelescopeControl_INDI_autogen/mocs_compilation.cpp:2:
/build/stellarium/src/build/plugins/TelescopeControl/src/INDI/TelescopeControl_INDI_autogen/EWIEGA46WW/../../../../../../../stellarium-24.4/plugins/TelescopeControl/src/INDI/INDIConnection.hpp:23:10: fatal error: libs/indiclient/baseclient.h: No such file or directory
   23 | #include <libs/indiclient/baseclient.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Steps to reproduce

Install libindi https://archlinux.org/packages/extra/x86_64/libindi/files and enable -DPREFER_SYSTEM_INDILIB=Yes.

System

  • Stellarium version: 24.4
  • Operating system: Arch Linux

Activity

  1. added
    os: linuxSpecific issues for Linux-family OS
    hw: telescopeSpecific issues for various mounts of telescopes
    on Dec 23, 2024
  2. alex-w commented on Dec 23, 2024

    @alex-w
    Member

    Hmm… @DarthGandalf, has Gentoo same problem?

  3. added
    dependenciesdependencies (such like ShowMySky, QXlsx, etc.) related issues
    on Dec 23, 2024
  4. DarthGandalf commented on Dec 23, 2024

    @DarthGandalf
    Contributor

    I haven't tried to package the newly released version yet, will try soon and report.

  5. DarthGandalf commented on Dec 23, 2024

    @DarthGandalf
    Contributor

    But the libs/ prefix in that include looks suspicious.

  6. alex-w commented on Dec 23, 2024

    @alex-w
    Member

    But the libs/ prefix in that include looks suspicious.

    Please see cmake code for INDI - it’s an expected…

    P.S. My distro doesn’t have 2.x.x INDI yet…

  7. added this to the 25.1 milestone on Dec 23, 2024
  8. DarthGandalf commented on Dec 23, 2024

    @DarthGandalf
    Contributor

    That file is called /usr/include/libindi/baseclient.h here

    Well, using indi without installing it first is messy

  9. DarthGandalf commented on Dec 23, 2024

    @DarthGandalf
    Contributor
    Here's the patch I'll apply downstream
    diff --git a/src/external/CMakeLists.txt b/src/external/CMakeLists.txt
    index 2d08b79..f26d569 100644
    --- a/src/external/CMakeLists.txt
    +++ b/src/external/CMakeLists.txt
    @@ -89,6 +89,14 @@ IF(USE_BUNDLED_QTCOMPRESS)
     ENDIF()
     
     ################################# INDI ################################
    +if(1)
    +	IF(USE_PLUGIN_TELESCOPECONTROL AND ENABLE_INDI)
    +		find_package(PkgConfig REQUIRED)
    +		pkg_check_modules(INDI REQUIRED IMPORTED_TARGET libindi>=2.0)
    +		# Alias for compatibility with the code below
    +		add_library(indiclient ALIAS PkgConfig::INDI)
    +	endif()
    +else()
     IF(USE_PLUGIN_TELESCOPECONTROL AND ENABLE_INDI)
         SET(PREFER_SYSTEM_INDILIB 1 CACHE BOOL "Use system-provided INDI instead of the bundled version")
         find_library(INDICLIENT_LIB indiclient)
    @@ -204,3 +213,4 @@ IF(USE_PLUGIN_TELESCOPECONTROL AND ENABLE_INDI)
             target_link_libraries(indiclient ${ZLIB_LIBRARIES})
         endif()
     ENDIF()
    +endif()
    diff --git a/plugins/TelescopeControl/src/INDI/INDIConnection.cpp b/plugins/TelescopeControl/src/INDI/INDIConnection.cpp
    index afcaa43..6a11c7d 100644
    --- a/plugins/TelescopeControl/src/INDI/INDIConnection.cpp
    +++ b/plugins/TelescopeControl/src/INDI/INDIConnection.cpp
    @@ -25,9 +25,9 @@
     #include <limits>
     #include <cmath>
     
    -#include <libs/indiclient/baseclient.h>
    -#include <libs/indidevice/basedevice.h>
    -#include <libs/indibase/inditelescope.h>
    +#include <libindi/baseclient.h>
    +#include <libindi/basedevice.h>
    +#include <libindi/inditelescope.h>
     
     const int INDIConnection::SLEW_STOP = INDI::Telescope::SLEW_GUIDE - 1;
     
    diff --git a/plugins/TelescopeControl/src/INDI/INDIConnection.hpp b/plugins/TelescopeControl/src/INDI/INDIConnection.hpp
    index e511f20..54ced19 100644
    --- a/plugins/TelescopeControl/src/INDI/INDIConnection.hpp
    +++ b/plugins/TelescopeControl/src/INDI/INDIConnection.hpp
    @@ -20,8 +20,8 @@
     #define INDICONNECTION_HPP
     
     #include <QObject>
    -#include <libs/indiclient/baseclient.h>
    -#include <libs/indidevice/basedevice.h>
    +#include <libindi/baseclient.h>
    +#include <libindi/basedevice.h>
     
     #include <mutex>
     #include <QStringList>
    diff --git a/plugins/TelescopeControl/src/INDI/TelescopeClientINDI.cpp b/plugins/TelescopeControl/src/INDI/TelescopeClientINDI.cpp
    index 967bf12..97e3721 100644
    --- a/plugins/TelescopeControl/src/INDI/TelescopeClientINDI.cpp
    +++ b/plugins/TelescopeControl/src/INDI/TelescopeClientINDI.cpp
    @@ -25,7 +25,7 @@
     
     #include "StelCore.hpp"
     #include "StelUtils.hpp"
    -#include <libs/indibase/inditelescope.h>
    +#include <libindi/inditelescope.h>
     #include "INDIControlWidget.hpp"
     
     TelescopeClientINDI::TelescopeClientINDI(const QString &name, const QString &params):
    diff --git a/plugins/TelescopeControl/src/INDI/test/testINDIConnection.cpp b/plugins/TelescopeControl/src/INDI/test/testINDIConnection.cpp
    index e946652..f1cc240 100644
    --- a/plugins/TelescopeControl/src/INDI/test/testINDIConnection.cpp
    +++ b/plugins/TelescopeControl/src/INDI/test/testINDIConnection.cpp
    @@ -23,7 +23,7 @@
     #include <string>
     
     #include "INDIConnection.hpp"
    -#include <libs/indidevice/basedevice.h>
    +#include <libindi/basedevice.h>
     
     void TestINDIConnection::deafultCoordinates()
     {

    Need to think how to adapt this for upstream.

  10. arjendekorte commented on Dec 23, 2024

    @arjendekorte
    Contributor

    Same problem on openSUSE Tumbleweed (libindi-2.1.1). The above patch seems to at least fix the build (I don't have a telescope to test with though).

  11. DarthGandalf commented on Dec 23, 2024

    @DarthGandalf
    Contributor

    Actually, there is a bug in my patch: pkg-config returns a bogus value, because libindi.pc doesn't actually contain -lindiclient. But the imported cmake target is not used anyway, because this target (neither its alias) is not visible from plugins/TelescopeControl/CMakeLists.txt, in which target_link_libraries(TelescopeControl_INDI indiclient) turns into -lindiclient which happens to be exactly what we needed.

    So, for downstream, simply removing all that indi code from src/external/CMakeLists.txt is enough.

  12. added a commit that references this issue on Dec 25, 2024
    af0421c
  13. added
    state: publishedThe fix has been published for testing in weekly binary package
    on Dec 29, 2024
  14. github-actions commented on Dec 29, 2024

    @github-actions

    Hello @carlosal1015!

    Please check the fresh version (development snapshot) of Stellarium:
    https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

  15. removed
    state: publishedThe fix has been published for testing in weekly binary package
    on Mar 23, 2025
  16. github-actions commented on Mar 23, 2025

    @github-actions

    Hello @carlosal1015!

    Please check the latest stable version of Stellarium:
    https://github.com/Stellarium/stellarium/releases/latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

dependenciesdependencies (such like ShowMySky, QXlsx, etc.) related issueshw: telescopeSpecific issues for various mounts of telescopesos: linuxSpecific issues for Linux-family OS

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions