Skip to content
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

Strange error message on when excute the demo program on ARM #4

Closed
wigcheng opened this issue Sep 19, 2019 · 6 comments
Closed

Strange error message on when excute the demo program on ARM #4

wigcheng opened this issue Sep 19, 2019 · 6 comments

Comments

@wigcheng
Copy link

As title, my platform is ARM Cortex-A7 IMX6UL, OS is buildroot.
I compile success using cross-compile already, seems no any trouble.

BUT it shows the error message when I running this demo:
./demo: line 1: ELF����: not found
./demo: line 9: syntax error: unexpected "("

I think my cross-compile is no problem, I tried it on previous littlevgl demo before ( no lv_linux_frame_buffer repo in that time), hope can get some directions, thanks a lot.

@embeddedt
Copy link
Member

It looks like something is wrong with your platform. The executable is being run as a script, not an ELF file.

I quickly searched for your error message in Google and it seems to be bringing up results about a missing libc. If you are using shared linking, be sure that you have the right libc installed on the platform (you can check with ldd ./demo, making sure that all libraries are found).

@wigcheng
Copy link
Author

wigcheng commented Sep 19, 2019

Got it, thanks for your quick reply.
I tried the "ldd ./demo" and shows a strange message is following:
/demo: not an ELF file.

But same environment, I can running the demo from modified pc-simulator repo:
Last commit:
commit 62401f8bbc79f96eea233143ee24aecee7dfc72b
Author: Gabor Kiss-Vamosi
Date: Mon Mar 12 16:19:25 2018 +0100

I will double check the environment of my target board, thanks

@embeddedt
Copy link
Member

What happens if you run file ./demo?

@wigcheng
Copy link
Author

Sorry, it works after I change the libc library from uclibc-ng to gnu-libc, maybe it need to add some parameter on Makefile I think.

Anyway, thanks for your hint!

@byc013
Copy link

byc013 commented Feb 10, 2020

Hi wigcheng,

Could you please share how did you cross compile the littlevgl under buildroot?

Thanks!

@wigcheng
Copy link
Author

Simple example:
export PATH=$(pwd)/output/host/usr/bin:$PATH
arm-linux-gcc -o foobar foobar.c

If your case is big project as littlevgl, you need modify the parameters such as CROSS_COMPILE in makefile,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants