All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] package/exim: remove libnsl linking with Glibc.
@ 2018-05-04 21:02 Romain Naour
  2018-05-04 21:02 ` [Buildroot] [PATCH v2 2/2] Revert "glibc: install the obsolete libnsl" Romain Naour
  2018-05-16 15:12 ` [Buildroot] [PATCH v2 1/2] package/exim: remove libnsl linking with Glibc Luca Ceresoli
  0 siblings, 2 replies; 4+ messages in thread
From: Romain Naour @ 2018-05-04 21:02 UTC (permalink / raw)
  To: buildroot

glibc now considers its built-in libnsl as being obsolete, and requires
passing --enable-obsolete-libnsl to have it built and installed. libnsl
is now provided as a separate project [1], but it isn't packaged yet in
Buildroot.

In preparation for dropping --enable-obsolete-libnsl from the glibc
package, this commit ensures that exim doesn't use libnsl. It was
already the case for uclibc and musl toolchains, so this commit simply
extends that to make sure libnsl is also not used with glibc toolchains.

Only Exim's nis.so and nisplus.so lookup modules require libnsl,
but they are not build by default. So we can safely remove -lnsl
from the Makefile-Linux. If someone want these modules, a new libnsl
package must be added first to provide nsl library.

Note: Fedora 28 has switched to the new libnsl library that bring
IPV6 support. [2]

[1] https://github.com/thkukuk/libnsl.git
[2] https://fedoraproject.org/wiki/Changes/NISIPv6

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>
---
 package/exim/exim.mk | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/package/exim/exim.mk b/package/exim/exim.mk
index 37eab501a4..586bf3235c 100644
--- a/package/exim/exim.mk
+++ b/package/exim/exim.mk
@@ -72,13 +72,15 @@ define EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL
 endef
 endif
 
-# only glibc provides libnsl, remove -lnsl for all other toolchains
+# Only Exim's nis.so and nisplus.so lookup modules require libnsl,
+# but they are not build by default.
+# libnsl has been deprecated from Glibc and no other libc provide it.
+# There is no libnsl package in Buildroot yet.
+# Remove -lnsl for all toolchains.
 # http://bugs.exim.org/show_bug.cgi?id=1564
-ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
 define EXIM_REMOVE_LIBNSL_FROM_MAKEFILE
 	$(SED) 's/-lnsl//g' $(@D)/OS/Makefile-Linux
 endef
-endif
 
 # musl does not provide struct ip_options nor struct ip_opts (but it is
 # available with both glibc and uClibc)
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 2/2] Revert "glibc: install the obsolete libnsl"
  2018-05-04 21:02 [Buildroot] [PATCH v2 1/2] package/exim: remove libnsl linking with Glibc Romain Naour
@ 2018-05-04 21:02 ` Romain Naour
  2018-05-16 15:12 ` [Buildroot] [PATCH v2 1/2] package/exim: remove libnsl linking with Glibc Luca Ceresoli
  1 sibling, 0 replies; 4+ messages in thread
From: Romain Naour @ 2018-05-04 21:02 UTC (permalink / raw)
  To: buildroot

libnsl from Glibc is deprecated and should not be used anymore.
Remove libnsl.so.* from GLIBC_LIBS_LIB.

libnsl is now an separate library that can be packaged later if
necessary [1].

Note: libnsl from Glibc doesn't build with gcc 8 due new warning [2].

[1] https://github.com/thkukuk/libnsl.git
[2] http://patchwork.sourceware.org/patch/26437

This reverts commit 398747f5fafca8c07e696612d8eded53d4f935c7.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>
---
v2: remove libnsl.so.* from GLIBC_LIBS_LIB
---
 package/glibc/glibc.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index 3ab673c0cc..c1c5ac687f 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -100,7 +100,6 @@ define GLIBC_CONFIGURE_CMDS
 		--disable-profile \
 		--without-gd \
 		--enable-obsolete-rpc \
-		--enable-obsolete-nsl \
 		--enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \
 		--with-headers=$(STAGING_DIR)/usr/include)
 	$(GLIBC_ADD_MISSING_STUB_H)
@@ -113,7 +112,7 @@ endef
 
 GLIBC_LIBS_LIB = \
 	ld*.so.* libanl.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* \
-	libm.so.* libnsl.so.* libpthread.so.* libresolv.so.* librt.so.* \
+	libm.so.* libpthread.so.* libresolv.so.* librt.so.* \
 	libutil.so.* libnss_files.so.* libnss_dns.so.* libmvec.so.*
 
 ifeq ($(BR2_PACKAGE_GDB),y)
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/exim: remove libnsl linking with Glibc.
  2018-05-04 21:02 [Buildroot] [PATCH v2 1/2] package/exim: remove libnsl linking with Glibc Romain Naour
  2018-05-04 21:02 ` [Buildroot] [PATCH v2 2/2] Revert "glibc: install the obsolete libnsl" Romain Naour
@ 2018-05-16 15:12 ` Luca Ceresoli
  2018-05-16 19:48   ` Luca Ceresoli
  1 sibling, 1 reply; 4+ messages in thread
From: Luca Ceresoli @ 2018-05-16 15:12 UTC (permalink / raw)
  To: buildroot

Hi Romain,

On 04/05/2018 23:02, Romain Naour wrote:
> glibc now considers its built-in libnsl as being obsolete, and requires
> passing --enable-obsolete-libnsl to have it built and installed. libnsl
> is now provided as a separate project [1], but it isn't packaged yet in
> Buildroot.
> 
> In preparation for dropping --enable-obsolete-libnsl from the glibc
> package, this commit ensures that exim doesn't use libnsl. It was
> already the case for uclibc and musl toolchains, so this commit simply
> extends that to make sure libnsl is also not used with glibc toolchains.
> 
> Only Exim's nis.so and nisplus.so lookup modules require libnsl,
> but they are not build by default. So we can safely remove -lnsl
> from the Makefile-Linux. If someone want these modules, a new libnsl
> package must be added first to provide nsl library.>
> Note: Fedora 28 has switched to the new libnsl library that bring
> IPV6 support. [2]

...and this triggered host toolchain issues such as:

http://autobuild.buildroot.net/results/a362dfef9e5187931431000c54f03f841d17c847/

The reason is that the host tools generates by exim (namely buildconfig)
are built out of build-br/Makefile, which is assembled by concatenating
together several makefiles including OS/Makefile-Linux. So the
buildconfig tool will try to link against libnsl, but that's not needed.

As a positive side effect, this patch fixes the above issue.

Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
-- 
Luca

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/exim: remove libnsl linking with Glibc.
  2018-05-16 15:12 ` [Buildroot] [PATCH v2 1/2] package/exim: remove libnsl linking with Glibc Luca Ceresoli
@ 2018-05-16 19:48   ` Luca Ceresoli
  0 siblings, 0 replies; 4+ messages in thread
From: Luca Ceresoli @ 2018-05-16 19:48 UTC (permalink / raw)
  To: buildroot

Hi Romain,

On 16/05/2018 17:12, Luca Ceresoli wrote:
> Hi Romain,
> 
> On 04/05/2018 23:02, Romain Naour wrote:
>> glibc now considers its built-in libnsl as being obsolete, and requires
>> passing --enable-obsolete-libnsl to have it built and installed. libnsl
>> is now provided as a separate project [1], but it isn't packaged yet in
>> Buildroot.
>>
>> In preparation for dropping --enable-obsolete-libnsl from the glibc
>> package, this commit ensures that exim doesn't use libnsl. It was
>> already the case for uclibc and musl toolchains, so this commit simply
>> extends that to make sure libnsl is also not used with glibc toolchains.
>>
>> Only Exim's nis.so and nisplus.so lookup modules require libnsl,
>> but they are not build by default. So we can safely remove -lnsl
>> from the Makefile-Linux. If someone want these modules, a new libnsl
>> package must be added first to provide nsl library.>
>> Note: Fedora 28 has switched to the new libnsl library that bring
>> IPV6 support. [2]
> 
> ...and this triggered host toolchain issues such as:
> 
> http://autobuild.buildroot.net/results/a362dfef9e5187931431000c54f03f841d17c847/
> 
> The reason is that the host tools generates by exim (namely buildconfig)
> are built out of build-br/Makefile, which is assembled by concatenating
> together several makefiles including OS/Makefile-Linux. So the
> buildconfig tool will try to link against libnsl, but that's not needed.
> 
> As a positive side effect, this patch fixes the above issue.
> 
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> 

As discussed, I suggest the following changes to the log message. Feel
free to improve them.

Subject:

+package/exim: remove libnsl linking with Glibc.
-package/exim: remove libnsl linking and fix native tools build

Remove from description:

Note: Fedora 28 has switched to the new libnsl library that bring
IPV6 support. [2]

Add to description:

This also fixes the following build error on recent distributions where
libnsl is not installed (e.g. Fedora 28 which has switched to the new
libnsl library that brings IPV6 support. [2]):

  /bin/sh ../scripts/Configure-os.c
  /usr/bin/gcc buildconfig.c
  /usr/bin/ld: cannot find -lnsl
  collect2: error: ld returned 1 exit status

This happens while exim builds a host tool named buildconfig. The build
is done in build-br/Makefile, which in turn is assembled by
concatenating together several makefiles, including OS/Makefile-Linux.
So the buildconfig tool will be built with the same $(LIBS) as the
target executables, including -lnsl. Removing -lnsl also fixes building
buildconfig since it does not need libnsl.

Bye,
-- 
Luca

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-16 19:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-04 21:02 [Buildroot] [PATCH v2 1/2] package/exim: remove libnsl linking with Glibc Romain Naour
2018-05-04 21:02 ` [Buildroot] [PATCH v2 2/2] Revert "glibc: install the obsolete libnsl" Romain Naour
2018-05-16 15:12 ` [Buildroot] [PATCH v2 1/2] package/exim: remove libnsl linking with Glibc Luca Ceresoli
2018-05-16 19:48   ` Luca Ceresoli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.