Message ID | 20151026095827.2679c61f@free-electrons.com |
---|---|
State | Rejected |
Headers | show |
On Mon, Oct 26, 2015 at 09:58:27 +0100, Thomas Petazzoni wrote: > On Sat, 24 Oct 2015 17:39:14 -0400, Ben Boeckel wrote: > > When a host-libcap is built, it is built without libattr support. > > However, libcap does not define some symbols based on this flag. This > > becomes a problem when a build-host tool is run (e.g., ls) which uses > > these symbols gets the host-libcap library via LD_LIBRARY_PATH. > > Ok, so let me try to understand this a bit better. You say that if you > have host-libcap built and installed in $(HOST_DIR), then when you > build another package, if the build process of that package uses your > system 'ls' (i.e /bin/ls), then this ls doesn't work properly because > it uses $(HOST_DIR)/usr/lib/libacl.so instead of /usr/lib/libacl.so. > > Is that correct ? Yes. > If that is correct, then I think your proposed change is not the right > solution, because it is just a workaround for the specific situation, > on your distribution, where ls gets linked against an acl that has attr > support. A similar problem can appear with other binaries/libraries, > and we don't want to clutter our host package dependencies to solve > such problems IMO. > > Instead, I believe we should look at removing $(HOST_DIR)/usr/lib from > LD_LIBRARY_PATH, i.e do something like: <snip> This sounds like a much better solution. Thanks, --Ben
Ben, On Mon, 26 Oct 2015 10:27:25 -0400, Ben Boeckel wrote: > > If that is correct, then I think your proposed change is not the right > > solution, because it is just a workaround for the specific situation, > > on your distribution, where ls gets linked against an acl that has attr > > support. A similar problem can appear with other binaries/libraries, > > and we don't want to clutter our host package dependencies to solve > > such problems IMO. > > > > Instead, I believe we should look at removing $(HOST_DIR)/usr/lib from > > LD_LIBRARY_PATH, i.e do something like: > <snip> > > This sounds like a much better solution. Does this mean you will send a patch for it, after doing some testing ? Thanks! Thomas
On Tue, Oct 27, 2015 at 07:29:54 +0100, Thomas Petazzoni wrote:
> Does this mean you will send a patch for it, after doing some testing ?
Patch sent. Tested locally by building util-linux.
Thanks,
--Ben
diff --git a/package/Makefile.in b/package/Makefile.in index 8a592d4..10f3a47 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -298,12 +298,10 @@ HOST_CONFIGURE_OPTS = \ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ PKG_CONFIG_SYSROOT_DIR="/" \ PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" \ - LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib$(if $(LD_LIBRARY_PATH),:$(LD_LIBRARY_PATH))" \ INTLTOOL_PERL=$(PERL) HOST_MAKE_ENV = \ PATH=$(BR_PATH) \ - LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib$(if $(LD_LIBRARY_PATH),:$(LD_LIBRARY_PATH))" \ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ PKG_CONFIG_SYSROOT_DIR="/" \ PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"