Subject: pkgsrc-2006Q2 on AIX 5.3
To: None <email@example.com>
From: Hans Rosenfeld <firstname.lastname@example.org>
Date: 09/26/2006 15:22:14
I spent the last two weeks trying to get pkgsrc working on a freshly
installed AIX 5.3 on a 43P-150 (32bit only machine). To sum it up, I ran
into so many problems that I did not get a single useful thing done with
In case there are still others interested in and working on pkgsrc for
AIX, I would really like to help.
The bootstrap worked without any problems, I used the gcc 3.3.2 that
came with the system.
When trying to build a pacakge, pkgsrc complained about missing
pkgtools/shlock, which I then tried to built. While the program itself
built correctly, the preformatting of the manpage failed. I noted before
that AIX man does not use the preformatted manpages installed by the
bootstrap (the suffix is .0, but AIX man seems to expect the manual
section as suffix even for preformatted manpages) and instead tries to
format the manpages itself, but the AIX nroff seems to be unable to
produce a readable output. I decided to install textproc/groff later to
work around this.
Next I tried to build lang/gcc34, which failed because its dependency
converters/libiconv failed to configure (it checked for a c++ compiler,
which I did not have).
I built gcc 3.4.6 to get a working c++ compiler and installed it in
/usr/local, and tried to build lang/gcc34 again. The build worked when
manually setting CONFIGURE_ARGS=--disable-aix64, but then for some
reason it tried to install into /usr/local and aborted with a file not
found error about /usr/pkg/gcc34/bin/gcc.
So I decided to not use lang/gcc34 at all and instead just use the gcc I
already had in /usr/local. I symlinked gcc to cc because some configure
scripts insisted to use cc even if they already knew that there was a
Next thing I wanted to do was install pkgtools/shlock, complete with
manpage, to get rid of always having to specify PKGSRC_LOCKTYPE=none.
Therefore I tried to get textproc/groff working.
The first problem I ran into was lang/perl5 failing. There is PR
perl on AIX, but I don't think it is related to my problem. Pkgsrc
configured perl but then failed somewhere in the build process because
of some "incomplete type" regarding some srandom struct thingy.
It built and installed ok when I manually configured it (using the original
Configure script) before building.
The next problem was shells/bash giving -E flags to the linker, which I
had to remove from the Makefiles to make it build.
Then there was graphics/png, which built and installed without any
problem. Later when graphics/netpbm was linking against libpng I found
out that png tried to use a function rpl_malloc which the linker could
not resolve. This was because config.h defined malloc to be rpl_malloc,
removing this definition made it work.
Graphics/tiff was the first package to actually use c++, so it ran into
a bug in libstdc++ (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366).
I made a fix for that which I still have to submit to the gcc folks.
When the build came to textproc/libxml2 it hit an old bug it had with
AIX, that is, I think the bug was actually the fix applied to libxml2
some years ago.
Building graphics/netpbm was sheer horror. I don't even remember all the
issues I encountered, but somehow I got it built and installed.
At last the build came to textproc/groff itself, which failed to
configure because a c++ test program failed (according to config.log,
the test program was compiled correctly, but when configure tried to run
it the progam could not find libgcc_s.a shared library). Configuring
textproc/groff by hand worked, but the build failed later with some
missing libraries. I guess pkgsrc messed up some environment variables,
but I was not able find out which or reproduce the error outside of
So this is where I stopped for now with textproc/groff.
Out of curiosity I just went back to the beginning, having
converters/libiconv installed now I moved /usr/local away to retry with
lang/gcc34, this time using only the gcc that came from IBM.
%SYSTEM-F-ANARCHISM, The operating system has been overthrown