Neil Hopcroft

A digital misfit

Setting up HarfBuzz

I’ve added a CI build for HarfBuzz, this is a standard ./autogen.sh ./configure make make install sequence. It has dependency upon:

The build works from build 3 onward – set to poll daily.
However, the default build is missing Freetype support, required for pango. The config.log for harfbuzz says “Requested ‘freetype2 >= 12.0.6’ but version of FreeType 2 is 9.22.3”, so we need a newer version of freetype. I’ve added freetype to the CI build.


Build breaks during set up of of-* projects

While I’ve been messing around with the of-* projects there have been a number of projects suffering code rot.
ImageMagick has encountered a subversion server error, which seems like it is probably beyond my control.
Mesa broke in build 123 with a compilation error, then in 124 reported that it requires libdrm > 2.4.60, but libdrm should be in the CI build setup, so there’s a spurious pkgconfig file somewhere. Fixed in build 164.
obd android lost gradle – I think there was a path change that took it off the default path, setting the path to include gradle fixes build in build 41.
pango is reporting a build error following some changes to how it deals with HarfBuzz versioning. I’ve added HarfBuzz to the CI build.
qhull is hosted on gitorious, which has died and is now moving to archive.org, project disabled for the moment – I don’t see any updates to the project website to explain anything.


More fixing of-fem-fenics build

When we last left this build there was a link error on boost::mpi::communicator::operator ompi_communicator_t*() const, there is a mailing list discussion describing a similar problem on Sparc. That discussion hints at there being multiple mpi implementations and that boost has been linked against OpenMPI while the linker has found a different implementation first.
Building libboost_mpi (and, actually, all of boost) resolves this problem.
Fixed in build 91.


Fixing of-video

The of-video project gives “warning: package video is empty”. This project also has a bootstrap script which creates a configure script which creates a Makefile. Running ./configure gives “error: Octave-Forge video package requires libavformat from FFmpeg”. A quick check shows that ffmpeg is generating only static linkage libraries, adding –enabled-shared to the ffmpeg build, adding a dependency from of-video upon ffmpeg then rebuilding ffmpeg.
However, ffmpeg now fails with “/usr/bin/ld: libavutil/color_utils.o: relocation R_X86_64_32S against `.rodata’ can not be used when making a shared object; recompile with -fPIC”. Checking the build configuration I notice that the ffmpeg build is not cleaned – cleaning the build resolves this problem, although it seems like a change to such an option should force all code to be recompiled?
Now of-video is looking in libavcodec for av_malloc, but it looks like it has been moved to libavutil, adding a patch to the configure script to pass ‘-lavutil’ to test program allows ./configure to run to completion.
Next the compilation fails:

AVHandler.cc:125:42: error: ‘av_set_parameters’ was not declared in this scope
if (av_set_parameters(av_output, NULL) < 0) { ^ AVHandler.cc:135:53: error: ‘URL_WRONLY’ was not declared in this scope if (avio_open(&av_output->pb, filename.c_str(), URL_WRONLY) < 0) { ^

These two are deprecated in ffmpeg.
I have added patches:

  • AVHandler.cc: remove call to av_set_parameters()
  • AVHandler.cc: update URL_WRONLY to AVIO_FLAG_WRITE
  • oct-avifile.h: remove DECLARE_OCTAVE_ALLOCATOR
  • oct-avifile.cc: remove DEFINE_OCTAVE_ALLOCATOR

Fixed in build 36.


Fixing of-stk

The of-stk project is a bit unusual as octave packages go, since it is intended to be usable directly on Matlab too. I have encountered and addressed some of these problems before.
I have now brought the changes I made to the original octave-packages build for stk into the of-stk project. But I don’t think they do what we need – there is a Makefile in the project directory which looks like it makes packages, but it relies upon octave being in the path, which isn’t the case in this context. I have taken the instructions generated by the makefile and put them into the of-stk build script.
Fixed in build 21.


Fixing of-optiminterp

The of-optiminterp project gives this error:
*** mkoctfile lacks Fortran 90 support
Again, there is an autogen.sh script in the src/ directory. Running this before the build gets us a bit further, but now configure reports
config.status: error: cannot find input file: `Makeconf.in’
Copying Makeconf.in from of-audio allows configure to complete, but leads to a syntax error in Makeconf where there is an unexpected DEFHAVE_LINUX_SOUNDCARD, which isn’t relevant to this project. I have added a patch to remove this.
The build then fails with a message “*** mkoctfile lacks Fortran 90 support”. Looking at the Makefile, it needs MKOCTFILE_FORTRAN_90=yes otherwise it will give this message. But MKOCTFILE_FORTRAN_90 is not set anywhere, it should be in the Makeconf file, but, probably because I’m using Makeconf from of-audio, isn’t. Adding it to the end of the file allows the make to complete and the package to install.
Fixed in build 38


Fixing of-ltfat

A quick look at the INSTALL-Octave file included in the ltfat package gives some instructions for compiling and installing the package on Octave. I have added the steps described to the of-ltfat project build script. However, it seems these steps are only for adding the current checkout to the current octave instance, not for creating and installing a package. Looking in the mat2doc directory there is a make_all_packages.sh script.
Running this script gives this error:
mkdir -p /home/susnak/Dropbox/ltfat_win64
mkdir: cannot create directory ‘/home/susnak’: Permission denied
So it looks like it is set up only for a particular developers machine. Looking inside the script, we probably only need this line:
mat2doc.py `pwd`/.. mat –script=release_keep_tests.py –octpkg –unix
I’ve added a new project for mat2doc, which also requires bibtex2html, also added as a new project. This, in turn, requires ocaml – I’ll install that from source rather than adding as a project. It also requires hevea.
mat2doc puts the output package file in $HOME/publish with the name of the project directory of-ltfat, to install it we need to rename without of- on the beginning.
Fixed in build 42.


Fixing of-optim

The of-optim package fails with:

invalid doc file format
make: *** [../doc/optim.texi] Error 25

This looks like an error extracting documentation from the code files. There is a bootstrap script in the src/ directory. But this bootstrap just does the same ‘make doc’, leading to the same error.
Looking further inside, it seems the problem is munge-texi.pl is identifying all the files as invalid, perhaps its validity test is incorrect. I have added a patch to remove the validity test and the documentation extraction appears to work from the command line.
Fixed in build 46.