lvgl / lv_port_linux

LVGL configured to work with a standard Linux framebuffer
MIT License
235 stars 148 forks source link

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

Closed wigcheng closed 5 years ago

wigcheng commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

What happens if you run file ./demo?

wigcheng commented 5 years ago

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 commented 4 years ago

Hi wigcheng,

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

Thanks!

wigcheng commented 4 years ago

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,