Solved

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

Posted on 2012-03-20
7
734 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now