From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 07 Feb 2022 16:23:21 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nH5rN-008MaK-92 for lore@lore.pengutronix.de; Mon, 07 Feb 2022 16:23:21 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1nH5rM-00047e-20; Mon, 07 Feb 2022 16:23:20 +0100 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nH5ql-000479-JL; Mon, 07 Feb 2022 16:22:43 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1nH5ql-0003VI-7W; Mon, 07 Feb 2022 16:22:43 +0100 Date: Mon, 7 Feb 2022 16:22:43 +0100 From: Michael Olbrich To: Clemens Gruber Message-ID: <20220207152243.GZ11273@pengutronix.de> Mail-Followup-To: Clemens Gruber , ptxdist@pengutronix.de References: <20220204162809.830058-1-clemens.gruber@pqgruber.com> <20220207073936.GQ11273@pengutronix.de> <20220207103909.GB538@falbala.internal.home.lespocky.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 16:18:16 up 59 days, 3 min, 83 users, load average: 0.26, 0.20, 0.18 User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] [PATCH 1/3] hiredis: new package X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Hi, On Mon, Feb 07, 2022 at 02:33:29PM +0100, Clemens Gruber wrote: > On Mon, Feb 07, 2022 at 02:11:13PM +0100, Alexander Dahl wrote: > > Am Mon, Feb 07, 2022 at 01:54:04PM +0100 schrieb Clemens Gruber: > > > On Mon, Feb 07, 2022 at 11:39:10AM +0100, Alexander Dahl wrote: > > > > On Mon, Feb 07, 2022 at 10:03:21AM +0100, Clemens Gruber wrote: > > > > > On Mon, Feb 07, 2022 at 08:39:36AM +0100, Michael Olbrich wrote: > > > > > > On Fri, Feb 04, 2022 at 05:28:07PM +0100, Clemens Gruber wrote: > > > > > > > Adds a new package for hiredis, a minimalistic C client library for > > > > > > > Redis. > > > > > > > > > > > > > > Signed-off-by: Clemens Gruber > > > > > > > --- > > > > > > > rules/hiredis.in | 8 ++++++ > > > > > > > rules/hiredis.make | 61 ++++++++++++++++++++++++++++++++++++++++++++++ > > > > > > > 2 files changed, 69 insertions(+) > > > > > > > create mode 100644 rules/hiredis.in > > > > > > > create mode 100644 rules/hiredis.make > > > > > > > > > > > > > > diff --git a/rules/hiredis.in b/rules/hiredis.in > > > > > > > new file mode 100644 > > > > > > > index 000000000..d416d69c4 > > > > > > > --- /dev/null > > > > > > > +++ b/rules/hiredis.in > > > > > > > @@ -0,0 +1,8 @@ > > > > > > > +## SECTION=system_libraries > > > > > > > + > > > > > > > +config HIREDIS > > > > > > > + tristate > > > > > > > + select HOST_CMAKE > > > > > > > + prompt "hiredis " > > > > > > > + help > > > > > > > + Hiredis is a minimalistic C client library for the Redis database. > > > > > > > diff --git a/rules/hiredis.make b/rules/hiredis.make > > > > > > > new file mode 100644 > > > > > > > index 000000000..10e6d81d2 > > > > > > > --- /dev/null > > > > > > > +++ b/rules/hiredis.make > > > > > > > @@ -0,0 +1,61 @@ > > > > > > > +# -*-makefile-*- > > > > > > > +# > > > > > > > +# Copyright (C) 2022 by Clemens Gruber > > > > > > > +# > > > > > > > +# For further information about the PTXdist project and license conditions > > > > > > > +# see the README file. > > > > > > > +# > > > > > > > + > > > > > > > +# > > > > > > > +# We provide this package > > > > > > > +# > > > > > > > +PACKAGES-$(PTXCONF_HIREDIS) += hiredis > > > > > > > + > > > > > > > +# > > > > > > > +# Paths and names > > > > > > > +# > > > > > > > +HIREDIS_VERSION := 1.0.2 > > > > > > > +HIREDIS_MD5 := 58e8313188f66ed1be1c220d14a7752e > > > > > > > +HIREDIS := hiredis-$(HIREDIS_VERSION) > > > > > > > +HIREDIS_SUFFIX := tar.gz > > > > > > > +HIREDIS_URL := https://github.com/redis/hiredis/archive/v$(HIREDIS_VERSION).$(HIREDIS_SUFFIX) > > > > > > > +HIREDIS_SOURCE := $(SRCDIR)/$(HIREDIS).$(HIREDIS_SUFFIX) > > > > > > > +HIREDIS_DIR := $(BUILDDIR)/$(HIREDIS) > > > > > > > +HIREDIS_LICENSE := BSD-3-Clause > > > > > > > > > > > > Please add _LICENSE_FILES as well. > > > > > > > > > > > > > + > > > > > > > +# ---------------------------------------------------------------------------- > > > > > > > +# Prepare > > > > > > > +# ---------------------------------------------------------------------------- > > > > > > > + > > > > > > > +# > > > > > > > +# cmake > > > > > > > +# > > > > > > > +HIREDIS_CONF_TOOL := cmake > > > > > > > + > > > > > > > +HIREDIS_CONF_OPT := \ > > > > > > > + $(CROSS_CMAKE_USR) \ > > > > > > > + -DDISABLE_TESTS=ON \ > > > > > > > + -DENABLE_SSL=OFF > > > > > > > + > > > > > > > + > > > > > > > +# ---------------------------------------------------------------------------- > > > > > > > +# Target-Install > > > > > > > +# ---------------------------------------------------------------------------- > > > > > > > + > > > > > > > +$(STATEDIR)/hiredis.targetinstall: > > > > > > > + @$(call targetinfo) > > > > > > > + > > > > > > > + @$(call install_init, hiredis) > > > > > > > + @$(call install_fixup, hiredis,PRIORITY,optional) > > > > > > > + @$(call install_fixup, hiredis,SECTION,base) > > > > > > > + @$(call install_fixup, hiredis,AUTHOR,"Clemens Gruber ") > > > > > > > + @$(call install_fixup, hiredis,DESCRIPTION,"Minimalistic C client for Redis") > > > > > > > + > > > > > > > + @$(call install_lib, hiredis, 0, 0, 0644, libhiredis) > > > > > > > + @$(call install_link, hiredis, libhiredis.so.1.0.0, /usr/lib/libhiredis.so) > > > > > > > > > > > > In general, this link should not be needed. If it really is needed then > > > > > > please add a comment why. > > > > > > > > > > Maybe you can help me out here: If I don't call install_link, the > > > > > libhiredis.so link is not present in my rootfs image, even though it is > > > > > present in platform-xyz/packages/hiredis-1.0.2/usr/lib and in > > > > > platform-xyz/root/usr/lib > > > > > > > > I would expect this. Usually you have three pieces: > > > > > > > > libfoo.so.1.0.0 (real binary file) > > > > libfoo.so.1 (symlink to libfoo.so.1.0.0, used at runtime by users of the lib) > > > > libfoo.so (symlink, used at build time) > > > > > > > > > Still in my rootfs image, there is only /usr/lib/libhiredis.so.1.0.0 > > > > > It is a normal root.ext2 image with ext2fs type ext4. > > > > > > > > > > Any idea why that is? > > > > > > > > No idea why that is, but without further knowledge of that lib I would > > > > expect to see libhiredis.so.1 on the target instead of libhiredis.so > > > > (which is probably only needed in sysroot-target). > > > > > > I forgot to mention that the libhiredis.so.1 link is also created in > > > platform-xyz/packages/.. and platform-xyz/root/.. > > > I should probably have added the create_link for that one as well but > > > did not need it because a binary blob not under my control dynloads > > > /usr/lib/libhiredis.so > > I have to correct myself here: The libhiredis.so.1 is not created and > not present in platform-xyz/root or platform-xyz/packages/hiredis-1.0.2 > This was a leftover from tests/experiments of mine. > > > This sound like a flaw in that binary blob?! That ".1" usually marks > > the so version and different numbers are not necessarily compatible, > > so by loading libhiredis.so you are at risk of loading an incompatible > > library? > > Yes, you are right. This could lead to problems in the future. > > > > > > Maybe Michael can shed some light on why the links are not present in > > > the rootfs. > > > > Maybe libhiredis makes something different than usual. Haven't looked > > into it. O:-) > > It seems the libhiredis cmake config only sets VERSION but not > SOVERSION, so SOVERSION is assumed to be 1.0.0 as well, which explains > why there is only one symlink, but not why that one is not present in > the rootfs. Lets see what exactly is needed first. What's the output of: readelf -d platform-xyz/packages/hiredis-1.0.2/usr/lib/libhiredis.so.1.0.0 If the library is created correctly then there should be something like: [...] 0x000000000000000e (SONAME) Library soname: [libhiredis.so.1] [...] The linker (at build-time) will take that and write it into the user of the library, so this link is needed at runtime. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de