Re: luajit build error on mipsel?

  • From: Mike Pall <mike-1208@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 30 Aug 2012 10:34:22 +0200

pulleyzzz_gmail wrote:
> pulleyzzz@pulleyzzzwrt:~/luajit-2.0$ make HOST_CC="gcc -m32" 
> CROSS=/home/pulleyzzz/openwrt/openwrt-dreambox/staging_dir/toolchain-mipsel_r2_gcc-4.3.3+cs_uClibc-
> ==== Building LuaJIT 2.0.0-beta10 ====
> make -C src
> make[1]: Entering directory `/home/pulleyzzz/luajit-2.0/src'
> CC        lj_dispatch.o
> lj_dispatch.c:43: error: 'trunc' undeclared here (not in a function)

Well, trunc() is a standard C99 function. I'm pretty sure uClibc has it and it ought to be defined in <math.h> (which is
included there).

> Configured with: 
> /home/pulleyzzz/openwrt/openwrt-dreambox/build_dir/toolchain-mipsel_r2_gcc-4.3.3+cs_uClibc-
> --prefix=/home/pulleyzzz/openwrt/openwrt-dreambox/staging_dir/toolchain-mipsel_r2_gcc-4.3.3+cs_uClibc-
>  --build=i686-linux-gnu --host=i686-linux-gnu 
> --target=mipsel-openwrt-linux-uclibc --with-gnu-ld --enable-target-optspace 
> --disable-libgomp --disable-libmudflap --disable-multilib --disable-nls 
> --with-float=soft --enable-poison-system-directories 
> --with-gmp=/home/pulleyzzz/openwrt/openwrt-dreambox/staging_dir/host 
> --with-mpfr=/home/pulleyzzz/openwrt/openwrt-dreambox/staging_dir/host 
> --disable-decimal-float --disable-libssp --disable-__cxa_atexit 
> --enable-languages=c,c++ --enable-shared --enable-threads 
> --with-slibdir=/home/pulleyzzz/openwrt/openwrt-dreambox/staging_dir/toolchain-mipsel_r2_gcc-4.3.3+cs_uClibc-
>  --disable-tls

I don't see --with-sysroot=..., so maybe the compiler is not
loading the correct include files?

But ... you wouldn't be happy with the result, anyway: the MIPS
port is a hard-float port! Performance with kernel-emulated
floating-point will be unacceptably slow.


Other related posts: