Giter VIP home page Giter VIP logo

what-i-learned-from-porting-to-freebsd's Introduction

What I learned from porting my projects to FreeBSD

Introduction

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/ only:

make on FreeBSD is not GNU make

  • One can call gmake

  • No gmake on some older versions of Debian/Ubuntu/etc.

  • Solution for Debian:

    mkdir -p "$HOME/bin"
    ln -sf /usr/bin/make "$HOME/bin/gmake"
    export PATH="$HOME/bin:$PATH"
  • gmake alias under /usr/bin/ is present again in recent versions of Debian.

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

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

  • The “-P” flag is not in the POSIX’s grep specification

  • 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. (Workaround: export SKIP_SPELL_CHECK=",en,".)

Conclusion:

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

Coverage:

what-i-learned-from-porting-to-freebsd's People

Contributors

0mp avatar ingve avatar shlomif avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.