Friday, November 30, 2007

Building ARPACK on openSUSE 10.3

I needed an installation of ARPACK for FreeMat and couldn't find a convenient way to get it installed on an openSUSE box I was using. So I googled for a bit and came up with the following hack.
  • Make sure fortran is installed: rpm -q gcc-fortran.
  • Download the RPM from ATrpms.
  • Extract files from rpm using (see ):
    rpm2cpio arpack-2.1.7.src.rpm | cpio -ivmud
  • Edit the .spec file so the BuildRequires statement for gfortran is for gcc-fortran instead of gcc-gfortran. (That took several "rpm -q --provides gcc-gfortran" not found queries before I realized the package is named gcc-fortran on openSUSE.)
  • Build the RPM: rpmbuild -ba arpack.spec
  • Install the RPMs. In my case the RPMS were in /usr/src/packages/RPMS/i586. I installed the arpack-2.1-7.i586.rpm, then arpack-devel-2.1-7.i586.rpm and finally arpack-static-2.1-7.i586.rpm.




Unfortunately, FreeMat still does not pick up the version of ARPACK built above when running configure. I suspect it's something to do with the differences between f77 and gfortran. Check here for some fortran relevant autoconf macros.

FreeMat checks the fortran configuration with AC_PROG_F77 and AC_F77_LIBRARY_LDFLAGS in it's configure.in and uses several AC_F77_XXX macros in acinclude.m4 and checks for ARPACK with AC_F77_FUNC(znaupd).

Have to get back to this one later.

Sunday, November 25, 2007

-mtune=native : GCC 4.2.x command line option

Other optimization options are explained in detail at:
Using the GNU Compiler Collection Section 3.10

  • To use it on an automake/autoconf project in KDevelop:














Qfsm configure.in hacks

After a bit of effort I finally tweaked the configure.in for Qfsm so it works with a separate build directory. I needed this so I could build the project inside KDevelop.

The solution I used was to hack a large portion of the autoqt m4 macros into Qfsm's configure.in. A similar approach was used here.

A better solution would probably be to update autoqt so it works with a dual Qt3/Qt4 installation. There was also some useful info at Qtnode. Also, FreeMat's configure.in might be a good source for autoconf macros that are Qt4 related.

par2cmdline fix for gcc 4.x

Stumbled across this E-mail which includes a patch that gets the par2cmdline from Parchive compiling with gcc 4.x. Up to this point I've used QuickPar running under wine.

What about BloGTK?

What about BloGTK? I didn't try it because it wasn't in an openSUSE repository.

Test Post from drivel

This is a test post from drivel. Drivel didn't have the correct server at startup. I actually found the server name for the Blogger API by trying out Gnome Blog. (The server name is http://www.blogger.com/api/RPC2).

Test Post from Gnome Blog

Test from Gnome Blog

This is a test post from Gnome Blog.

Bro v1.2.1 and new ClamAV versions

As mentioned here, the version 1.2.1 stable source does not build correctly if ClamAV is installed. Bro 1.2.1 is using the cl_scannbuf function which is not exported in newer versions of ClamAV.

To work around this I edited the configure.in file so it checks for the cl_scanbuff function and does not configure ClamAV support if it is not exported by ClamAV.

In the Bro configure.in I edited the ClamAV checks to read:
# Libclamav
have_libclamav=Yes
AC_CHECK_HEADERS([clamav.h],,have_libclamav=No)
AC_CHECK_LIB(clamav,cl_scanbuff,,have_libclamav=No)
#AC_CHECK_LIB(clamav,cl_retdbdir,,have_libclamav=No)

Then re-generated the configure file.

One possible "real fix" would be to re-write the FileAnalyzer functions to create temporary files and use cl_scanfile to scan the temporary file.