Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] e2fsprogs: do not use ldconfig when building the host variant
@ 2018-08-31 21:12 Thomas Petazzoni
  2018-08-31 21:12 ` [Buildroot] [PATCH 2/2] e2fsprogs: simplify handling of ldconfig for target variant Thomas Petazzoni
  2018-09-09 13:22 ` [Buildroot] [PATCH 1/2] e2fsprogs: do not use ldconfig when building the host variant Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-08-31 21:12 UTC (permalink / raw)
  To: buildroot

Since commit 93acaa5a573865afc7a8c0912a7037965eb845a6 ("e2fsprogs:
build shared library for the host"), we are building shared libraries
in host-e2fsprogs instead of static libraries. A consequence of this
is that the e2fsprogs build system tries to run ldconfig on the host,
which fails when running as non-root:

/usr/sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
make[3]: [Makefile:441: install-shlibs] Error 1 (ignored)

Tell the configure script to use "true" as ldconfig in order to avoid
this problem.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/e2fsprogs/e2fsprogs.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk
index fecef118ac..5fe1ff8e68 100644
--- a/package/e2fsprogs/e2fsprogs.mk
+++ b/package/e2fsprogs/e2fsprogs.mk
@@ -70,7 +70,8 @@ E2FSPROGS_CONF_ENV += BUILD_CFLAGS="-DHAVE_SYS_STAT_H"
 # it doesn't provide definitions expected by e2fsprogs support lib.
 HOST_E2FSPROGS_CONF_ENV += \
 	ac_cv_header_magic_h=no \
-	ac_cv_lib_magic_magic_file=no
+	ac_cv_lib_magic_magic_file=no \
+	ac_cv_path_LDCONFIG=true
 
 E2FSPROGS_MAKE_OPTS = LDCONFIG=true
 
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 2/2] e2fsprogs: simplify handling of ldconfig for target variant
  2018-08-31 21:12 [Buildroot] [PATCH 1/2] e2fsprogs: do not use ldconfig when building the host variant Thomas Petazzoni
@ 2018-08-31 21:12 ` Thomas Petazzoni
  2018-09-09 13:22 ` [Buildroot] [PATCH 1/2] e2fsprogs: do not use ldconfig when building the host variant Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-08-31 21:12 UTC (permalink / raw)
  To: buildroot

e2fsprogs now has a proper autoconf check for ldconfig, so we can
simply pass the apropriate ac_cv_path_LDCONFIG variable at configure
time, and it gets used at build/install time without having to force
LDCONFIG=true at every step.

Since the E2FSPROGS_INSTALL_TARGET_OPTS become the default, we can get
rid of them entirely.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/e2fsprogs/e2fsprogs.mk | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk
index 5fe1ff8e68..4de469216e 100644
--- a/package/e2fsprogs/e2fsprogs.mk
+++ b/package/e2fsprogs/e2fsprogs.mk
@@ -64,7 +64,9 @@ endif
 # the configure script (i.e with the cross-compiler). Help them by
 # saying that <sys/stat.h> is available on the host, which is needed
 # for util/subst.c to build properly.
-E2FSPROGS_CONF_ENV += BUILD_CFLAGS="-DHAVE_SYS_STAT_H"
+E2FSPROGS_CONF_ENV += \
+	BUILD_CFLAGS="-DHAVE_SYS_STAT_H" \
+	ac_cv_path_LDCONFIG=true
 
 # Disable use of the host magic.h, as on older hosts (e.g. RHEL 5)
 # it doesn't provide definitions expected by e2fsprogs support lib.
@@ -73,18 +75,10 @@ HOST_E2FSPROGS_CONF_ENV += \
 	ac_cv_lib_magic_magic_file=no \
 	ac_cv_path_LDCONFIG=true
 
-E2FSPROGS_MAKE_OPTS = LDCONFIG=true
-
 E2FSPROGS_INSTALL_STAGING_OPTS = \
 	DESTDIR=$(STAGING_DIR) \
-	LDCONFIG=true \
 	install-libs
 
-E2FSPROGS_INSTALL_TARGET_OPTS = \
-	DESTDIR=$(TARGET_DIR) \
-	LDCONFIG=true \
-	install
-
 define HOST_E2FSPROGS_INSTALL_CMDS
 	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs
 endef
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/2] e2fsprogs: do not use ldconfig when building the host variant
  2018-08-31 21:12 [Buildroot] [PATCH 1/2] e2fsprogs: do not use ldconfig when building the host variant Thomas Petazzoni
  2018-08-31 21:12 ` [Buildroot] [PATCH 2/2] e2fsprogs: simplify handling of ldconfig for target variant Thomas Petazzoni
@ 2018-09-09 13:22 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-09-09 13:22 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 31 Aug 2018 23:12:39 +0200, Thomas Petazzoni wrote:
> Since commit 93acaa5a573865afc7a8c0912a7037965eb845a6 ("e2fsprogs:
> build shared library for the host"), we are building shared libraries
> in host-e2fsprogs instead of static libraries. A consequence of this
> is that the e2fsprogs build system tries to run ldconfig on the host,
> which fails when running as non-root:
> 
> /usr/sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
> make[3]: [Makefile:441: install-shlibs] Error 1 (ignored)
> 
> Tell the configure script to use "true" as ldconfig in order to avoid
> this problem.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  package/e2fsprogs/e2fsprogs.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Both patches applied to master.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-09 13:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-31 21:12 [Buildroot] [PATCH 1/2] e2fsprogs: do not use ldconfig when building the host variant Thomas Petazzoni
2018-08-31 21:12 ` [Buildroot] [PATCH 2/2] e2fsprogs: simplify handling of ldconfig for target variant Thomas Petazzoni
2018-09-09 13:22 ` [Buildroot] [PATCH 1/2] e2fsprogs: do not use ldconfig when building the host variant Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox