After changing LIBDIR to SHLIBDIR, because of dependencies problems,
new problem shows up: symblic links (<libname>.so) are created under /usr/lib/ now, instead of under /lib/geom/ where geom(8) looks for them. Introduce a workaround to fix this by teaching geom(8) to open libraries via /lib/geom/<libname>.so.<major_number> instead of /lib/geom/<libname>.so.
This commit is contained in:
parent
4c22eb57f3
commit
32e7be7043
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132982
@ -1,6 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
WARNS?= 6
|
||||
CLASSDIR?=/lib/geom
|
||||
CLASS_DIR?=/lib/geom
|
||||
CLASS_MAJOR?=1
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
@ -1,8 +1,8 @@
|
||||
# $FreeBSD$
|
||||
|
||||
SHLIB_MAJOR= 1
|
||||
SHLIBDIR?=${CLASS_DIR}
|
||||
SHLIB_MAJOR=${CLASS_MAJOR}
|
||||
SHLIB_NAME?=geom_${CLASS}.so.${SHLIB_MAJOR}
|
||||
SHLIBDIR?= ${CLASSDIR}
|
||||
LINKS= ${BINDIR}/geom ${BINDIR}/g${CLASS}
|
||||
MAN= g${CLASS}.8
|
||||
SRCS= geom_${CLASS}.c subr.c
|
||||
|
@ -6,7 +6,7 @@ PROG= geom
|
||||
MAN= geom.8
|
||||
SRCS= geom.c subr.c
|
||||
|
||||
CFLAGS+= -DCLASSDIR=\"${CLASSDIR}\"
|
||||
CFLAGS+= -DCLASS_DIR=\"${CLASS_DIR}\" -DCLASS_MAJOR=${CLASS_MAJOR}
|
||||
CFLAGS+= -I${.CURDIR}/../../../sys -I${.CURDIR} -I${.CURDIR}/..
|
||||
|
||||
DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL}
|
||||
|
@ -438,7 +438,8 @@ load_library(void)
|
||||
uint32_t *lib_version;
|
||||
void *dlh;
|
||||
|
||||
snprintf(path, sizeof(path), "%s/geom_%s.so", CLASSDIR, class_name);
|
||||
snprintf(path, sizeof(path), "%s/geom_%s.so.%u", CLASS_DIR, class_name,
|
||||
CLASS_MAJOR);
|
||||
dlh = dlopen(path, RTLD_NOW);
|
||||
if (dlh == NULL) {
|
||||
#if 0
|
||||
|
Loading…
Reference in New Issue
Block a user