Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RTIMULibDrive does not build as indicated in documentation #4051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
swpalmer-cl opened this issue Mar 16, 2025 · 3 comments
Open

RTIMULibDrive does not build as indicated in documentation #4051

swpalmer-cl opened this issue Mar 16, 2025 · 3 comments

Comments

@swpalmer-cl
Copy link

Instructions here: https://www.raspberrypi.com/documentation/accessories/sense-hat.html#install
indicate that :

  • RTIMULibDrive, RTIMULibDrive10, and RTIMULibDrive11 should build with make
  • RTIMULibDrive11 is pre-compiled

Both of these are wrong.
Following the instuctions on that page you will find thatRTIMULibDrive11 is not pre-ciompiled and that any attempt to make any those three projects results in the following linker errors:

RTIMULibDrive.cpp:(.text+0x34): undefined reference to `RTIMUSettings::RTIMUSettings(char const*)'
/usr/bin/ld: RTIMULibDrive.cpp:(.text+0x40): undefined reference to `RTIMU::createIMU(RTIMUSettings*)'
/usr/bin/ld: RTIMULibDrive.cpp:(.text+0xe8): undefined reference to `RTMath::currentUSecsSinceEpoch()'
/usr/bin/ld: RTIMULibDrive.cpp:(.text+0x18c): undefined reference to `RTMath::currentUSecsSinceEpoch()'
/usr/bin/ld: RTIMULibDrive.cpp:(.text+0x1cc): undefined reference to `RTMath::displayDegrees(char const*, RTVector3&)'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: RTIMULibDrive] Error 1
@lurch
Copy link
Contributor

lurch commented Mar 17, 2025

  • RTIMULibDrive, RTIMULibDrive10, and RTIMULibDrive11 should build with make

I just tested this on Raspberry Pi OS 64-bit on a Raspberry Pi 5. I cloned the https://github.com/RPi-Distro/RTIMULib repository, cd-ed to each of RTIMULib/Linux/RTIMULibDrive, RTIMULib/Linux/RTIMULibDrive10 and RTIMULib/Linux/RTIMULibDrive11 in turn, and in each directory I was successfully able to run make. I got a bunch of compiler warnings, but the build completed without errors.

Can you think of what you might have done differently that means that it doesn't work for you? Do you have the librtimulib-dev APT package (which is one of the dependencies of the sense-hat APT package) installed?

  • RTIMULibDrive11 is pre-compiled

I did a bit of poking around, and the sense-hat APT package recommends the librtimulib-utils package, and the latter includes /usr/bin/RTIMULibDrive11 .

@swpalmer-cl
Copy link
Author

Sorry I forgot to include my environment details:

  • Raspberry Pi 3 Model B Rev 1.2
  • Raspbian GNU/Linux 11 (bullseye)

Everything updated via apt including librtimulib-dev and librtiumlib-utils (7.2.1-6). Sorry, I do have RTIMULibDrive11 in /usr/bin, but when the page I referenced said it was pre-compiled I was thinking it would be found in the folder it mentioned.

You are not following the instructions on the page. You cloned the GitHub repository. While the GitHub library is hyperlinked, it is never actually mentioned. The instructions only say that the example code can be found at /usr/src/sense-hat/examples and "The C/C++ examples can be compiled by running make in the appropriate directory."

If the "sample code" isn't included in a buildable form perhaps it is better to not include it at all and refer to the GitHub repository instead.

@lurch
Copy link
Contributor

lurch commented Mar 17, 2025

You are not following the instructions on the page. You cloned the GitHub repository. While the GitHub library is hyperlinked, it is never actually mentioned.

Whoops, apologies! I guess the developer in me was just naturally skipping ahead too quickly... 🤣

If I copy e.g. /usr/src/sense-hat/examples/RTIMULib/RTIMULibDrive11 to my home directory and run make I also get the same linker-errors that you do. Thanks for pointing this out, I'll chase it up with my colleagues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants