Bug 198078 - libbsdxml and libsbuf dependencies should be propagated.
Summary: libbsdxml and libsbuf dependencies should be propagated.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Enji Cooper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-27 17:45 UTC by Eir Nym
Modified: 2015-02-28 05:18 UTC (History)
1 user (show)

See Also:


Attachments
Fix for geom library dependency changes (6.50 KB, patch)
2015-02-27 17:45 UTC, Eir Nym
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eir Nym 2015-02-27 17:45:26 UTC
Created attachment 153590 [details]
Fix for geom library dependency changes

I recently build FreeBSD tree and got strange messages when I build system:

/usr/obj/usr/src/tmp/usr/lib/libgeom.a(geom_xml2tree.o): In function `geom_xml2tree':
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0x5e): undefined reference to `XML_ParserCreate'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0xa2): undefined reference to `XML_SetUserData'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0xb4): undefined reference to `XML_SetElementHandler'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0xc1): undefined reference to `XML_SetCharacterDataHandler'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0xdb): undefined reference to `XML_Parse'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0xfd): undefined reference to `XML_ParserFree'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0x373): undefined reference to `XML_ParserFree'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0x37d): undefined reference to `XML_GetErrorCode'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0x397): undefined reference to `XML_ParserFree'
/usr/obj/usr/src/tmp/usr/lib/libgeom.a(geom_xml2tree.o): In function `StartElement':
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0x3eb): undefined reference to `sbuf_new'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0x735): undefined reference to `XML_StopParser'
/usr/obj/usr/src/tmp/usr/lib/libgeom.a(geom_xml2tree.o): In function `EndElement':
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0x7bb): undefined reference to `sbuf_finish'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0x7d0): undefined reference to `sbuf_data'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0x7e9): undefined reference to `sbuf_delete'
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0xa25): undefined reference to `XML_StopParser'
/usr/obj/usr/src/tmp/usr/lib/libgeom.a(geom_xml2tree.o): In function `CharData':
/usr/src/lib/libgeom/geom_xml2tree.c:(.text+0xc62): undefined reference to `sbuf_bcat'

When I discover this bug I found that libgeom got additional dependencies, but not apps using them. This bug is hidden because of dynamic linking. After I've explicitly added dependencies, everything become OK.
Comment 1 Eir Nym 2015-02-27 17:46:47 UTC
To avoid this situation because of WITHOUT_DYNAMIC_ROOT option, we should add Jenkins target to build world with #198079
Comment 3 Enji Cooper freebsd_committer 2015-02-28 02:33:13 UTC
A typo in src.libnames.mk is causing this problem. Easy fix:

$ svn diff share/mk/src.libnames.mk 
Index: share/mk/src.libnames.mk
===================================================================
--- share/mk/src.libnames.mk    (revision 279295)
+++ share/mk/src.libnames.mk    (working copy)
@@ -170,7 +170,7 @@
 .if ${MK_OPENSSL} != "no"
 _DP_bsnmp=     crypto
 .endif
-_DP_grom=      bsdxml sbuf
+_DP_geom=      bsdxml sbuf
 _DP_cam=       sbuf
 _DP_casper=    capsicum nv pjdlog
 _DP_capsicum=  nv
Comment 4 commit-hook freebsd_committer 2015-02-28 05:15:13 UTC
A commit references this bug:

Author: ngie
Date: Sat Feb 28 05:14:43 UTC 2015
New revision: 279391
URL: https://svnweb.freebsd.org/changeset/base/279391

Log:
  Fix typo (_DP_grom -> _DP_geom) so applications that need to link against
  libgeom do so successfully

  Tested by running `geom part list` produced from a -DWITHOUT_DYNAMICROOT built
  world

  PR: 198078
  Reported by: Eir Nym <eirnym@gmail.com>

Changes:
  head/share/mk/src.libnames.mk
Comment 5 Enji Cooper freebsd_committer 2015-02-28 05:18:31 UTC
This issue only affects CURRENT, so no further work needs to be done with the bug.

Thank you very much for the report :)!