-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling for Cortex-A9 #11
Comments
Hello Pietro,
We don't have your configuration, so we cannot reproduce this problem here.
It appears from the error message that you are cross-compiling, and maybe
you built the library core.a in one environment and then ported it to
another environment(?)
It seems that the cross-compiled library is not of the correct format for
the runtime environment.
Mike
…On Fri, May 22, 2020 at 6:30 AM Pietro Tedeschi ***@***.***> wrote:
Hello, when I try to compile for Cortex-A9 with the following toolchain
*arm-linux-gnueabihf-gcc* as:
arm-linux-gnueabihf-gcc -mcpu=cortex-a9 -static -O2 testecc.c core.a -o
testecc
I have an error like this:
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld:
core.a: error adding symbols: file format not recognized
collect2: error: ld returned 1 exit status
Any suggestion to solve this issue?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAU3ZDSZQ2F63U3ACBS36C3RSYEYJANCNFSM4NHPZLNA>
.
|
Exactly Mike. I generated my core.a on my laptop with a GNU/Linux distro since I cannot install the gcc on this very constrained environment (where there is also a minimal distro Linux installed) to generate the core.a library on it. I was thinking to create a VM with the same architecture and generate the core.a on it, but it is very time consuming for a test. Do you have any other suggestion to solve this issue? |
Hello Pietro,
Without access to your configuration, we cannot really help. You might try
cross-compiling a really simple "hello world" program, or create a really
simple library with one function that prints "hello world", and see can you
get that to work.
Mike
On Fri, May 22, 2020 at 10:18 AM Pietro Tedeschi <notifications@github.com>
wrote:
… Hello Pietro, We don't have your configuration, so we cannot reproduce
this problem here. It appears from the error message that you are
cross-compiling, and maybe you built the library core.a in one environment
and then ported it to another environment(?) It seems that the
cross-compiled library is not of the correct format for the runtime
environment. Mike
… <#m_2159987148689211825_>
On Fri, May 22, 2020 at 6:30 AM Pietro Tedeschi *@*.***> wrote: Hello,
when I try to compile for Cortex-A9 with the following toolchain
*arm-linux-gnueabihf-gcc* as: arm-linux-gnueabihf-gcc -mcpu=cortex-a9
-static -O2 testecc.c core.a -o testecc I have an error like this:
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld:
core.a: error adding symbols: file format not recognized collect2: error:
ld returned 1 exit status Any suggestion to solve this issue? — You are
receiving this because you are subscribed to this thread. Reply to this
email directly, view it on GitHub <#11
<#11>>, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAU3ZDSZQ2F63U3ACBS36C3RSYEYJANCNFSM4NHPZLNA
.
Exactly Mike. I generated my core.a on my laptop with a a GNU/Linux distro
since I cannot install the gcc on this very constrained environment (where
there is also a minimal distro Linux installed) to generate the core.a
library on it. I was thinking to create a VM with the same architecture and
generate the core.a on it, but it is very time consuming for a test. Do you
have any other suggestion to solve this issue?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAU3ZDWWAOC2QHUDQC57OXDRSY7NLANCNFSM4NHPZLNA>
.
|
Ok Mike, I created a simple helloword as following:
I compiled it with
and I did not receive any errors during the compiling. Update:
|
OK, that is a main function working OK. Now try creating a simple core.a
library consisting of a single function that prints "Hello World\n" and
write a main program that calls just this function from the library.
Mike
On Fri, May 22, 2020 at 11:10 AM Pietro Tedeschi <notifications@github.com>
wrote:
… Hello Pietro, Without access to your configuration, we cannot really help.
You might try cross-compiling a really simple "hello world" program, or
create a really simple library with one function that prints "hello world",
and see can you get that to work. Mike On Fri, May 22, 2020 at 10:18 AM
Pietro Tedeschi ***@***.*** wrote:
… <#m_3631016124086566698_>
Hello Pietro, We don't have your configuration, so we cannot reproduce
this problem here. It appears from the error message that you are
cross-compiling, and maybe you built the library core.a in one environment
and then ported it to another environment(?) It seems that the
cross-compiled library is not of the correct format for the runtime
environment. Mike … <#m_2159987148689211825_> On Fri, May 22, 2020 at 6:30
AM Pietro Tedeschi *@*.***> wrote: Hello, when I try to compile for
Cortex-A9 with the following toolchain *arm-linux-gnueabihf-gcc* as:
arm-linux-gnueabihf-gcc -mcpu=cortex-a9 -static -O2 testecc.c core.a -o
testecc I have an error like this:
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld:
core.a: error adding symbols: file format not recognized collect2: error:
ld returned 1 exit status Any suggestion to solve this issue? — You are
receiving this because you are subscribed to this thread. Reply to this
email directly, view it on GitHub <#11
<#11> <#11
<#11>>>, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAU3ZDSZQ2F63U3ACBS36C3RSYEYJANCNFSM4NHPZLNA
. Exactly Mike. I generated my core.a on my laptop with a a GNU/Linux
distro since I cannot install the gcc on this very constrained environment
(where there is also a minimal distro Linux installed) to generate the
core.a library on it. I was thinking to create a VM with the same
architecture and generate the core.a on it, but it is very time consuming
for a test. Do you have any other suggestion to solve this issue? — You are
receiving this because you commented. Reply to this email directly, view it
on GitHub <#11 (comment)
<#11 (comment)>>, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAU3ZDWWAOC2QHUDQC57OXDRSY7NLANCNFSM4NHPZLNA
.
Ok Mike, I created a simple helloword as following:
#include <stdio.h>
int main()
{
printf("Hello World");
return 0;
}
I compiled it with
arm-linux-gnueabihf-gcc -mcpu=cortex-a9 -static -O2 main.c core.a -o main
and I did not receive any errors during the compiling.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAU3ZDTR3S7YSGVZMFBFP3LRSZFSDANCNFSM4NHPZLNA>
.
|
Hello, when I try to compile for Cortex-A9 with the following toolchain arm-linux-gnueabihf-gcc as:
arm-linux-gnueabihf-gcc -mcpu=cortex-a9 -static -O2 testecc.c core.a -o testecc
I have an error like this:
Any suggestion to solve this issue?
The text was updated successfully, but these errors were encountered: