Author Topic: compilation issue  (Read 2214 times)

rastafari199625 (OP)

  • *
  • Posts: 27
compilation issue
« on: June 06, 2014, 08:38:16 pm »
Hello, I try to cross compile this https://code.google.com/p/grafx2/ after some change I build it and I've this error
Code: [Select]
In file included from /usr/include/lua5.1/lua.h:16:0,
from factory.c:57:
/usr/include/lua5.1/luaconf.h:98:34:fatal error: lua5.1-deb-multiarch: No such file or directory
#include "lua5.1-deb-multiarch.h"
compilation terminated.
What that's means, a library is missing ?
Thanks

Aeter

  • *
  • Posts: 322
Re: compilation issue
« Reply #1 on: June 07, 2014, 01:30:42 am »
It means the file it's looking for in the include is either missing or misplaced.
~cucullus non facit monachum~

rastafari199625 (OP)

  • *
  • Posts: 27
Re: compilation issue
« Reply #2 on: June 07, 2014, 05:33:26 pm »
Thanks I have moved the file and now the compilation works. A binary was created but when I try to run it on the zero the prompt says Segmentation fault. But there are no errors in the compilation, only warnings.


the modified source code : https://mega.co.nz/#!Zok00AIC!USONKutyaODkZjkqrsu4t2GXKGbRb8SH3aPct-uPbpQ

I've modified the GP2X cross compilation section in the makefile, so GP2XCROSS=1 is for the zero.
Can you look the make file under GP2XCROSS to tell me if there is an obvious error.
thanks
« Last Edit: June 07, 2014, 05:48:53 pm by rastafari199625 »

zear

  • * Moderator
  • Posts: 2379
Re: compilation issue
« Reply #3 on: June 07, 2014, 08:12:49 pm »
"/usr/include/" is not a proper path for GCW Zero headers. It is a path for your host machine headers. Using host headers for cross-compilation is a bad idea and might lead to compilation errors or other unexpected behaviour. Especially when your target platform uses a different libc, like in case of GCW Zero.
GCW Zero toolchain headers are located in:
Code: [Select]
/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
You can pass the header path to the compiler with the following parameter:
Code: [Select]
-I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include

rastafari199625 (OP)

  • *
  • Posts: 27
Re: compilation issue
« Reply #4 on: June 08, 2014, 03:42:50 pm »
Thank you I've changed the path to include in the makefile but now I've an incomprehensible error.
grafx2 need a gfx2def.ini file wich is in my grafx2_gcw/share/grafx2 folder. When I run the program compiled on my computer without this file I've got the following error :
Code: [Select]
Error number 3 occured in file main.c, line 657, function Init_program.
Error: File gfx2def.ini is missing!
This program cannot run without this file.
And within this file the prog run OK
Now with my gcw version on my gcw0 I've this error with or without this file, why !  >:(
I have already tried to chmod the file but it did not work.
What you suggest to me ?

mth

  • *
  • Posts: 298
Re: compilation issue
« Reply #5 on: June 11, 2014, 01:17:39 am »
Now with my gcw version on my gcw0 I've this error with or without this file, why !  >:(
I have already tried to chmod the file but it did not work.
What you suggest to me ?

You can use "strace" to log what system calls a process makes. This should tell you where your program looks for that data file and what error code the open attempt returns.