Skip to content
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

Raspbian 11 32-bit: 64-bit kernel compile problem #781

Closed
aaronwmorris opened this issue May 4, 2023 · 2 comments
Closed

Raspbian 11 32-bit: 64-bit kernel compile problem #781

aaronwmorris opened this issue May 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@aaronwmorris
Copy link

aaronwmorris commented May 4, 2023

The latest version of Raspbian 11 32-bit runs a 64-bit kernel with a 32-bit user space. I think this is causing the compiler to generate the wrong targets with some of the indi-3rdparty libs.

System info:
Raspberry Pi 4 - 4GB RAM

$ uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

$ getconf LONG_BIT
32

Re-running make on the 3rd-party drivers

$ make
[  5%] Built target indi_skyadventurergti_telescope
[  9%] Built target indi_azgti_telescope
[ 13%] Built target indi_staradventurer2i_telescope
[ 13%] Linking CXX executable indi_ahpgt_telescope
/usr/local/lib/arm-linux-gnueabihf/libahp_gt.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
make[2]: *** [indi-eqmod/CMakeFiles/indi_ahpgt_telescope.dir/build.make:305: indi-eqmod/indi_ahpgt_telescope] Error 1
make[1]: *** [CMakeFiles/Makefile2:1308: indi-eqmod/CMakeFiles/indi_ahpgt_telescope.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

The library is 64-bit

$ file /usr/local/lib/arm-linux-gnueabihf/libahp_gt.so.1.6.2 
/usr/local/lib/arm-linux-gnueabihf/libahp_gt.so.1.6.2: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=186229468b73e69830d08fb874fda944bf25c89b, not stripped

But the library is supposed to be 32-bit

$ file /usr/local/lib/arm-linux-gnueabihf/libindiclient.so.2.0.1
/usr/local/lib/arm-linux-gnueabihf/libindiclient.so.2.0.1: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=9daa2ac844dae8f5f7decd868d198986cba142e4, with debug_info, not stripped
@aaronwmorris aaronwmorris added the bug Something isn't working label May 4, 2023
@aaronwmorris
Copy link
Author

Just for clarity, you can switch to a 32-bit kernel by adding arm_64bit=0 to /boot/config.txt . I am perfectly willing to do that, but this failure might not be clear for all users.

@aaronwmorris
Copy link
Author

After setting arm_64bit=0 the indi 3rdparty libs and drivers compile without issue.

@knro knro closed this as completed May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants