Update on cross building mxe-octave

It’s time for another update on my GSoC project (yes I know I should blog more often). I was inactive for a couple of days due to lack of internet access. When I came back, I had a new laptop with Intel Core i5 processor which is much faster than the old Intel Atom powered laptop I owned. So now I am able to produce faster builds, not to forget that now I can compile parallely using multiple cores (I can do make octave -j4).

I did a fresh install of OpenSUSE on my laptop. For some time I was having trouble installing Mecurial because auto-refreshing of the configured repositories was failing. Figured out that I was hitting a faulty mirror. After fixing that, I went ahead to cross build the latest version of mxe-octave. As of now, there have been many new packages added to mxe-octave like FFTW, PCRE, freetype, expat, fontconfig, GLPK, libpng, qrupdate, HDF5, QHull, libxml2, jasper, TIFF, lcms, GraphicsMagick, ITSOL, and OpenBLAS. I have successfully produced another cross build which can be downloaded here.

However, I could not add the package ITSOL in my build. Apparently this package is not built automatically, and I had to do make itsol to build it during which I was thrown this error:

/home/ani/mxe-octave/usr/bin/i686-pc-mingw32-gcc -c -O2  -I./INC -DLINUX -o OBJ/systimer.o -c SRC/systimer.c
SRC/systimer.c:28:23: fatal error: sys/times.h: No such file or directory
compilation terminated.
make[2]: *** [OBJ/systimer.o] Error 1

I chose to ignore the package and continued without ITSOL. I will work on its fix later.

I was interrupted many times while building the packages gmp, Lapack, BLAS (reference BLAS) and FFTW. The problem with gmp was pretty lame since I had passed both the options –enable-static and –enable-shared in ./configure because of which I got an error “cannot build both static and DLL, since gmp.h is different for each”. The error disappeared when I did ./configure –enable-shared –disable-static.
For the package FFTW, I bypassed the error by forcing the local implementation of malloc() during configure by modifying the build specs in the src/fftw.mk file. The problem was solved when I added –with-our-malloc as options in all the occurrences of ./configure. See this discussion regarding the error.
The packages lapack and blas failed to build due to missing FORTRAN Compiler. See the issue and my solution in this discussion. It was nice of Michael to explain me the real reason behind the error.

The following is an extract from the log of octave. It tells us about the features enabled in my current build.

Build Octave GUI:                   yes
JIT compiler for loops:             no
Build Java interface:               no
Do internal array bounds checking:  no
Use octave_allocator:               no
Build static libraries:             no
Build shared libraries:             yes
Dynamic Linking:                    yes (LoadLibrary)
Include support for GNU readline:   yes
64-bit array dims and indexing:     no

Though my build has GUI enabled in it, yet I haven’t been able to launch Octave GUI in Windows 8 environment. See this reportage in the mailing list about the issue.
I am also unable to get JIT support despite using the option –enable-jit during ./configure and successfully building LLVM. Experimental Java support in MXE is also yet to added.

During this week, I have also started with a native build of mxe-octave in MinGW on Windows 8. I am presently unable to proceed further because libpng fails to build at some point. I will investigate more into this issue and ask in the mailing list, along with the issues I faced with JIT support, and ITSOL package.

Since I already have a working version of Octave, I will start my work on building the installer for Octave using NSIS. I will dedicate a blog post summing up the ideas of the installer given by my mentor.

That’s all for now.
Cheers!

Leave a comment