Subject: help with linking within a new package
To: NetBSD Package Maintainers List <tech-pkg@netbsd.org>
From: Julian C. Dunn <lists@aquezada.com>
List: tech-pkg
Date: 08/24/2003 00:25:31
I'm trying to create a new package for amavisd-new, the improved e-mail
virus and spam scanner. I'm having some difficulty handling the building
of the milter binaries (amavis and amavis-milter) due to some linking
issues.
First of all, I had to copy the hackery from the amavis-perl package
which looks like the following:
# XXX Milter needs pthreads, and configure fails looking for it
# because ${PREFIX}/include is not available in the include path.
.if defined(USE_MILTER) && ${USE_MILTER} == "YES"
CONFIGURE_ENV+= CFLAGS="-I${PREFIX}/include"
.endif
Okay. That makes sense, but it is ugly.
Then, however, the compiled amavis and amavis-milter binaries do not
know where to look for the pthreads shared object (an ldd confirms
this), and thus the package system complains and dies with Error 1. So I
changed the above CONFIGURE_ENV line to be:
CONFIGURE_ENV+= CFLAGS="-I${PREFIX}/include -L${PREFIX}/lib \
-Wl,-R${PREFIX}/lib"
which strikes me as even worse hackery. Does anyone know of a cleaner
way to handle this problem?
- Julian
--
[ Julian C. Dunn <jdunn@aquezada.com> * <julian@dreaming.org> ]
[ WWW: http://www.aquezada.com/staff/julian/ * PGP: 0xFDC205B9 ]
[ "sometimes you win, sometimes you lose / and most times ]
[ you choose between the two" - carole king, "sweet seasons" ]