I am sorry I didn't specify about exact problem of loading of lpeg.so and lfs.so.
lfs.so achieved by luarocks failed to loaded with the message below.
> "undefined reference to stat64"
So I checked with '-H' and '-v' option and found that cross linker invoked was different than the one invoked by cross compiling with Makefile (the latter). When luarocks is used bin/ld of my toolchain is used. When luarocks is not used bin/collect2 is used directly. But I am not sure if this is the critical difference. And I remember options for assembler was also different between those two.
I can say that using the latter method, using Makefile has a competitive benefit.
Makefiles of lpeg and luafilesystem specify the make macro variables that need to specify on theirselves. So I was easily test with specifying those variables to my cross toolchain easily. But when it comes to luarocks it's uncertain what make macro I need to specify. Do I need to specify assembler? linker? or Do I need to specify special CFLAGS ? -L path? -I path?... is not given. I can check lpeg's Makefile to decide these. But what if one variable conflicts between two different rocks? For example lpeg' Makefile specifies CFLAG with something and somthing but luafilesystem specifies with different CFLAG like otherthing and otherthing...
I am sorry I didn't try to find out what caused this differences and what difference caused the former failed and the latter succeeded. I stopped investigation right after I found the latter worked. And I think the latter is not that 'enough method'. the former and the latter together worked in my case. So I'd better say that both ways are needed.
I am sorry for unclear statement. I am home now and all my work is at my office.
I wonder how other people crosscompile orbit. Do they compile like me? or do they compile purely dependent on luarocks only without using the rocks's Makefiles and overwrites binaries?
Have a good weekend!
and thank you for the help.