[MacPorts] #64355: gcc10 @10.3.0_1: fixincludes math.h missing for Intel hardware on Mac OS X 10.7 Lion

MacPorts noreply at macports.org
Mon Jan 3 23:16:55 UTC 2022


#64355: gcc10 @10.3.0_1: fixincludes math.h missing for Intel hardware on Mac OS X
10.7 Lion
------------------------------+--------------------
 Reporter:  johnrosshunt      |      Owner:  (none)
     Type:  defect            |     Status:  new
 Priority:  Normal            |  Milestone:
Component:  ports             |    Version:  2.7.1
 Keywords:  lion i386 x86_64  |       Port:  gcc10
------------------------------+--------------------
 Programs that include math.h fail to build using gcc10 on Intel hardware.

 {{{
 In file included from /opt/local/include/LegacySupport/math.h:79,
                  from /opt/local/include/libavutil/common.h:36,
                  from /opt/local/include/libavutil/avutil.h:296,
                  from /opt/local/include/libavutil/samplefmt.h:24,
                  from /opt/local/include/libavcodec/avcodec.h:31,
                  from /opt/local/include/libavformat/avformat.h:312,
                  from src/libav.h:26,
                  from src/main.c:70:
 /opt/local/lib/gcc10/gcc/x86_64-apple-darwin11/10.3.0/include-
 fixed/math.h:37:10: fatal error: architecture/i386/math.h: No such file or
 directory
    37 | #include <architecture/i386/math.h>
       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
 compilation terminated.
 }}}

 The header file from above contains the following snippet of code:

 {{{
 #if (defined(__ppc__) || defined(__ppc64__))
 #include <architecture/ppc/math.h>
 #elif (defined (__i386__) || defined( __x86_64__ ))
 #include <architecture/i386/math.h>
 #elif defined(__arm__)
 #include <architecture/arm/math.h>
 #else
 #error Unknown architecture
 #endif
 }}}

 There is a corresponding header file for PPC architecture, but not for
 Intel and ARM.  As a workaround, programs compile fine if you create the
 missing directory and symlink /usr/include/architecture/i386/math.h to
 math.h.  But, headers should probably be generated during the build.  I
 took a peek at gcc11 and it appears the same headers are missing from that
 port as well.

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


More information about the macports-tickets mailing list