[MacPorts] #61558: man @1.6g_2: error: type name requires a specifier or qualifier

MacPorts noreply at macports.org
Sun Dec 20 09:57:42 UTC 2020


#61558: man @1.6g_2: error: type name requires a specifier or qualifier
------------------------------+-----------------------------
  Reporter:  GussyFinkNottle  |      Owner:  ryandesign
      Type:  defect           |     Status:  accepted
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.6.4
Resolution:                   |   Keywords:  catalina bigsur
      Port:  man              |
------------------------------+-----------------------------
Changes (by ryandesign):

 * status:  new => accepted
 * owner:  (none) => ryandesign
 * cc: ryandesign (removed)


Comment:

 Like #61446 this is also due to implicit function declarations, but this
 time in the configure script.

 I'm using MacPorts base master (2.6.99) which includes additional code to
 look for signs of implicit function declarations in the config.log and
 print them out. Unfortunately, man doesn't use an autoconf-based configure
 script. It uses a hand-made configure script, one which does not write a
 config.log or provide a way to see any errors encountered in the
 configuration tests, which is why this additional MacPorts base code
 didn't show any signs of the problem.

 Since the build error mentioned `uid_t`, this output from the configure
 script caught my eye:

 {{{
 checking whether sys/types.h defines uid_t
 awk: can't open file /usr/include/pwd.h
  source line number 1
 }}}

 What's happening is that it's trying to compile a test program to
 determine if `uid_t` is defined. It fails to compile due to implicit
 function declarations. It then tries a second way of determining what type
 to use instead of `uid_t`: it tries to parse the /usr/include/pwd.h header
 directly. Headers aren't in /usr/include on Mojave or later, so this too
 fails, but the configure script does not contain any error checking that
 would notice this, assumes it has succeeded, and adds command line macros
 which effectively replace all occurrences of `uid_t` (and `gid_t`) with
 whatever was found in the file -- in this case nothing. We see `-Duid_t=
 -Dgid_t=` in the compile lines in the build phase. This leads to the build
 error since the compiler now thinks we're trying to use `si_uid` as the
 type name, and that isn't a type name.

 This is probably not the only configure test that is failing due to
 implicit function declarations, so rather than just fix this one, I will
 try to modify the configure script to write a minimal config.log or at
 least output its errors so that I can see and fix all of the problems.

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


More information about the macports-tickets mailing list