The adventure of a server running on NetBSD #4

I have a problem recurring with pkgsrc. To understand how it should know that NetBSD itself provided only few software. A daemon SSH, FTP, HTTP… and for the rest you have to go digging in pkgsrc, equivalent to emerge on Gentoo or FreeBSD ports. A set of scripts that fetches software sources and compile them along with any dependencies.

The trouble is that by twice already I was faced with software that does not work. First take prosody. The compilation and installation work but the software does not launch, the following error is displayed:

# prosodyctl start

Prosody was unable to find util.encodings
This package can be obtained in the following ways:

Windows: Make sure you have encodings.dll from the Prosody distribution in util.
GNU/Linux: Run ‘. / configure’ and ‘make’ in the Prosody source directory to build util/

util.encodings is required for Prosody to run, so we will now exit.
More help can be found on our website at

The solution is to add the prefix LD_LIBRARY_PATH indicating the location of libraries:

# LD_LIBRARY_PATH = “/ usr/pkg/lib ‘ prosodyctl start

And since there’s no rc.d script to launch Prosody, here is a. It is surely not very clean or not perfect but it works. It was adapted from one supplied on FreeBSD:

#! / bin/sh
# Prosody XMPP Server init script

# PROVIDE: prosody

$_rc_subr_loaded. /etc/rc.subr

name = “prosody”
command = “/ usr/pkg/bin/prosodyctl”
load_rc_config $name
Prosody = ${prosody_enable-“NO”}
extra_comands = “status”
start_cmd = “prosody_cmd start”
stop_cmd = “prosody_cmd stop”
restart_cmd = ‘$stop_cmd; $start_cmd”
status_cmd = “prosody_cmd status”

If! /var/run/Prosody.PID f
touch /var/run/ & chown prosody:wheel /var/run/
LD_LIBRARY_PATH = “/ usr/pkg/lib ‘ / usr/pkg/bin/prosodyctl $1
LD_LIBRARY_PATH = “/ usr/pkg/lib ‘ / usr/pkg/bin/prosodyctl $1

run_rc_command “$1”

And then:

# /etc/rc.d/prosody start

I now try to compile Xen 4.1 but it does not pass. There is a small change to make in the Makefile to get there. But the following steps also pose problems. If I find the solution I’d write an article to describe. I just subscribe to the mailing list of the bugs of pkgsrc and when it will be validated I will submit any bug reports.

pkgsrc, therefore, is not 100% reliable. There is software that does not compile or do not launch.

Leave a Reply

Your email address will not be published. Required fields are marked *