?
Solved

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

Posted on 2012-03-20
7
Medium Priority
?
743 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 10

Expert Comment

by:Tobias
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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 10

Accepted Solution

by:
Tobias earned 2000 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Users are often faced with high disk consumption without really knowing where the largest amount of data resides. Disk Usage Analyzer (aka Baobab) is is a graphical, menu-driven application to analyse disk usage in any Gnome environment and can e…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

770 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