openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
3.94k stars 3.46k forks source link

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.) #19093

Open dreirund opened 2 years ago

dreirund commented 2 years ago

Maintainer:

@ratkaj

Environment:

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 commented 2 years ago

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 commented 2 years ago

Should be fixed by #19245.