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

MacPorts noreply at macports.org
Mon Aug 27 06:31:58 UTC 2018


#57039: glib2 @2.56.2: build fails due to Tiger "which" command
---------------------------------+------------------------
  Reporter:  xstnztk             |      Owner:  ryandesign
      Type:  defect              |     Status:  accepted
  Priority:  Normal              |  Milestone:
 Component:  ports               |    Version:  2.5.3
Resolution:                      |   Keywords:  tiger
      Port:  glib2, glib2-devel  |
---------------------------------+------------------------

Comment (by xstnztk):

 Yes, the build only fails if gtkdocize is not present but the bash version
 should not matter because `which` is not a shell built-in in ''any'' bash
 version as far as I can tell from the documentation, so the Tiger script
 with its unexpected behavior will always be used. (BTW, it '''is''' a
 built-in in zsh.)

 On Linux (at least on Ubuntu), `which` is a shell script which does not
 output anything to stdout if the command is not found, so it seems that
 the glib2 script expects this behavior. `which` is not defined by POSIX so
 its behavior (and even its presence) is not guaranteed, whereas the exact
 behavior of `command -v` is defined by POSIX and so has a much bigger
 chance of working on most platforms:

  "Otherwise, no output shall be written and the exit status shall reflect
 that the name was not found."

 http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html

 I would prefer not having to install gtk-doc with all its dependencies
 just to get glib2 (which I anyway only need for git). It would of course
 be trivial to hack around this problem on my system (define my own
 `which`, or create a dummy `gtkdocize`) but IMHO this should be fixed for
 everybody.

 I see that there are already several patch files for glib2, so I can try
 to create another one for this problem. Anyway, thanks for keeping the old
 systems alive!

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


More information about the macports-tickets mailing list