Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

What I learned from porting my projects to FreeBSD


I set up a local FreeBSD VirtualBox VM to test something, and it seems to work very well. Due to the novelty factor, I decided to get my software projects to build and pass the tests there.

The Projects

What I Learned:

FreeBSD on VBox has become very reliable

Some executables on FreeBSD are in /usr/local/bin instead of /usr/bin

On Linux they are almost always in /usr/bin/

make on FreeBSD is not GNU make

  • One can call gmake

  • No gmake on Debian/Ubuntu/etc.

  • Solution for Debian:

    mkdir -p ~/bin
    ln -sf /usr/bin/make ~/bin/gmake
    export PATH="$HOME/bin:$PATH"

m4 on FreeBSD is not compatible with GNU m4

  • Fixed in this commit by first checking for gm4 and then falling back on plain m4.

Some CPAN Modules fail to install using local-lib there

  • No idea why.

  • Sometimes cpanm -n ("no test") helps.

  • pkg install -y p5-Foo-Bar as root for other times.

DocBook/XSL Does Not Live Under /usr/share/sgml

  • Fixed using a symlink on the freebsd system.

  • Unhappy with this solution.

FreeBSD’s grep does not have a "-P" flag by default

  • "-P" is not in POSIX grep

  • Solution:

    -        ) | grep -vP '^<\?xml ver' \
    +        ) | perl -p -0777 -e 's%\A<\?xml ver[^>]*>%%' \
  • Does not exactly do the same operation, but even more correct.

  • Perl is portable shell
    — Guy Keren

FreeBSD has no "nproc" command

What still does not work:

  • Valgrind tests fail - possibly due to this bug

  • Spellchecking tests fail, like on Ubuntu, as it seems hunspell has system-dependent dictionaries.


  • I ran into some cases where my scriptology was lacking and suboptimal, even for my own personal use, and fixed them.



No releases published


No packages published