[MacPorts] #57039: glib2 @2.56.2: build fails due to Tiger "which" command

MacPorts noreply at macports.org
Sun Aug 26 18:57:10 UTC 2018


#57039: glib2 @2.56.2: build fails due to Tiger "which" command
---------------------+--------------------
 Reporter:  xstnztk  |      Owner:  (none)
     Type:  defect   |     Status:  new
 Priority:  Normal   |  Milestone:
Component:  ports    |    Version:  2.5.3
 Keywords:  tiger    |       Port:  glib2
---------------------+--------------------
 I tried to build git which has glib2 as a dependency on OSX Tiger 10.4.11.
 Building glib2 failed due to the fact that the autogen.sh script tried to
 determine with the `which` command whether or not the "gtkdocize" command
 was installed. It expected that the `which` command returned nothing on
 stdout if gtkdocize was missing. Unfortunately on OSX Tiger, `which` is a
 csh script /usr/bin/which which always outputs something to stdout:

 {{{
 $ which gtkdocize 2> /dev/null
 no gtkdocize in /opt/local/bin /opt/local/sbin /bin /sbin /usr/bin
 /usr/sbin
 }}}

 autogen.sh stores this output in a shell variable which leads to the error
 output shown below:

 {{{
 --->  Configuring glib2
 Executing:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_glib2/glib2/work/glib-2.56.2"
 && ./autogen.sh --prefix=/opt/local --enable-static --disable-libelf
 --disable-compile-warnings --disable-gtk-doc --with-pcre=system
 ac_cv_prog_AWK=/usr/bin/awk ac_cv_prog_GTKDOC_CHECK=
 ac_cv_path_GTKDOC_CHECK_PATH= ac_cv_path_GTKDOC_MKPDF=
 ac_cv_path_GTKDOC_REBASE= --disable-dtrace --with-appinfo-impl=generic
 ./autogen.sh: line 11: test: too many arguments
 ./autogen.sh: line 19: gtkdocize: command not found
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_glib2/glib2/work/glib-2.56.2"
 && ./autogen.sh --prefix=/opt/local --enable-static --disable-libelf
 --disable-compile-warnings --disable-gtk-doc --with-pcre=system
 ac_cv_prog_AWK=/usr/bin/awk ac_cv_prog_GTKDOC_CHECK=
 ac_cv_path_GTKDOC_CHECK_PATH= ac_cv_path_GTKDOC_MKPDF=
 ac_cv_path_GTKDOC_REBASE= --disable-dtrace --with-appinfo-impl=generic
 Exit code: 127
 Error: Failed to configure glib2: configure failure: command execution
 failed
 }}}

 https://stackoverflow.com/a/677212 advocates against using `which` and for
 `command -v` which works in all POSIX-compatible shells, even in the
 ancient BASH 2.05b.0(1) which is the default shell on Tiger.

 Is this fix something which should go into a MacPorts patch file?

-- 
Ticket URL: <https://trac.macports.org/ticket/57039>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list