Marcus Barnet
Marcus Barnet

Reputation: 2103

Compile a i386 library on ARM-Cortex Ubuntu distro

I developed a 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.

EDIT: I installed binutils-multiarch and then it compiled fine.

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.

Upvotes: 2

Views: 913

Answers (1)

Marcus Barnet
Marcus Barnet

Reputation: 2103

I solved by using binutils-multiarch and then i compiled again the library by specifing my g++ current version and by adding the lib patch to ld.so.config text file before to build the examples.

Upvotes: 1

Related Questions