lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi Hisham

I am sorry I didn't specify about exact problem of loading of and 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.


Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m

2013/10/11 Hisham <>
On 11 October 2013 07:15, Journeyer J. Joh <> wrote:
> But there was a problem.
> When I tried to test installed orbit, didn't get loaded
> properly.
> This looked weired.
> But trying the later method was a good workaround for this.
> luafilesystem, lpeg have slightly different make macro variable definition
> in their makefiles.
> And their makefiles are good to make arm binary file. So overwriting with
> binaries made the later method works fine.
> This is not a question but a record or a documentation for someone who might
> search the cross compiling orbit and reach here. And for someone who can
> provide advice to me. Maybe Hisham?

What changes to variables did you have to make in the lfs and lpeg
makefiles in order to make them work?

-- Hisham