amavisd-new does not compile because of db42

Scot Hetzel swhetzel at gmail.com
Fri Jun 11 16:03:35 UTC 2010


On Fri, Jun 11, 2010 at 4:08 AM, Helmut Schneider <jumper99 at gmx.de> wrote:
> Gabor Kovesdan wrote:
>
>> >
>> >===>    Running ldconfig
>> > /sbin/ldconfig -m /usr/local/lib
>> >===>    Registering installation for db42-4.2.52_5
>> >===>    Returning to build of amavisd-new-2.6.4_6,1
>> > Error: shared library "db-4.2.2" does not exist
>> > *** Error code 1
>> >
>> > Stop in /usr/ports/security/amavisd-new.
>> > *** Error code 1
>> >
>> >
>> It seems that it cannot find the library but amavisd-new uses the
>> USE_BDB know from bsd.databases.mk just like quite a bunch of other
>> ports, so the dependency definition is obviously correct. I don't
>> know what causes this error and I haven't got any more PRs from other
>> users. Soon, I'll bump the required version again because after the
>> last change I got some mails that say newer versions operate even
>> better with amavisd-new. I'll just talk to the developer to see,
>> which version would be the optimal one or we can just pull in the
>> latest bdb version. I'd say let's wait for that update and hopefully
>> that will also solve your problem.
>
> # make clean
> ===>  Cleaning for amavisd-new-2.6.4_6,1
> # env make depends
> ===>   amavisd-new-2.6.4_6,1 depends on shared library: db-4.2.2 - found
> [...]
> # env make depends -DWITH_RAR
> ===>   amavisd-new-2.6.4_6,1 depends on shared library: db-4.2.2 - not
> found
> [...]
> #
>
> I then commented out "IA32_BINARY_PORT=yes" from the WITH_RAR section
> in the Makefile and guess what?! :)
>
> # env make depends -DWITH_RAR
> ===>   amavisd-new-2.6.4_6,1 depends on shared library: db-4.2.2 - found
> [...]
> # portupgrade -N amavisd-new\*
> [Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 224
> packages found (-0 +1) . done]
> [Gathering depends for security/amavisd-new
> ........................................................................
> ........................................................................
> ........................................................................
> ...... done]
> --->  Installing 'amavisd-new-2.6.4_6,1' from a port
> (security/amavisd-new)
> --->  Building '/usr/ports/security/amavisd-new' with make flags:
> -DWITH_BDB -DWITH_SNMP -DWITH_POF -DWITH_RAR -DWITH_UNRAR -DWITH_UNARJ
> -DWITH_NOMARCH -DWITH_UNZOO -DWITH_TNEF
> ===>  Cleaning for amavisd-new-2.6.4_6,1
> cd /usr/ports/security/amavisd-new && make config;
> [...]
> ===>   amavisd-new-2.6.4_6,1 depends on shared library: db-4.2.2 - found
> [...]
> #
>
> Does that help? :)
>

The use as defined in bsd.port.mk for the IA32_BINARY_PORT variable is
incorrectly being used in the amavisd-new port:

# IA32_BINARY_PORT
#				- Set this instead of ONLY_FOR_ARCHS if the given port
#				  fetches and installs compiled i386 binaries.

When this variable is set it changes how ldconfig searches for
libraries by setting the -32 to ldconfig.  This prevents the port from
properly detecting any 64bit libraries and only looks for 32bit
libraries.  The reason that only db42 is being affected is because
most of the ports dependancies are RUN_DEPENDS.

The correct way to the amavisd-new port would be to change this:

.if defined(WITH_RAR)
IA32_BINARY_PORT=	yes
RUN_DEPENDS+=	${LOCALBASE}/bin/rar:${PORTSDIR}/archivers/rar
.endif

To this:

.if defined(WITH_RAR)
# support for archivers/rar is broken on ia64
.if ${ARCH} =="i386" || ${ARCH} == "amd64"
RUN_DEPENDS+=	${LOCALBASE}/bin/rar:${PORTSDIR}/archivers/rar
.else
IGNORE= archviers/rar is a 32-bit binary port and is not compatible with ${ARCH}
.endif
.endif

Note:  This may need to be moved after the bsd.port.pre.mk.

Scot


More information about the freebsd-ports mailing list