1.0.29: COMMON_LIBS in libsane.la dependencies causes potential make error
hi
1.0.29 build stops with:
----8<----
make[3]: *** No rule to make target '-L/opt/stow.d/versions/libxml2-2.9.10/usr/lib64', needed by 'libsane.la'. Stop.
make[3]: Leaving directory '/home/balducci/tmp/install-us-d/sane-backends-1.0.28.d/sane-backends-1.0.29/backend'
---->8----
Looks like the reason is using COMMON_LIBS in the deps of libsane.la in backend/Makefile; since COMMON LIBS is defined as:
----8<----
COMMON_LIBS = ../lib/liblib.la $(XML_LIBS)
---->8----
that causes the make error if XML_LIBS contains, eg, "-L/usr/local/lib -lxml2"
The following works around the problem for me:
----8<----
diff -c backend/Makefile.in.FIX_COMMON_LIBS backend/Makefile.in
*** backend/Makefile.in.FIX_COMMON_LIBS Tue Feb 4 14:00:33 2020
--- backend/Makefile.in Tue Feb 4 14:00:33 2020
***************
*** 3270,3276 ****
libsane_la_LIBADD = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo $(PRELOADABLE_BACKENDS_LIBS) $(DL_LIBS) $(XML_LIBS)
# WARNING: Automake is getting this wrong so have to do it ourselves.
! libsane_la_DEPENDENCIES = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo $(PRELOADABLE_BACKENDS_DEPS)
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
--- 3270,3276 ----
libsane_la_LIBADD = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo $(PRELOADABLE_BACKENDS_LIBS) $(DL_LIBS) $(XML_LIBS)
# WARNING: Automake is getting this wrong so have to do it ourselves.
! libsane_la_DEPENDENCIES = ../lib/liblib.la $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo $(PRELOADABLE_BACKENDS_DEPS)
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
---->8----
thanks a lot
ciao
gabriele