Solved

[C, C++] Compile a i386 library on ARM-Cortex Ubuntu distro

Posted on 2012-03-20
7
738 Views
Last Modified: 2012-03-20
I developed a huge C++ application to control my mobile robot on my i386 pc by using Ubuntu 11.04.

Now, i have to run this C++ application on a development board named "Pandaboard" which is based on ARM Cortex omap4 processor.

On this board, i've installed Ubuntu 11.10 with pre-build binaries.

The problem is that in order to compile my C++ application i have to install libaria which is ARIA open source library which i use to control my motors; when i try to install this library with g++-4.6 i receive errors like this:
Unable to recognise the format of the input file `/usr/local/Aria/lib/libArNetworking.so'

I think this is because this library is for i386 but i'm on ARM architecture.

Is there any possibility to be able to compile this library on my board?
(i can change operating system, if it is needed; what's important for me it's to be able to run my C++ application on my board and not on my pc)

Thanks for the help.
0
Comment
Question by:ichigokurosaki
  • 5
  • 2
7 Comments
 
LVL 10

Expert Comment

by:MadShiva
ID: 37743043
Dear,

Maybe the question is stupid, but why didn't download and install the lib with dpkg?

Regards
0
 

Author Comment

by:ichigokurosaki
ID: 37743054
The question is not stupid, the problem is that i'm not an expert.

I have to download the .deb package and install it with dpkg -i?
0
 

Author Comment

by:ichigokurosaki
ID: 37743077
I used dpkg like this:

dpkg -i libaria.deb

but it says me that the library is for i386 and my system is armel and the compilation does not start.

If i use the source file, i can run "make" without errors, but when i do "sudo make install" it gives me errors for the .so library files.

What can i do to solve the problem? :(
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 10

Accepted Solution

by:
MadShiva earned 500 total points
ID: 37743099
No, sorry my bad I see now that they don't have compile it for arm...

I will try to found other solution.  In the meantime try to do this as root :

apt-get install binutils-multiarch

and try again :)

PS: Clean the make thing to be sure that they start again from scratch
0
 

Author Comment

by:ichigokurosaki
ID: 37743292
Thanks a lot!!

Now, it compiled without errors!

I tried to compile the examples and the procedure was ok, but if i try to run one of them, i get this error:

error while loading shared libraries: libAria.so: cannot open shared object file: No such file or directory

the library exists in /usr/local/Aria/lib and i added it to /etc/ld.so.config in this way:
include /etc/ld.so.conf.d/*.conf
include /usr/local/Aria/lib

and then i run "sudo ldconfig"

but this didn't solve the problem. :(

If i type: locale libAria.so, it returns me no path.

Can you help me with this last problem?

On my other pc, i didn't had this issue.
0
 

Author Comment

by:ichigokurosaki
ID: 37743534
I solved it..

Thanks a lot for the tip about the multiarch packet!
0
 

Author Closing Comment

by:ichigokurosaki
ID: 37743552
Many thanks!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question