GithubHelp home page GithubHelp logo

ludoplex / what-i-learned-from-porting-to-freebsd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shlomif/what-i-learned-from-porting-to-freebsd

0.0 0.0 0.0 18 KB

What I Learned from porting my projects to FreeBSD

License: Creative Commons Attribution 4.0 International

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 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. (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

shlomif avatar ingve avatar 0mp 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.