[MacPorts] #62445: hugin-app @2019.2.0_3 fails to build due to implicit declaration

MacPorts noreply at macports.org
Thu Feb 3 16:12:46 UTC 2022


#62445: hugin-app @2019.2.0_3 fails to build due to implicit declaration
------------------------+--------------------------------------
  Reporter:  petrvokac  |      Owner:  MarcusCalhoun-Lopez
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:  catalina bigsur monterey
      Port:  hugin-app  |
------------------------+--------------------------------------

Comment (by bal-agates):

 Sorry for creating duplicate.  I saw this Trac issue but only looked at
 submission text and didn't see it correlated with my problem.

 I agree with assessment of finite() vs isfinite() in
 [https://trac.macports.org/ticket/64593 #64593].  The code in
 hugin-2019.2.0/src/foreign/levmar seems ancient.  Two things help obscure
 this.

 - "man finite" on my macOS 12.2 system does return FINITE(3) referencing
 #include <math.h> and finite().
 - On my system (Xcode 13.2.1) the math.h header file has the following BUT
 it is guarded by `#if defined __i386__ || defined __x86_64__`
 {{{
 /* Legacy BSD API; use the C99 `isfinite( )` macro instead.
 */
 extern int finite(double)
 __API_DEPRECATED("Use `isfinite((double)x)` instead.", macos(10.0, 10.9))
 }}}
 I am using an arm64 system so I saw no deprecation message.  Apparently
 Apple has not gotten around to updating the man pages nor updated the
 guard for arm64.

 I applied patch `patch-compiler.h.diff` (attached) that changes compiler.h
 with
 - added #include <math.h>
 - changed finite to isfinite in two places

 This did allow the project to build on my system and mostly ran but I ran
 into several some new apparently problems with paths.  I will submit
 separate Trac issue for those.

 On a side note I checked the most currently released sources (2021.0) for
 hugin and compiler.h still references finite().

 My question is, what is the right way to change the hugin-app Portfile.
 Should this patch be applied to all MacPort builds with the risk that it
 might not work with some very old macOS or old compiler, letting someone
 else deal with issues it causes on old systems?  Or should some check be
 done on the compiler version and selectively apply the patch for newer
 compilers?  What check?  Or should the project just require C99 (or newer)
 compiler?  It is impossible for me to test on most other macOS or compiler
 versions.  Is there a general philosophy to approaching problems like this
 in MacPorts?

 Another curiosity question is why does the port health at
 [https://ports.macports.org/port/hugin-app/details/] show that the build
 is working for Monterey (x64_64), Big Sur (x64_64),...  Why wouldn't those
 have the same problem I am seeing?  Is it only arm64 systems that have
 finite() removed?  Would all of these other systems have isfinite()?

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


More information about the macports-tickets mailing list