Problem:
IEMGD_HEAD_Linux/common/drm/emgd/display/pi/cmn/pi.c:1: error: stray ‘\357’ in program
This is caused by “invalid” characters in the code, specifically I encountered this while trying to compile the Intel EMGD driver for my EEEPC’s graphics card.
Thanks to the helpful folks over here, there’s a solution:
cd IEMGD_HEAD_Linux/common/drm/emgd/display/pi/cmn cat -v pi.c | awk '{if(NR>1) print $0}' > tmp # make strange characters on first visible and remove mv tmp pi.c
That makes the invalid characters visible and removes them.
In this case, it leaves some partial, garbage comments behind, so the file still wont compile.
To resolve this, I opened the file in vim, and quickly searched for and removed the faulty comments (and some I didn’t have to remove).
Remember to answer “no” to the question of re-extracting the tarball each time you retry building this.
Attached is the original driver file, and my modified copy of pi.c
Result:
"Completed EMGD Installation"