Solved

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

Posted on 2012-03-20
7
741 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
Containers and Docker for Everyone

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

 
LVL 10

Accepted Solution

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…

729 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