Category Archives: Linux

Adding doxygen support to CMakeLists.txt

There might be a lot of discussions which build system is the best – I once decided to invest into understanding cmake and never looked back. It’s not perfect, but it’s really easy to set up a build especially a cross-platform one.

There is actually no discussion that one should document his/her source code thoroughly – you should just do it. Over a decade ago I chose to use doxygen and I also didn’t regret it. Also cross-platform and does its job.

It’s actually quite easy to marry both tools since cmake provides doxygen support and here I just present shortly the steps needed to activate doxygen.

First install cmake and doxygen. On Linux this packages will be provided by your distribution, on Mac OS X I would just use homebrew (“brew install cmake doxygen”) and on Windows I actually like chocolatey quite a lot (“choco install doxygen.install” and “choco install cmake”). After installation (and maybe a restart or at least rerunning the CLI) you should make sure that cmake and doxygen are installed (“cmake –version” and “doxygen –version”).

Then add the following lines to you CMakeLists.txt (I added the code after the find_packages() part).

# look for Doxygen package

  # exclude sqlite code

  # doxygen settings can be set here, prefixed with "DOXYGEN_"

  # this target will only be built if specifically asked to.
  # run "make api-docs" to create the doxygen documentation
    COMMENT "Generate API-documents for NoteSearch."

This will create a custom target, which is not automatically run with the compilation. Which makes sense for me, since I don’t need the documentation updated all the time. If you want to create the documentation just run “make api-docs” (or similar). If you use Visual C++ there will be a project “api-docs” which you can build on demand.

cmake module to find Gnu Scientific Library, FindGSL.cmake

There is no official FindGSL.cmake module in the cmake distribution to “automagically” find the Gnu Scientific Library on Windows, Linux and Mac OS X. I have written such a module which works for my configurations, but might not cover all GSL installation on all OS. But you can modify it to fit your needs.

Continue reading cmake module to find Gnu Scientific Library, FindGSL.cmake

Install Debian Etch as guest in Virtualbox

In order to prepare Linux executables for distribution, it’s a good idea to compile the executable in an old Linux distribution. Thus it depends only on “old” versions of libraries and the executable should work on most distributions out there (which provide newer but backward compatible libraries). E.g. Dialogblocks, a RAD for wxWidgets, is built in Debian Etch. If you don’t have a spare computer lying around it’s a good idea to install Debian Etch in a virtual machine like VirtualBox. Continue reading Install Debian Etch as guest in Virtualbox

Install Gnuplot 4.4.0 on Ubuntu Linux

The most frequented blog entries here are about installing Gnuplot on Ubuntu Linux or Mac OS X. These entries are still valid for the newer Ubuntu versions. But Gnuplot newest version 4.4.0 was already released, and in this release there are cairo based pdf and png terminals provided. So you don’t need the pdflib anymore. Below you’ll find updated instructions to compile and install Gnuplot 4.4.0 with wxt and pdfcairo terminal. These instructions were tested on Ubuntu 8.04 (Hardy Heron) and Ubuntu 9.10 (Karmic Koala) and should also work on 8.10 (Intrepid Ibex) and 9.04 (Jaunty Jackalop). Continue reading Install Gnuplot 4.4.0 on Ubuntu Linux

Create a movie file from single image files (png, jpegs)

In research sometimes you want to make a movie from single images, like plots from experimental data or from calculation to visualize changes or so on. In order to achieve this you can use ffmpeg. First you have to create the images and save them, where the images need to have a continuous number in the filename, e.g. img0001.png, img0002.png, …, …img5467.png. Take care that there is no image missing and that you have enough zeroes in front of the image number, so that the files are in the correct order. Continue reading Create a movie file from single image files (png, jpegs)

Changing the php file upload limit in Ubuntu Linux

If you have your own Ubuntu server running you may encounter the maximal file size upload limit in php scripts which is set to 2Mb as default. In order to change that we first have a look what the size actually is. In /var/www (standard www directory) create a file called info.php with the following content:

// Show all information, defaults to INFO_ALL

Continue reading Changing the php file upload limit in Ubuntu Linux

Mounting directory from Mac OS X host in Ubuntu Gutsy Gibbon guest in VirtualBox

There is a new beta version of VirtualBox for Mac OS X available and installing Ubuntu Gutsy Gibbon worked like a charm (in opposition to Parallels). The only problem I encountered was, that it was not possible to mount a directory from the Mac OS X host in the guest system with either the internal mechanism (Folder sharing) and just directly via samba. In the latter case I could mount the host directory and could view it once, but than the mount was always busy and I had no access anymore. But I found another solution: sshfs. Here is a short introduction how to do that:

Continue reading Mounting directory from Mac OS X host in Ubuntu Gutsy Gibbon guest in VirtualBox

Install gnuplot on Ubuntu Gutsy Gibbon

I again have updated these instructions for Gnuplot 4.4.0 RC1 and newer Ubuntu versions. Find them in this post.

Some months ago I wrote a small Howto about installing Gnuplot on Ubuntu Feisty Fawn with readline, pdf and wxWidgets terminal support. It turned out, that this howto was of interest for many people, since this blog post was the most visited until Gutsy Gibbon came out – and the readline problem was obviously solved, since it works now if you install the standard Gnuplot package. Still the pdf and wxWidgets terminal are not compiled in by default, therefore I wrote a new (shorter) howto about including this terminals.

So here are the instructions: Continue reading Install gnuplot on Ubuntu Gutsy Gibbon