[MacPorts] #69676: libdicom @1.1.0_0+universal: error: implicit declaration of function 'close' is invalid in C99 (was: libdicom @1.1.0_0+universal: Build breaks due to compiler error)

MacPorts noreply at macports.org
Fri Apr 5 16:30:24 UTC 2024


#69676: libdicom @1.1.0_0+universal: error: implicit declaration of function
'close' is invalid in C99
------------------------+----------------------
  Reporter:  conradkun  |      Owner:  bgilbert
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.9.3
Resolution:             |   Keywords:
      Port:  libdicom   |
------------------------+----------------------
Changes (by ryandesign):

 * status:  new => assigned
 * owner:  (none) => bgilbert


Comment:

 Yes, implicit declaration of functions has been forbidden ever since Xcode
 12.

 What's curious is that we get a successful build on our buildbot machines
 on every OS version when not using the universal variant.

 The functions it's complaining about—`close`, `read`, `lseek`—are defined
 in <unistd.h>. The file in question does include <unistd.h> if it detects
 at configure time that <unistd.h> exists. And therein lies the problem
 because your log shows:

 {{{
 :info:configure Has header "unistd.h" : NO
 }}}

 We need to see the logs from the configuration system that tell us why it
 thinks <unistd.h> doesn't exist when it does. This port uses the meson
 build system so look in the work directory (`port work libdicom`) for a
 meson logfile and attach it to this ticket.

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


More information about the macports-tickets mailing list