packages icon indicating copy to clipboard operation
packages copied to clipboard

squid: Build with `SQUID_auth-basic=y` fails with missing dependencies on `libpam.so.0` and `libsasl2.so.3`. [FIX] `Makefile` needs `libpam` and `libsasl2` as dependencies in this config. (22.03.)

Open dreirund opened this issue 1 year ago • 1 comments

Maintainer:

@ratkaj

Environment:

  • Building for Xunlog OrangePi Plus (sun8i):
    grep ^CONFIG_TARGET .config:
    CONFIG_TARGET_sunxi=y
    CONFIG_TARGET_sunxi_cortexa7=y
    CONFIG_TARGET_sunxi_cortexa7_DEVICE_xunlong_orangepi-plus=y
    CONFIG_TARGET_BOARD="sunxi"
    CONFIG_TARGET_SUBTARGET="cortexa7"
    CONFIG_TARGET_PROFILE="DEVICE_xunlong_orangepi-plus"
    CONFIG_TARGET_ARCH_PACKAGES="arm_cortex-a7_neon-vfpv4"
    [...]
    
  • OpenWrt version:
    • Git branch openwrt-22.03 from git://git.openwrt.org/openwrt/openwrt.git,
    • initially checked out on 2022-07-05,
    • latest git pull and ./scripts/feeds update -a && ./scripts/feeds update -a on 2022-08-02, ca. 12:23 GMT
      (I give up on posting latest commit date and hash, since git log gives me some old dates, and I don't know how I can make git log printing out the last operation. I don't know much about git.)
  • Building on GNU/Linux on x86_64-architecture (Distribution: → Artix Linux).
  • OpenWrt configuration: → .config,
  • grep -i squid .config | grep -v i18n:
    CONFIG_PACKAGE_luci-app-squid=y
    CONFIG_PACKAGE_squid=y
    CONFIG_SQUID_enable-ipv6=y
    CONFIG_SQUID_enable-snmp=y
    CONFIG_SQUID_enable-icmp=y
    CONFIG_SQUID_enable-icap-client=y
    CONFIG_SQUID_enable-dlmalloc=y
    CONFIG_SQUID_enable-ssl-crtd=y
    CONFIG_SQUID_auth-basic=y
    CONFIG_SQUID_auth-digest=y
    CONFIG_SQUID_auth-negotiate=y
    CONFIG_SQUID_auth-ntlm=y
    CONFIG_SQUID_use-openssl=y
    # CONFIG_SQUID_use-gnutls is not set
    CONFIG_SQUID_with-libcap=y
    CONFIG_SQUID_with-nettle=y
    # CONFIG_SQUID_with-expat is not set
    # CONFIG_SQUID_with-libxml2 is not set
    CONFIG_PACKAGE_squid-mod-cachemgr=y
    

Description:

A make -j6 fails in above configuration on package/feeds/packages/squid. An explicit run of
make -j1 V=sc package/feeds/packages/squid/compile
fails with

Package squid is missing dependencies for the following libraries:
libpam.so.0
libsasl2.so.3
More context of `make -j1 V=sc package/feeds/packages/squid/compile` (*click* to open):
[...]
make[2]: Entering directory '/[...]/openwrt-22.03/feeds/packages/net/squid'
mkdir -p /[...]/openwrt-22.03/bin/targets/sunxi/cortexa7/packages /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/CONTROL /[...]/openwrt-22.03/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo
install -d -m0755 /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/usr/sbin
install -m0755 /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-install/usr/sbin/squid /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/usr/sbin/
install -d -m0755 /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/usr/lib/squid
install -m0755 /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-install/usr/lib/squid/* /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/usr/lib/squid/
install -d -m0755 /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/etc/config
install -m0600 ./files/squid.config /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/etc/config/squid
install -d -m0755 /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/etc/squid
cp -fpR /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-install/etc/squid/* /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/etc/squid/
install -m0600 ./files/squid.conf /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/etc/squid/
install -d -m0755 /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/etc/init.d/
install -m0755 ./files/squid.init /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/etc/init.d/squid
install -d -m0755 /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/usr/share/squid/icons/
cp -fpR /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-install/usr/share/squid/icons/* /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/usr/share/squid/icons/
cp -fpR /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-install/usr/share/squid/mib.txt /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/usr/share/squid/
install -d -m0755 /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/usr/share/squid/errors/templates/
cp -fpR /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-install/usr/share/squid/errors/templates/* /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid/usr/share/squid/errors/templates/
find /[...]/openwrt-22.03/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/squid-4.16/ipkg-arm_cortex-a7_neon-vfpv4/squid -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package squid is missing dependencies for the following libraries:
libpam.so.0
libsasl2.so.3
make[2]: *** [Makefile:176: /[...]/openwrt-22.03/bin/packages/arm_cortex-a7_neon-vfpv4/packages/squid_4.16-1_arm_cortex-a7_neon-vfpv4.ipk] Error 1
make[2]: Leaving directory '/[...]/openwrt-22.03/feeds/packages/net/squid'
time: package/feeds/packages/squid/compile#1.44#0.45#1.76
    ERROR: package/feeds/packages/squid failed to build.
[...]

→ Full output of make -j1 V=sc package/feeds/packages/squid/compile (*click* to view/download).

For a fix, see this comment.

dreirund avatar Aug 02 '22 20:08 dreirund

When I deselect "Enable the Basic authentication scheme" (SQUID_auth-basic=n), this error does not appear.

That did lead me to try to add to package/feeds/packages/squid/Makefile the following entry:

DEPENDS+= +SQUID_auth-basic:libpam +SQUID_auth-basic:libsasl2

which makes squid build even with SQUID_auth-basic=y.

Diff to the Makefile:

--- Makefile.org	2022-08-02 22:26:46.349897921 +0200
+++ Makefile	2022-08-03 14:28:22.299557624 +0200
@@ -39,2 +39,3 @@
   DEPENDS:=+libpthread +librt +libltdl +libstdcpp +libatomic +USE_GLIBC:libbsd
+  DEPENDS+= +SQUID_auth-basic:libpam +SQUID_auth-basic:libsasl2
   DEPENDS+= +SQUID_use-gnutls:libgnutls +SQUID_use-openssl:libopenssl

and for download as standalone → patch file. Feel free to incorporate the change in a way that suits the OpenWrt Makefile writing style, or fix it in any other way.

dreirund avatar Aug 03 '22 12:08 dreirund

Should be fixed by #19245.

dreirund avatar Aug 23 '22 23:08 dreirund