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

Compiling on windows leads to GLIBCXX error not found on ev3 #37

Open
Jacob-Brink opened this issue Jan 6, 2018 · 8 comments
Open

Compiling on windows leads to GLIBCXX error not found on ev3 #37

Jacob-Brink opened this issue Jan 6, 2018 · 8 comments

Comments

@Jacob-Brink
Copy link

I am recently trying to code my ev3 in c++, I installed ev3dev onto an sd card, I followed the instructions, but lo and behold, the ev3 complains it cannot find the Glibcxx 3.4.1 something so that it cannot run the program. I followed the step by step instructions here and made sure all packages were up to date on my windows bash, but nothing seems to work.

@ddemidov
Copy link
Owner

ddemidov commented Jan 6, 2018

Have you looked at #17, #27, #28? There could be some clues there.

@Jacob-Brink
Copy link
Author

No, Is there a way to copy libsdc++? I am new to building my own executables with cmake and am fairly confused. I tried reflashing the ev3 to maybe update its software, but now I am running into more issues. Thanks for pointing me to those helpful explanations though.

@ddemidov
Copy link
Owner

ddemidov commented Jan 6, 2018

I am sorry, I have no experiance with cross-compiling under windows, but it was reported that compilation with docker works.

@Jacob-Brink
Copy link
Author

Docker complains that I need windows pro or server edition to install. How did #17 issue that you provided solve her issue? I am trying to figure out how to copy the right libsdc++ version onto the ev3. Is there any way of doing that?

@ddemidov
Copy link
Owner

ddemidov commented Jan 6, 2018

My guess is there should be a libstdc++.so.?.?.? file somewhere in the cross-compiler files, and that #17 was solved by copying it into /usr/lib on the EV3 filesystem. This could work, but I am not fond of this solution. Another way to install docker would be to install a virtual Linux OS, and install docker there.

@Jacob-Brink
Copy link
Author

Wait. Is it possible to build the c++ files on the ev3 itself? Then what ever compiler it had would just compile!

@ddemidov
Copy link
Owner

ddemidov commented Jan 7, 2018

It is possible, but may be quite frustrating. Depending on your program size, the compilation could take from very long time to forever. You can try it with a command like

g++ -std=c++11 -o my_program my_program.cpp ev3dev.cpp -I.

assuming you have ev3dev.cpp and ev3dev.h in the same folder as my_program.cpp.

@morob05
Copy link

morob05 commented May 22, 2019

I believe that one work-around for this issue is to make sure that you have completed step 7:

sudo vim /etc/apt/sources.list

Append the following lines to the end of the file:

deb http://httpredir.debian.org/debian unstable main contrib non-free
deb http://security.debian.org/ unstable/updates main contrib non-free
deb http://archive.ev3dev.org/debian unstable main

Save and exit. Afterwards, run sudo apt-get update, which will update the packages searched for.

Now do:

sudo apt-get -y install build-essential

This should fix the issue.

However, if you are running ROS on the ev3, then installing build-essential from the unofficial unstable release will create new issues since ROS will depend on older versions of GLIBC. I don't know how to fix that yet. My current solution is to go back to the jessie branch and using docker to cross-compile.

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

3 participants