×

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

Bi-monthly release with minor bug fixes and improvements

compiling indilib on arm9 sbc fails

  • Posts: 17
  • Thank you received: 0
Hi all!

I've been trying to build indilib on a phidgets sbc, based on an arm9 cpu design instead of arm6 like raspberry pi boards.

For some reason it keeps failing to complete compiling with this error:
[ 96%] Building CXX object libs/indibase/alignment/CMakeFiles/indi_skywatcherAPIMount.dir/__/__/__/drivers/telescope/skywatcherAPI.o
Linking CXX executable indi_skywatcherAPIMount
CMakeFiles/indi_skywatcherAPIMount.dir/__/__/__/drivers/telescope/skywatcherAPI.o: In function `SkywatcherAPI::Slew(SkywatcherAPI::AXISID, double)':
/root/Projects/libindi/drivers/telescope/skywatcherAPI.cpp:639: undefined reference to `SkywatcherAPI::MAX_SPEED'
collect2: ld returned 1 exit status
make[2]: *** [libs/indibase/alignment/indi_skywatcherAPIMount] Error 1
make[1]: *** [libs/indibase/alignment/CMakeFiles/indi_skywatcherAPIMount.dir/all] Error 2
make: *** [all] Error 2

I've placed a more complete log on pastebin: pastebin.com/vLb0RT6F
In case the url gets mashed, find entry vLb0RT6F on pastebin.

Can anyone tell me what's going on here? I lack the skills to figure out how to disable the skywatscherAPI stuff from the build, since i don't need it anyway. A few attempts failed and building indilib from source takes about an hour, so it's a bit cumbersome to keep prodding at it like i am trying now.
Last edit: 10 years 3 weeks ago by Parser.
10 years 3 weeks ago #865

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

  • Posts: 10
  • Thank you received: 7
Hi,
Looks like I accidently left fell foul of the one definition rule (ODR) on this version of the GNU compiler. I have fixed this in trunk. However I have not got an arm9 platform to test on.

The declarations in SkywatcherAPI.h should be:
    static const double SIDEREALRATE; // Radians per second
    static const double MAX_SPEED; // Radians per second
    static const double LOW_SPEED_MARGIN; // Radians per second

and the definitions in SkywatcherAPI.cpp should be
// One definition rule (ODR) constants
const double SkywatcherAPI::SIDEREALRATE = (2 * M_PI / 86164.09065); // Radians per second
const double SkywatcherAPI::LOW_SPEED_MARGIN = 128.0 * SIDEREALRATE;
const double SkywatcherAPI::MAX_SPEED = 500.0; // Radians per second

Can you try this out and let me know if it fixes from then problem. This is a bug in gcc as the compiler should error it and not just fail to define the symbol.

Roger
10 years 3 weeks ago #866

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

  • Posts: 17
  • Thank you received: 0
Thanks for the quick response, I've tried to implement your suggestions, in SkywatcherAPI.h i commented out the original declarations and added the suggested ones, in the .cpp file I added your lines above the "// Constructor" line. I'm hoping i did that right :)

Waiting for the build to finish, expect an update in about an hour.
10 years 3 weeks ago #867

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

  • Posts: 10
  • Thank you received: 7
That should be OK. One of the lines was already there in the .cpp file above the constructor. As long as you did not duplicate it things should work.
The following user(s) said Thank You: Parser
10 years 3 weeks ago #868

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

  • Posts: 17
  • Thank you received: 0
Yep, i noticed the duplication when the build failed :)
[ 95%] Built target AlignmentDriver
[ 95%] Built target indi_SVD_MathPlugin   
[ 96%] Building CXX object libs/indibase/alignment/CMakeFiles/indi_skywatcherAPIMount.dir/__/__/__/drivers/telescope/skywatcherAPI.o
Linking CXX executable indi_skywatcherAPIMount
[ 96%] Built target indi_skywatcherAPIMount
Scanning dependencies of target tutorial_one

The build finished succesfully without any errors. Thanks a lot!
Last edit: 10 years 3 weeks ago by Parser.
10 years 3 weeks ago #869

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

Time to create page: 0.905 seconds