Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/civetweb: fix underlinked shared library
Date: Wed, 16 Sep 2026 23:33:38 +0200	[thread overview]
Message-ID: <aqsKYN1FrDn93tGu@windsurf> (raw)
In-Reply-To: <20260830180717.96967-1-alexander.sverdlin@gmail.com>

Hello Alexander,

On Sun, Aug 30, 2026 at 08:07:13PM +0200, Alexander Sverdlin wrote:
> The install steps re-link libcivetweb.so but do not pass LIBS, so the link
> falls back to the upstream Makefile defaults and loses the OpenSSL flags
> added by the package. The correctly linked library produced by the build
> step is then overwritten by an underlinked one, leaving SSL_CTX_free,
> EVP_Digest and friends undefined and breaking any package linking against
> -lcivetweb.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

Thanks a lot for your patch. Do you have a defconfig that reproduces
the issue? The only in-tree user of civetweb is rsyslog, so I built:

BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_PACKAGE_OPENSSL=y
BR2_PACKAGE_CIVETWEB=y
BR2_PACKAGE_CIVETWEB_LIB=y
BR2_PACKAGE_RSYSLOG=y

which builds fine. However, I agree that libcivetweb.so.1.16.0 uses
SSL symbols but is not linked against libcrypto.

What's mostly missing from your commit is an indication of what
introduced the problem. Is this a recent issue? Does it exist since
civetweb was added in Buildroot?

Or perhaps since LIBS was started being used in commit
3cf5b3019118cdc980666d7a1ccfd29f658d0261 ?

>  package/civetweb/civetweb.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/civetweb/civetweb.mk b/package/civetweb/civetweb.mk
> index af221e9133..4fdd94ecc7 100644
> --- a/package/civetweb/civetweb.mk
> +++ b/package/civetweb/civetweb.mk
> @@ -93,7 +93,7 @@ define CIVETWEB_INSTALL_STAGING_CMDS
>  		PREFIX="$(STAGING_DIR)/usr" \
>  		$(CIVETWEB_INSTALL_OPTS) \
>  		$(CIVETWEB_CONF_OPTS) \
> -		COPT='$(CIVETWEB_COPT)'
> +		COPT='$(CIVETWEB_COPT)' LIBS="$(CIVETWEB_LIBS)"

And I assume fixing the build system so that it doesn't re-link at
install time is not doable? :-)

Small nit: for me "underlinked" is a bit hard to understand. Perhaps
"fix linking against dependant shared libraries" or something like
that?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-09-16 21:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 18:07 [Buildroot] [PATCH] package/civetweb: fix underlinked shared library Alexander Sverdlin
2026-09-16 21:33 ` Thomas Petazzoni via buildroot [this message]
2026-09-22 21:04   ` Alexander Sverdlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqsKYN1FrDn93tGu@windsurf \
    --to=buildroot@buildroot.org \
    --cc=alexander.sverdlin@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox