Message ID | 20220208205232.16362-1-fontaine.fabrice@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] package/sudo: drop openssl workaround | expand |
On 08/02/2022 21:52, Fabrice Fontaine wrote: > Drop workaround added by commit bf899e50d89439b1a1bdf22bc933075958ffc108 > because sudo natively supports pkg-config for searching openssl (which > is enabled by default) since version 1.9.2 and > https://github.com/sudo-project/sudo/commit/4cadd549513ef35d4d740e941576294f4491d13d > > As a side-effect, this will fix the following build failure when openssl > is not installed on host (as LIBS is set before AX_PROG_CC_FOR_BUILD): > > configure:8162: checking whether the C compiler works > configure:8184: /usr/bin/gcc -O2 -I/home/buildroot/autobuild/instance-2/output-1/host/include -I/home/buildroot/autobuild/instance-2/output-1/host/include -L/home/buildroot/autobuild/instance-2/output-1/host/lib -Wl,-rpath,/home/buildroot/autobuild/instance-2/output-1/host/lib conftest.c -L/home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lssl -L/home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -pthread -latomic -lcrypto -pthread -latomic >&5 > /usr/bin/ld: skipping incompatible /home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libssl.a when searching for -lssl > /usr/bin/ld: skipping incompatible /home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libssl.a when searching for -lssl > /usr/bin/ld: cannot find -lssl > > Fixes: > - http://autobuild.buildroot.org/results/7a5d4dd22343be46a5ddd1c1a1a8e1799517d564 > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Applied to master, thanks. Regards, Arnout > --- > package/sudo/sudo.mk | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk > index f2c074e55f..a752217123 100644 > --- a/package/sudo/sudo.mk > +++ b/package/sudo/sudo.mk > @@ -45,17 +45,17 @@ endif > ifeq ($(BR2_PACKAGE_OPENLDAP),y) > SUDO_DEPENDENCIES += openldap > SUDO_CONF_OPTS += --with-ldap > -# If we are building sudo statically and openldap was linked with openssl, then > -# when we link sudo with openldap we need to specify the openssl libs, otherwise > -# it will fail with "undefined reference" errors. > -ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_OPENSSL),yy) > -SUDO_DEPENDENCIES += host-pkgconf > -SUDO_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`" > -endif > else > SUDO_CONF_OPTS += --without-ldap > endif > > +ifeq ($(BR2_PACKAGE_OPENSSL),y) > +SUDO_DEPENDENCIES += host-pkgconf openssl > +SUDO_CONF_OPTS += --enable-openssl > +else > +SUDO_CONF_OPTS += --disable-openssl > +endif > + > # mksigname/mksiglist needs to run on build host to generate source files > define SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST > $(MAKE) $(HOST_CONFIGURE_OPTS) \
diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk index f2c074e55f..a752217123 100644 --- a/package/sudo/sudo.mk +++ b/package/sudo/sudo.mk @@ -45,17 +45,17 @@ endif ifeq ($(BR2_PACKAGE_OPENLDAP),y) SUDO_DEPENDENCIES += openldap SUDO_CONF_OPTS += --with-ldap -# If we are building sudo statically and openldap was linked with openssl, then -# when we link sudo with openldap we need to specify the openssl libs, otherwise -# it will fail with "undefined reference" errors. -ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_OPENSSL),yy) -SUDO_DEPENDENCIES += host-pkgconf -SUDO_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`" -endif else SUDO_CONF_OPTS += --without-ldap endif +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SUDO_DEPENDENCIES += host-pkgconf openssl +SUDO_CONF_OPTS += --enable-openssl +else +SUDO_CONF_OPTS += --disable-openssl +endif + # mksigname/mksiglist needs to run on build host to generate source files define SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST $(MAKE) $(HOST_CONFIGURE_OPTS) \
Drop workaround added by commit bf899e50d89439b1a1bdf22bc933075958ffc108 because sudo natively supports pkg-config for searching openssl (which is enabled by default) since version 1.9.2 and https://github.com/sudo-project/sudo/commit/4cadd549513ef35d4d740e941576294f4491d13d As a side-effect, this will fix the following build failure when openssl is not installed on host (as LIBS is set before AX_PROG_CC_FOR_BUILD): configure:8162: checking whether the C compiler works configure:8184: /usr/bin/gcc -O2 -I/home/buildroot/autobuild/instance-2/output-1/host/include -I/home/buildroot/autobuild/instance-2/output-1/host/include -L/home/buildroot/autobuild/instance-2/output-1/host/lib -Wl,-rpath,/home/buildroot/autobuild/instance-2/output-1/host/lib conftest.c -L/home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lssl -L/home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -pthread -latomic -lcrypto -pthread -latomic >&5 /usr/bin/ld: skipping incompatible /home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libssl.a when searching for -lssl /usr/bin/ld: skipping incompatible /home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libssl.a when searching for -lssl /usr/bin/ld: cannot find -lssl Fixes: - http://autobuild.buildroot.org/results/7a5d4dd22343be46a5ddd1c1a1a8e1799517d564 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- package/sudo/sudo.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)