×

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

Bi-monthly release with minor bug fixes and improvements

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

  • Posts: 270
  • Thank you received: 74
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
Last edit: 1 year 2 months ago by Toni Schriber.
1 year 2 months ago #89983

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

  • Posts: 270
  • Thank you received: 74
Really nobody? Even the experts do not have a clue?
1 year 2 months 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.
1 year 2 months ago #90046

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

  • Posts: 270
  • Thank you received: 74
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!
The following user(s) said Thank You: Dahu
1 year 2 months ago #90047

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

  • Posts: 270
  • Thank you received: 74
@Picard: Sorry, if I insist. Did you try to compile KStars with the change I proposed?
1 year 2 months 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.
1 year 2 months 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.
The following user(s) said Thank You: Picard
1 year 2 months ago #90184

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

  • Posts: 270
  • Thank you received: 74
1 year 2 months ago #90313

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

Time to create page: 0.234 seconds