micro-ROS / micro_ros_espidf_component

micro-ROS ESP32 IDF component and sample code
Apache License 2.0
247 stars 59 forks source link

libmicroros.a', needed by 'int32_publisher.elf', missing and no known rule to make it #183

Open Usama-Arshad16 opened 1 year ago

Usama-Arshad16 commented 1 year ago

int32_publisher example not building

Steps to reproduce the issue

I have Ros Foxy installed on my PC. In order to use microros with esp32, I first cloned esp_idf and then I cloned micro_ros_espidf_component repo. These are the commands i followed

Expected behavior

I was expecting it to build successfully.

Actual behavior

But Actually it was giving me error shown below

image image

Additional information

liamhan0905 commented 1 year ago

I'm getting the same error

nilseuropa commented 1 year ago

Me too,but on humble branch.

liamhan0905 commented 1 year ago

@nilseuropa what branch have you tried that worked? Since humble is supported, I thought it would work. I just tried using the foxy branch but getting the same error

UsamaArshad16 commented 1 year ago

Please someone solve this. I also tried this using docker, but the error stays the same image

glmnet commented 1 year ago

I was getting this error then I run

cd ~/esp/esp-idf
source ./export.sh
pip3 install catkin_pkg lark-parser empy colcon-common-extensions

then I clean build and it worked, seems like the source before pip3 install didn't work when I did it first time.

dgarcu commented 1 year ago

I have also solved it with the solution provided by @glmnet :smile:

2b-t commented 9 months ago

I had the very same issue. My issue might be very specific but in my case the problem was my .gitconfig in combination with a YubiKey hardware identification device. A while back I had configured an insteadOf rule for Git so that it would use SSH for cloning any Github repository instead of HTTPS.

$ cat /home/$USER/.gitconfig
[user]
    signingKey = <my_gpg_key>
    name = <my_name>
    email = <my_email>
[commit]
    gpgsign = true
[gpg]
    program = gpg
[url "ssh://git@github.com/"]
    insteadOf = https://github.com/

The SSH keys are saved on my Yubikey ($ ssh-add -K) and I need to confirm by tapping my YubiKey.

After executing $ idf.py set-target <target_type>, various repositories should be pulled from Github and libmicroros.a should be compiled. As this would fail silently /micro_ros_espidf_component/micro_ros_src/build would be almost empty and /micro_ros_espidf_component/libmicroros.a would not exist at all. Furthermore also building with the Docker would fail as my .gitconfig on the host system would be copied inside my Docker, resulting in the very same issue. Simply deleting the entire .gitconfig inside my Docker with $ rm /home/$USER/.gitconfig (or alternatively deleting just this rule) solved the issue and I was able to build and flash micro-ROS onto my ESP32-C3.