Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  1 Jul 2008 14:33:08 +0400 (MSD)
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/125140: [patch] add dependencies on libstdc++.[45] for security/drweb
Message-ID:  <20080701103308.3212D1AF41E@void.codelabs.ru>
Resent-Message-ID: <200807011040.m61Ae11t070450@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         125140
>Category:       ports
>Synopsis:       [patch] add dependencies on libstdc++.[45] for security/drweb
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 01 10:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Eygene Ryabinkin
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
Code Labs
>Environment:

System: FreeBSD XXX 7.0-STABLE FreeBSD 7.0-STABLE #16: Tue Mar 18 11:49:55 MSK 2008 root@XXX:/usr/obj/usr/src/sys/XXX i386

>Description:

Drweb 4.33 requires compatibility libraries libstdc++.4 for
FreeBSD <= 5.x and libstdc++.5 for FreeBSD >= 6.x.  So the port
should depend on the misc/compat5x or misc/compat6x, depending
on the FreeBSD version.

>How-To-Repeat:

Uninstall misc/compat6x on FreeBSD 6.x/7.x/8.x, install DrWeb
and try to start the daemon.  It will complain like this:
-----
Starting drwebd.
/libexec/ld-elf.so.1: Shared object "libstdc++.so.5" not found, required by "drwebd"
-----

>Fix:

Add library dependencies to the port.  The following patch does it.
PORTREVISION was no bumped, perhaps it should be done to get the
proper dependencies on the already installed systems.

--- add-compat-5x-6x-dependency.patch begins here ---
diff -urN ./Makefile ../drweb/Makefile
--- ./Makefile	2008-07-01 14:19:11.000000000 +0400
+++ ../drweb/Makefile	2008-07-01 14:22:44.000000000 +0400
@@ -29,9 +29,11 @@
 .if ${OSVERSION} >= 601000
 DISTNAME=	${PORTNAME}-${PORTVERSION}-freebsd61
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:f61
+LIB_DEPENDS+=	stdc++.5:${PORTSDIR}/misc/compat6x
 .else
 DISTNAME=	${PORTNAME}-${PORTVERSION}-freebsd55
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:f55
+LIB_DEPENDS+=	stdc++.4:${PORTSDIR}/misc/compat5x
 .endif
 
 WRKSRC=		${WRKDIR}/${DISTNAME}
--- add-compat-5x-6x-dependency.patch ends here ---

Tested this on FreeBSD 7.0.  Had not tested on 5.x -- no such version
at hand, sorry.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080701103308.3212D1AF41E>