Solved

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

Posted on 2012-03-20
7
733 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

17 Experts available now in Live!

Get 1:1 Help Now