×

INDI Library v2.0.4 Released (01 Oct 2023)

Bi-monthly release with minor bug fixes and improvements

(SOLVED)-KStars build crashes with "INDI::BaseDevice::operator&()’ is protected"

  • Posts: 191
  • Thank you received: 47
It's odd, but since a cleanup of my development environment (see indilib.org/forum/ekos/12904-what-happened-to-kstars.html ) I'm getting the following error (even with a start form scratch of INDILib and KStars with "git clone")
In file included from /home/escriban/Projects/build/kstars/kstars/KStarsLib_autogen/mocs_compilation.cpp:137:
/home/escriban/Projects/build/kstars/kstars/KStarsLib_autogen/FRI4DANIHA/moc_clientmanager.cpp: In member function ‘void ClientManager::newINDIMessage(INDI::BaseDevice, int)’:
/home/escriban/Projects/build/kstars/kstars/KStarsLib_autogen/FRI4DANIHA/moc_clientmanager.cpp:372:78: error: ‘INDI::BaseDevice* INDI::BaseDevice::operator&()’ is protected within this context
  372 |     void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
      |                                                                              ^~~
In file included from /home/escriban/Projects/kstars/kstars/indi/indistd.h:14,
                 from /home/escriban/Projects/kstars/kstars/indi/indiconcretedevice.h:11,
                 from /home/escriban/Projects/kstars/kstars/indi/indifilterwheel.h:9,
                 from /home/escriban/Projects/kstars/kstars/ekos/auxiliary/filtermanager.h:12,
                 from /home/escriban/Projects/build/kstars/kstars/KStarsLib_autogen/YBWGFWFLDP/../../../../../kstars/kstars/ekos/align/align.h:12,
                 from /home/escriban/Projects/build/kstars/kstars/KStarsLib_autogen/YBWGFWFLDP/moc_align.cpp:9,
                 from /home/escriban/Projects/build/kstars/kstars/KStarsLib_autogen/mocs_compilation.cpp:36:
/usr/include/libindi/basedevice.h:296:21: note: declared protected here
  296 |         BaseDevice *operator&()
If I set the operator overload as "public:" in 'basedevice.h', KStars compiles <strong>without any problem</strong>.

Seems I'm the only one with this problem as I did not find any references, so I'm looking forward to hints from the community
Antonio
AOK Skywalker DDM
Celestron Edge HD 14"
Starlight Trius SX35 / ZWO ASI294MC
Starlight Lodestar X2
Starlight SX Maxi Filterwheel
Focus Boss II Focuser
Pegasus Falcon Rotator
KStars Ubuntu 22.04 LTS on NUC
Last edit: 9 months 4 weeks ago by Toni Schriber.
10 months 1 day ago #89983

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

  • Posts: 191
  • Thank you received: 47
Really nobody? Even the experts do not have a clue?
AOK Skywalker DDM
Celestron Edge HD 14"
Starlight Trius SX35 / ZWO ASI294MC
Starlight Lodestar X2
Starlight SX Maxi Filterwheel
Focus Boss II Focuser
Pegasus Falcon Rotator
KStars Ubuntu 22.04 LTS on NUC
9 months 4 weeks ago #90039

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

  • Posts: 150
  • Thank you received: 15
Hi Toni,

i have the same issue. I do a new dowload from the github repository and have the same issue to do a complete compilation.
C8 lightbridge, Orion Atlas mount, EOS 1000D modified and ASI120MM for guiding.
9 months 4 weeks ago #90046

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

  • Posts: 191
  • Thank you received: 47
Ok, i'm not alone. I just began to think I'm going to be moonstruck.

@Picard: Did You already try to change '/usr/include/libindi/basedevice.h'
from
protected:
        BaseDevice *operator&()
        {
            return this;
        }
to
public:
        BaseDevice *operator&()
        {
            return this;
        }
by hand?
After that, I'm able to compile KStars!
AOK Skywalker DDM
Celestron Edge HD 14"
Starlight Trius SX35 / ZWO ASI294MC
Starlight Lodestar X2
Starlight SX Maxi Filterwheel
Focus Boss II Focuser
Pegasus Falcon Rotator
KStars Ubuntu 22.04 LTS on NUC
The following user(s) said Thank You: Dahu
9 months 4 weeks ago #90047

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

  • Posts: 191
  • Thank you received: 47
@Picard: Sorry, if I insist. Did you try to compile KStars with the change I proposed?
AOK Skywalker DDM
Celestron Edge HD 14"
Starlight Trius SX35 / ZWO ASI294MC
Starlight Lodestar X2
Starlight SX Maxi Filterwheel
Focus Boss II Focuser
Pegasus Falcon Rotator
KStars Ubuntu 22.04 LTS on NUC
9 months 4 weeks ago #90115

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

  • Posts: 150
  • Thank you received: 15
Hi Toni,

i done and it's work fine. Thank you for the fix but it will works until next libindi upgrade. I hope that the team fix that quickly.
C8 lightbridge, Orion Atlas mount, EOS 1000D modified and ASI120MM for guiding.
9 months 4 weeks ago #90119

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

I opened an issue on INDI tracker: github.com/indilib/indi/issues/1839

Hopefully this can be resolved soon. It only happens on 20.04 and not later.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You: Picard
9 months 3 weeks ago #90184

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

  • Posts: 191
  • Thank you received: 47
Problem is solved with github.com/indilib/indi/pull/1843
AOK Skywalker DDM
Celestron Edge HD 14"
Starlight Trius SX35 / ZWO ASI294MC
Starlight Lodestar X2
Starlight SX Maxi Filterwheel
Focus Boss II Focuser
Pegasus Falcon Rotator
KStars Ubuntu 22.04 LTS on NUC
9 months 3 weeks ago #90313

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

Time to create page: 0.253 seconds