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

Unable to Generate 32-bit libnao_walkF.so for NAOqi Robot Using nao_walk Project #3

Open
xsan055 opened this issue Dec 21, 2024 · 0 comments

Comments

@xsan055
Copy link

xsan055 commented Dec 21, 2024

I am trying to compile the nao_walk project for my 32-bit NAO robot using the NAOqi SDK (version 2.1.4.13). However, despite configuring the toolchain for 32-bit cross-compilation, the generated libnao_walkF.so remains 64-bit. My goal is to generate a 32-bit shared object file that can run on the robot.

(1)Environment Details:
-OS: Ubuntu 16.04

  • Compiler: GCC 5.5.0 (with -m32 support verified)
  • NAOqi SDK: Version 2.1.4.13 (64-bit)
  • qiBuild version: 3.18
  • CMake version: 3.16.3
  • Robot: NAO H25, running NAOqi OS (32-bit architecture)

(2) Installed qiBuild and configured the cross-naoqi-sdk toolchain as follows:

<toolchain>
  <package name="libnaoqi" path="/home/sang/naoqi/naoqi-sdk-2.1.4.13-linux64" />
  <compiler>
    <binary path="/usr/bin/gcc" flags="-m32" />
    <binary path="/usr/bin/g++" flags="-m32" />
  </compiler>
</toolchain>

(3)Ran the following commands:
qibuild configure -c cross-naoqi-sdk --release --verbose
qibuild make -c cross-naoqi-sdk

(4)Verified the generated .so file:
file /home/sang/serow_ws/src/nao_walk/nao_walk_naoqi/build-cross-naoqi-sdk/sdk/lib/naoqi/libnao_walkF.so

Observed that the output indicates a 64-bit architecture:
ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, not stripped

(5)What I Have Tried
- Added `set(CMAKE_C_FLAGS "-m32 ${CMAKE_C_FLAGS}")` and `set(CMAKE_CXX_FLAGS "-m32 ${CMAKE_CXX_FLAGS}")` to the `CMakeLists.txt` file.
- Verified that `gcc` and `g++` support 32-bit compilation (`gcc -m32 -v` works correctly).
- Edited `~/qi/toolchains/cross-naoqi-sdk.xml` to include `-m32` flags.
- Installed required 32-bit libraries, including `libc6-dev-i386`.
- Checked the `CMakeCache.txt` and Makefile generated by qiBuild for `-m32` flags, but they were missing.
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

1 participant