Problem building luajit on touchpad

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem building luajit on touchpad

Tim Caswell
I'm trying to build laujit on my touchpad (an arm device).  I have gcc
and friends from optware which provides a fairly typical linux
environment.  I can build several other projects without issue, so my
tools seem at least sane.

The problem I get is:

    make[1]: Entering directory `/media/ext3fs/tim/luvit/deps/luajit/src'
    CC        lj_ir.o
    lj_ir.c:53: error: 'exp2' undeclared here (not in a function)
    lj_ir.c:53: error: 'log2' undeclared here (not in a function)

Some googling leads me to believe that certain versions of gcc don't
have these functions in C89 mode.  Has anyone else hit this issue and
is there something I'm doing wrong?

-Tim Caswell

Reply | Threaded
Open this post in threaded view
|

Re: Problem building luajit on touchpad

Michael Gogins
grep in the include folder for these symbols. If you find them change
the compiler mode. If you don't find them, write them.

Hope this helps,
Mike

On Tue, Oct 18, 2011 at 7:30 PM, Tim Caswell <[hidden email]> wrote:

> I'm trying to build laujit on my touchpad (an arm device).  I have gcc
> and friends from optware which provides a fairly typical linux
> environment.  I can build several other projects without issue, so my
> tools seem at least sane.
>
> The problem I get is:
>
>    make[1]: Entering directory `/media/ext3fs/tim/luvit/deps/luajit/src'
>    CC        lj_ir.o
>    lj_ir.c:53: error: 'exp2' undeclared here (not in a function)
>    lj_ir.c:53: error: 'log2' undeclared here (not in a function)
>
> Some googling leads me to believe that certain versions of gcc don't
> have these functions in C89 mode.  Has anyone else hit this issue and
> is there something I'm doing wrong?
>
> -Tim Caswell
>
>



--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

Reply | Threaded
Open this post in threaded view
|

Re: Problem building luajit on touchpad

Mike Pall-32
In reply to this post by Tim Caswell
Tim Caswell wrote:
> I'm trying to build laujit on my touchpad (an arm device).  I have gcc
> and friends from optware which provides a fairly typical linux
> environment.

Well, which preprocessor symbols does it define which might help
to uniquely identify it?

Try: echo | gcc -E - -dM | sort
(But don't send the output to the mailing list!)

>     lj_ir.c:53: error: 'exp2' undeclared here (not in a function)
>     lj_ir.c:53: error: 'log2' undeclared here (not in a function)

There is already code in there to work around this, but it's only
activated for Android and Symbian. See lj_vm.h and lj_vmmath.c.

--Mike

Reply | Threaded
Open this post in threaded view
|

Re: Problem building luajit on touchpad

Tim Caswell
In reply to this post by Michael Gogins
Yes, they are indeed missing in my include/math.h file.  I wonder if
this is because they simply don't exist (this is an arm device after
all).

On Tue, Oct 18, 2011 at 4:38 PM, Michael Gogins
<[hidden email]> wrote:

> grep in the include folder for these symbols. If you find them change
> the compiler mode. If you don't find them, write them.
>
> Hope this helps,
> Mike
>
> On Tue, Oct 18, 2011 at 7:30 PM, Tim Caswell <[hidden email]> wrote:
>> I'm trying to build laujit on my touchpad (an arm device).  I have gcc
>> and friends from optware which provides a fairly typical linux
>> environment.  I can build several other projects without issue, so my
>> tools seem at least sane.
>>
>> The problem I get is:
>>
>>    make[1]: Entering directory `/media/ext3fs/tim/luvit/deps/luajit/src'
>>    CC        lj_ir.o
>>    lj_ir.c:53: error: 'exp2' undeclared here (not in a function)
>>    lj_ir.c:53: error: 'log2' undeclared here (not in a function)
>>
>> Some googling leads me to believe that certain versions of gcc don't
>> have these functions in C89 mode.  Has anyone else hit this issue and
>> is there something I'm doing wrong?
>>
>> -Tim Caswell
>>
>>
>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
>