Discussion:
bootstrap fails on Darwin for `libtool'
(too old to reply)
Werner LEMBERG
2016-11-19 13:44:37 UTC
Permalink
Raw Message
Folks,


I got the following report for groff

https://savannah.gnu.org/bugs/?49651

The groff build from repository source fails in the ./bootstrap
phase on MacOS X systems. GNU libtool conflicts with the Xcode
libtool. The attached patch [below] checks for a Darwin build and
uses glibtool/glibtoolize when detected.

This looks reasonable to me. Is this the right fix? If yes, please
incorporate it into gnulib.


Werner


======================================================================


diff --git a/bootstrap b/bootstrap
index ce90bc4..a9cb5e5 100755
--- a/bootstrap
+++ b/bootstrap
@@ -435,7 +435,10 @@ check_versions() {
while read app req_ver; do
# We only need libtoolize from the libtool package.
if test "$app" = libtool; then
- app=libtoolize
+ case `uname` in
+ Darwin*) app=glibtoolize ;;
+ *) app=libtoolize ;;
+ esac
fi
# Exempt git if --no-git is in effect.
if test "$app" = git; then
Bruno Haible
2016-11-19 16:01:31 UTC
Permalink
Raw Message
The background appears to be that on macOS:
* /usr/bin/libtool is an Apple program, that does not support the GNU
interface. It comes with Xcode; Xcode is the usual way to install a
C compiler on this platform.
* To avoid a conflict, people often configure GNU libtool with
--program-prefix=g.
* Thus their libtoolize script will be found as 'glibtoolize'.

But AFAICS there is no 'libtoolize' from Apple.
Post by Werner LEMBERG
+ case `uname` in
+ Darwin*) app=glibtoolize ;;
I would still check to see whether 'libtoolize' exists, before trying
'glibtoolize'. Rationale: 'libtoolize' is the default name, 'glibtoolize'
is just a convention used by many people.

Bruno
Werner LEMBERG
2017-09-02 05:02:36 UTC
Permalink
Raw Message
From: Bruno Haible <***@clisp.org>
Subject: Re: bootstrap fails on Darwin for `libtool'
Date: Sat, 19 Nov 2016 17:01:31 +0100
Post by Bruno Haible
* /usr/bin/libtool is an Apple program, that does not support the GNU
interface. It comes with Xcode; Xcode is the usual way to install a
C compiler on this platform.
* To avoid a conflict, people often configure GNU libtool with
--program-prefix=g.
* Thus their libtoolize script will be found as 'glibtoolize'.
But AFAICS there is no 'libtoolize' from Apple.
Post by Werner LEMBERG
+ case `uname` in
+ Darwin*) app=glibtoolize ;;
I would still check to see whether 'libtoolize' exists, before
trying 'glibtoolize'. Rationale: 'libtoolize' is the default name,
'glibtoolize' is just a convention used by many people.
Bertrand prepared the attached patch.


Werner

Loading...