Skip to contentSkip to conversation

mtools: do not link to libbsd

PATCH New Carlos Santos 2 participants 3 messages Nov 28, 2017 – Dec 20, 2017 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 0171128125226.32n343bxgzhcrfvp@tarshish

#1 lore raw

PATCH v2 1/1 mtools: do not link to libbsd

If libbsd is found by the configuration process, mtools unnecessarily adds a NEEDED field with libbsd to its dynamic section, but it does not actually use anything from libbsd under Linux. The same may happen to host-mtools if some libbsd package is installed on the host machine.

Prevent this by forcing configure to bypass the checking for the existence of a gethostbyname function in libbsd.

I stumbled on this problem when I built host-mtools and later removed libbsd to upgrade to Fedora 27, due to Bug 1504831[1]. The previously built host/bin/mtools started to fail due to the missing libbsd.so.0.

1. https://bugzilla.redhat.com/show_bug.cgi?id=1504831

---
Changes v1->v2
- Improved the commit message, as requested by Baruch Siach.

---
 package/mtools/mtools.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/mtools/mtools.mk +4 -0
index 5db548fad9..1a6218831e 100644
@@ -13,9 +13,13 @@ MTOOLS_CONF_OPTS = --without-x
 # info documentation not needed
 MTOOLS_CONF_ENV = \
 	ac_cv_func_setpgrp_void=yes \
+	ac_cv_lib_bsd_gethostbyname=no \
+	ac_cv_lib_bsd_main=no \
 	ac_cv_path_INSTALL_INFO=
 
 HOST_MTOOLS_CONF_ENV = \
+	ac_cv_lib_bsd_gethostbyname=no \
+	ac_cv_lib_bsd_main=no \
 	ac_cv_path_INSTALL_INFO=
 
 # link with iconv if enabled
Signature · 1 line
2.14.3
#2 lore raw

PATCH v2 1/1 mtools: do not link to libbsd

Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Carlos" == Carlos Santos <[email protected]> writes:

If libbsd is found by the configuration process, mtools unnecessarily adds a NEEDED field with libbsd to its dynamic section, but it does not actually use anything from libbsd under Linux. The same may happen to host-mtools if some libbsd package is installed on the host machine.

Prevent this by forcing configure to bypass the checking for the existence of a gethostbyname function in libbsd.

I stumbled on this problem when I built host-mtools and later removed libbsd to upgrade to Fedora 27, due to Bug 1504831[1]. The previously built host/bin/mtools started to fail due to the missing libbsd.so.0.

Quoted 6 lines

1. https://bugzilla.redhat.com/show_bug.cgi?id=1504831

---
Changes v1->v2
- Improved the commit message, as requested by Baruch Siach.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH v2 1/1 mtools: do not link to libbsd

In reply to Carlos Santos
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Carlos" == Carlos Santos <[email protected]> writes:

If libbsd is found by the configuration process, mtools unnecessarily adds a NEEDED field with libbsd to its dynamic section, but it does not actually use anything from libbsd under Linux. The same may happen to host-mtools if some libbsd package is installed on the host machine.

Prevent this by forcing configure to bypass the checking for the existence of a gethostbyname function in libbsd.

I stumbled on this problem when I built host-mtools and later removed libbsd to upgrade to Fedora 27, due to Bug 1504831[1]. The previously built host/bin/mtools started to fail due to the missing libbsd.so.0.

Quoted 6 lines

1. https://bugzilla.redhat.com/show_bug.cgi?id=1504831

---
Changes v1->v2
- Improved the commit message, as requested by Baruch Siach.

Committed to 2017.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard