unitreerobotics / unitree_legged_sdk

SDK tools for control robots.
BSD 3-Clause "New" or "Revised" License
287 stars 160 forks source link

Build Error: Go1 #90

Open rafiqrana opened 1 year ago

rafiqrana commented 1 year ago

I am getting the following error during the build process:

Build Error: /usr/bin/ld: /home/<username>/git/clone/unitree_legged_sdk/lib/cpp/amd64/libunitree_legged_sdk.a(loop.cpp.o): relocation R_X86_64_PC32 against undefined hidden symbol `_ZTCN5boost10wrapexceptINS_17bad_function_callEEE0_NS_16exception_detail10clone_implINS3_19error_info_injectorIS1_EEEE' can not be used when making a PIE object /usr/bin/ld: final link failed: bad value

System info:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy
xyq1223 commented 1 year ago

Hello,we have fed back this problem to our R&D colleagues, and they will reproduce the problem, please look forward to it

tfwittwer commented 1 year ago

Same problem here, also on Ubuntu 22.04. Boost version is 1.81.0 compiled from source. I think the cause is that libunitree_legged_sdk.a was not compiled with the -fPIC option.

Building works fine on Ubuntu 18.04 with the Boost version installed via apt.

xyq1223 commented 1 year ago

Hello, this is a problem with the compilation of Ubuntu22.04

NOTMOVETON commented 1 year ago

Hello, have this problem been solved? if so, how to remove this error

xyq1223 commented 1 year ago

Hello, we do not support the solution of the version of Ubuntu itself for the time being. It is recommended that you can choose to use Ubuntu18.04.

sharathmatada commented 1 year ago

Hi, Is this issue resolved for Ubuntu 22.04?

ahanjaya commented 4 months ago

Hi, here is my way to compile the sdk with ubuntu 22:

  1. Download the older libboost-1_66
  2. unzip the downloaded libboost
  3. ./bootstrap.sh
  4. ./b2
  5. sudo ./b2 install

    redo the cmake .. and make the sdk folder.