Skip to content

On alpine/musl, LIBS=-lbrotlicommon is needed with -lbrotlidec #17678

Description

@cpboyd

I did this

LDFLAGS="-static" LIBS="-lbrotlicommon" PKG_CONFIG="pkg-config --static" ./configure --prefix=$INSTALL_PATH --disable-shared --enable-static --disable-ldap --enable-ipv6 --enable-unix-sockets --with-ssl --with-libssh2 --disable-docs --disable-manual --with-libpsl

I expected the following

This should work without specifying LIBS="-lbrotlicommon", but this check fails since it only adds LIBS="-lbrotlidec $LIBS":

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BrotliDecoderDecompress in -lbrotlidec" >&5
printf %s "checking for BrotliDecoderDecompress in -lbrotlidec... " >&6; }
if test ${ac_cv_lib_brotlidec_BrotliDecoderDecompress+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbrotlidec  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


#ifdef __cplusplus
extern "C"
#endif
char BrotliDecoderDecompress ();
int main(void)
{
return BrotliDecoderDecompress ();
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"

This should add LIBS="-lbrotlidec -lbrotlicommon $LIBS"

curl/libcurl version

curl 8.14.1

operating system

alpine:latest

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions