bin/127573: [patch] add proper library dependencies to bsdlabel and fdisk

Eygene Ryabinkin rea-fbsd at codelabs.ru
Tue Sep 23 12:40:01 UTC 2008


>Number:         127573
>Category:       bin
>Synopsis:       [patch] add proper library dependencies to bsdlabel and fdisk
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 23 12:40:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Eygene Ryabinkin
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
Code Labs
>Environment:

System: FreeBSD XXX 8.0-CURRENT FreeBSD 8.0-CURRENT #10: Tue Sep 23 13:53:00 MSD 2008 root at XXX:/usr/src/sys/amd64/compile/XXX amd64

>Description:

Just tried to update rather dated -CURRENT to today's version and found
that sbin/bsdlabel and sbin/fdisk can not be linked due to the missing
dependencies to XML and sbuf(9) functions.

Verified Makefiles -- no '-lsbuf' and '-lbdsxml' are present at the
CVSWeb interface versions of src/sbin/{bsdlabel,fdisk}/Makefile.

>How-To-Repeat:

Check out today's -CURRENT and try to do 'make buildworld'.

Look at SVN revisions 182844 (fdisk's CVS r1.86) and 183142 (bsdlabel's
CVS r1.115): they introduced the usage of new functions from libgeom,
but no additional libraries were specified for the link time.

For the record, I am using the following knobs in /etc/make.conf:
-----
NO_IPFILTER=true
NO_INET6=yes
NO_ATM=yes
NO_LPR=yes
NO_I4B=yes
NO_DYNAMICROOT=yes
-----
It should not make a big difference, but I just don's understand
why other people and/or Tinderboxes are not seeing these errors.
/usr/src/UPDATING is also very silent about these modifications,
so I assume that I had not missed anything important.

/usr/share/mk/*.mk also contain no signs of any recent extensions to the
Makefiles where libgeom is used.

>Fix:

The following patch that just adds needed libraries to the Makefile
cures the situation for me.

--- chase-new-libgeom-dependencies.patch begins here ---
Adds extra libraries to all utilities that are using new libgeom(3)
routines.

--- sbin/bsdlabel/Makefile.orig	2008-09-23 15:56:33.000000000 +0400
+++ sbin/bsdlabel/Makefile	2008-09-23 16:00:39.000000000 +0400
@@ -13,8 +13,8 @@
 MLINKS=	bsdlabel.8 disklabel.8
 .endif
 
-DPADD=	${LIBGEOM}
-LDADD=	-lgeom
+DPADD=	${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
+LDADD=	-lgeom -lbsdxml -lsbuf
 
 .include <bsd.prog.mk>
 
--- sbin/fdisk/Makefile.orig	2008-09-23 16:09:01.000000000 +0400
+++ sbin/fdisk/Makefile	2008-09-23 16:09:25.000000000 +0400
@@ -7,8 +7,8 @@
 
 .PATH:	${.CURDIR}/../../sys/geom
 
-DPADD	+=	${LIBGEOM}
-LDADD	+=	-lgeom
+DPADD	+=	${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
+LDADD	+=	-lgeom -lbsdxml -lsbuf
 
 .include <bsd.prog.mk>
 
--- chase-new-libgeom-dependencies.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list