Messylaneous for 2010/03/08

I gots a Summer of Code org application to write up, so you get a linkdump:

An mp3 of “PFSense II, Rocking The Datacenter” at NYCBUG, via Dru Lavigne.  Also, her “BSD for Linux Users” at the SCALE website.

A 5-part series about Scripting Vim, written by a terribly smart guy?  Interesting!  (Yeah, I did link to a part of it before…)

Have you ever wondered if building more than one pkgsrc package at a time can be a problem?  Others have too, and apparently there’s a fix.   If you don’t want to have to get to a command line to find the answer, it’s:

PKGSRC_LOCKTYPE?= none
The type of locking that will be done if competing processes
attempt to do work on one package directory simultaneously.

Possible values:
* none: No locking takes place at all.
* once: When the lock has already been aquired by another
process, the current process is terminated.
* sleep: When the lock has already been acquired by another
process, the current process will sleep for PKGSRC_SLEEPSECS
seconds and then try again.

You should also set OBJHOSTNAME when you are using the same
copy of pkgsrc on different hosts, maybe via NFS. This is because the locking process writes its process ID into the lockfile, and process IDs on different hosts are unrelated.

See also: LOCALBASE_LOCKTYPE, WRKDIR_LOCKTYPE.

Self-hosting clang; building DragonFly with it too

clang, which many people look to as a gcc replacement, is now able to build itself.  (Thanks John Marino for the heads-up, some time ago)  It can also build world and kernel on DragonFly, going on the work of Sascha Wildner!

Using the pkgsrc package,  put

clang_CC=/usr/pkg/bin/clang

in /etc/compilers.conf and then set $CCVER to “clang” when building:

env WORLD_CCVER=clang make -DNO_GCC44 buildworld

I haven’t tried this, so any errors in description are mine, not Sascha’s – can someone verify? I don’t have a test system to run it on right now.

Edit: see Sascha’s comment for the definitive method.