gentoo gnunet build fails with MHD_post_process linker error

gnunet ebuild (zugaina layman overlay) fails with linker errors about MHD_destroy_post_processor and MHD_post_process ?

Add to /etc/portage/package.use:

net-libs/libmicrohttpd  messages

emerge libmicrohttpd again, and then emerge gnunet.

Success!

(at least for me)

Howto install perl modules

I often find myself trying to install (binary) packages that have dependencies to perl modules.

Because I work on varying platforms, sometimes RHEL/RedHat, CentOS, sometimes Debian based, like Ubuntu, and sometimes, less often now, but maybe I will go back again, to Gentoo. In many ways my ideal platform.

However, Perl is wicked, and the concept of perl modules in a package manager is even more crazy.

What are we going to do when we need a new version of a software (say, amavisd-new) that is not available in the distros package library?

I’m thinking, build from source and you can’t go wrong, right?

In the case of amavisd-new, these are the listed prerequisites:

Archive::Zip   (Archive-Zip-x.xx) (1.14 or later, currently 1.23)
Compress::Zlib (Compress-Zlib-x.xx) (1.35 or later, currently 2.008)
Compress::Raw::Zlib (Compress-Raw-Zlib) (2.017 or later)
Convert::TNEF  (Convert-TNEF-x.xx)
Convert::UUlib (Convert-UUlib-x.xxx) (1.08 or later, stick to new versions!)
MIME::Base64   (MIME-Base64-x.xx)
MIME::Parser   (MIME-Tools-x.xxxx) (latest version from CPAN - currently 5.425)
Mail::Internet (MailTools-1.58 or later have workarounds for Perl 5.8.0 bugs)
Net::Server    (Net-Server-x.xx) (version 0.88 finally does setuid right)
Digest::MD5    (Digest-MD5-x.xx) (2.22 or later)
IO::Stringy    (IO-stringy-x.xxx)
Time::HiRes    (Time-HiRes-x.xx) (use 1.49 or later, older can cause problems)
Unix::Syslog   (Unix-Syslog-x.xxx)
BerkeleyDB     with bdb library (preferably 4.4.20 or later)
Mail::DKIM     (Mail-DKIM-0.31 or later)

So, if I’m going to install amavisd-new, from souce, on a RHEL6 server, what do I need to do? -Well, I’ll show what I did. Not neccessarily what is the best thing to do… OK?

yum install cpan
perl -MCPAN -e shell

(going with the defaults, automatic is nice)

When I attempted to install the first module (Archive::Zip), I discovered that I did not have web access from my server, so I had to download the CPAN modules by hand. I did this by using the powerful http://search.cpan.org/ search tool, and just pasting the package name (Archive::Zip) in the search box and then downloading the tar.gz packages one at a time.

Manual installation of 1 CPAN package:

tar zxf Archive-Zip-1.31_04.tar.gz
cd Archive-Zip-1.31_04
perl Makefile.PL
make
make test
sudo make install

Had I had internet connection available:

perl -MCPAN -e 'install Archive::Zip'

The beauty of CPAN installation is that it resolves dependencies automatically.

Why spamassassin fails to start after upgrade

I decided that it was time to upgrade our spam filters today. It runs on 4 virtual gentoo installations, and it’s based on postfix and amavisd-new.

Most of the time, I find gentoo is really as beautiful as a distro can get. They try to do TheRightThing, and don’t fail as bad as the debian gang does most of the time.

Perl with CPAN is of course never going to be “compatible” with a package-based distro, but in Gentoo the developers are clever and caring, and they make tools like perl-cleaner that actually does a remarkable job.

As always, I’m employing the lazy upgrade methodology, (also known as ad-hoc patching, or on-demand upgrading, or more bluntly: I upgrade whenever I feel like it and have the time). This approach and gentoo is not always the best combination, but because gentoo is as good as it is, things usually work out very well for me, even when upgrading gblic, or, as recently, the init/baselayout. Gentoo is amazing. I still love it.

Anyway… After upgrading perl, spamassassin, and some other dependencies, spamassassin wouldn’t start, and the error message was a very cryptic:

child process [1234] exited or timed out without signaling production of a PID file: exit 25 at /usr/local/bin/spamd line 3334.

The solution? Just run “sa-update” to download new rules. Then it started just fine.

Sigh. Linux is simply better than Windows… (?)

I gave up developing for android with titanium on a windows7 virtual machine in virtualbox on CentOS5.

Decided to go with a native linux development environment. (of course!). How could I have been so stupid to even consider Windows in the first place? I have no idea. Temporary confusion, perhaps. Anyhow…

As much as I hate binary distributions and Debian’s geeky I-know-whats-best-for-you-but-I-pretend-I-give-you-total-control-and-freedom philosophy which often makes more harm than good; I still do my Android development on a Binary Linux Distribution: Ubuntu 11.04 Natty Narwahl.

Why?

Well, when using third-party linux binaries in a binary distribution, you are pretty much dancing by their command. If they ship a binary that was linked against a very new glibc and libstdc++, which they often are, and were in the case of Titanium Developer (is a piece of junk, I hate it more and more each day), you have to have a binary distribution that matches that version. In case of Titanium Developer, CentOS5.6 is too old. You have to use a recent Fedora or Ubuntu to get the libraries you need. CentOS and all other RPM-based binary distributions will simply break (of course) if you try to force in a libc from another distro, or even build your own, as no utilities are linked against it.

I’m still “new” to ubuntu. Still preferring Gentoo, but I’m at work, and I can’t have too much downtime on my workstation, so I left CentOS for Ubuntu, simply because I need something that just works. (I have Windows on my Laptop, for Outlook and Excel).

Sigh. I miss Gentoo, but Ubuntu will do, I’m sure.