[MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
--------------------------+----------------------
 Reporter:  Dave-Allured  |      Owner:  tenomoto
     Type:  defect        |     Status:  assigned
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.5.4
 Keywords:                |       Port:  esmf
--------------------------+----------------------
 port -v install esmf +gcc8 fails with multiple C++ errors like this.  I
 shortened several long sequences for readability.  See main.log for the
 full details:

 {{{
 :info:build /Users/dallured/macports/254/bin/g++-mp-8 -c [OPTIONS]
 [INCLUDES] [LONG_PATH]/ESMCI_CoordSys.C
 :info:build In file included from [LONG_PATH]/ESMC_Util.h:23,
 :info:build                  from [LONG_PATH]/ESMCI_Fraction.h:52,
 :info:build                  from [LONG_PATH]/ESMCI_Fraction.C:25:
 :info:build [LONG_PATH]/ESMC_Conf.h:34:9: error: 'size_t' does not name a
 type
 :info:build  typedef size_t ESMCI_FortranStrLenArg;
 :info:build          ^~~~~~
 :info:build [LONG_PATH]/ESMC_Conf.h:34:9:
         note: 'size_t' is defined in header '<cstddef>'; did you forget to
 '#include <cstddef>'?
 :info:build [LONG_PATH]/ESMC_Conf.h:1:1:
 :info:build +#include <cstddef>
 :info:build  #ifdef ESMC_RCS_HEADER
 }}}

 Starting from an empty Macports directory, port -v install esmf installs
 58 ports successfully, then ESMF fails as above.  The default ESMF variant
 seems to install fine for me, and does not get these errors.  Here is my
 configuration:

 {{{
 sw_vers:
 ProductName:    Mac OS X
 ProductVersion: 10.13.6
 BuildVersion:   17G65

 Xcode 10.0
 Build version 10A255
 }}}

 I am installing to a private user directory, not /opt/local. Root
 privileges are disabled.  I ran port selfupdate in advance, of course.

--
Ticket URL: <https://trac.macports.org/ticket/57493>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------
Changes (by Dave-Allured):

 * Attachment "main.log" added.

 main.log from ESMF build failure

--
Ticket URL: <https://trac.macports.org/ticket/57493>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------
Description changed by Dave-Allured:

Old description:

> port -v install esmf +gcc8 fails with multiple C++ errors like this.  I
> shortened several long sequences for readability.  See main.log for the
> full details:
>
> {{{
> :info:build /Users/dallured/macports/254/bin/g++-mp-8 -c [OPTIONS]
> [INCLUDES] [LONG_PATH]/ESMCI_CoordSys.C
> :info:build In file included from [LONG_PATH]/ESMC_Util.h:23,
> :info:build                  from [LONG_PATH]/ESMCI_Fraction.h:52,
> :info:build                  from [LONG_PATH]/ESMCI_Fraction.C:25:
> :info:build [LONG_PATH]/ESMC_Conf.h:34:9: error: 'size_t' does not name a
> type
> :info:build  typedef size_t ESMCI_FortranStrLenArg;
> :info:build          ^~~~~~
> :info:build [LONG_PATH]/ESMC_Conf.h:34:9:
>         note: 'size_t' is defined in header '<cstddef>'; did you forget
> to '#include <cstddef>'?
> :info:build [LONG_PATH]/ESMC_Conf.h:1:1:
> :info:build +#include <cstddef>
> :info:build  #ifdef ESMC_RCS_HEADER
> }}}
>
> Starting from an empty Macports directory, port -v install esmf installs
> 58 ports successfully, then ESMF fails as above.  The default ESMF
> variant seems to install fine for me, and does not get these errors.
> Here is my configuration:
>
> {{{
> sw_vers:
> ProductName:    Mac OS X
> ProductVersion: 10.13.6
> BuildVersion:   17G65
>
> Xcode 10.0
> Build version 10A255
> }}}
>
> I am installing to a private user directory, not /opt/local. Root
> privileges are disabled.  I ran port selfupdate in advance, of course.
New description:

 port -v install esmf +gcc8 fails with multiple C++ errors like this.  I
 shortened several long sequences for readability.  See main.log for the
 full details:

 {{{
 :info:build /Users/dallured/macports/254/bin/g++-mp-8 -c [OPTIONS]
 [INCLUDES] [LONG_PATH]/ESMCI_CoordSys.C
 :info:build In file included from [LONG_PATH]/ESMC_Util.h:23,
 :info:build                  from [LONG_PATH]/ESMCI_Fraction.h:52,
 :info:build                  from [LONG_PATH]/ESMCI_Fraction.C:25:
 :info:build [LONG_PATH]/ESMC_Conf.h:34:9: error: 'size_t' does not name a
 type
 :info:build  typedef size_t ESMCI_FortranStrLenArg;
 :info:build          ^~~~~~
 :info:build [LONG_PATH]/ESMC_Conf.h:34:9:
         note: 'size_t' is defined in header '<cstddef>'; did you forget to
 '#include <cstddef>'?
 :info:build [LONG_PATH]/ESMC_Conf.h:1:1:
 :info:build +#include <cstddef>
 :info:build  #ifdef ESMC_RCS_HEADER
 }}}

 Starting from an empty Macports directory, port -v install esmf +gcc8
 installs 58 ports successfully, then ESMF fails as above.  The default
 ESMF variant seems to install fine for me, and does not get these errors.
 Here is my configuration:

 {{{
 sw_vers:
 ProductName:    Mac OS X
 ProductVersion: 10.13.6
 BuildVersion:   17G65

 Xcode 10.0
 Build version 10A255
 }}}

 I am installing to a private user directory, not /opt/local. Root
 privileges are disabled.  I ran port selfupdate in advance, of course.

--

--
Ticket URL: <https://trac.macports.org/ticket/57493#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------

Comment (by Dave-Allured):

 Possible duplicate: #57582

--
Ticket URL: <https://trac.macports.org/ticket/57493#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------
Changes (by Dave-Allured):

 * Attachment "main.log.esmf-7_1_0r_1.1114a.txt" added.

 The same build failure occurs with esmf @7_1_0r_1 and the upgrade to
 cctools @921_0+llvm70.  New build log is attached.

--
Ticket URL: <https://trac.macports.org/ticket/57493>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------

Comment (by tenomoto):

 +gcc7 also fails. This must be related to removal of /usr/include in
 Mojave. clang probably points headers from SDK. Setting isysroot may help.

--
Ticket URL: <https://trac.macports.org/ticket/57493#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+--------------------------
  Reporter:  Dave-Allured  |      Owner:  Dave-Allured
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+--------------------------
Changes (by Dave-Allured):

 * owner:  tenomoto => Dave-Allured


--
Ticket URL: <https://trac.macports.org/ticket/57493#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------
Changes (by Dave-Allured):

 * owner:  Dave-Allured => tenomoto


Comment:

 I do not need variant esmf +gcc8 any longer.  Gcc8 was made default for
 other ports recently.  This means that some port that depended on esmf
 +gcc8 now builds correctly with its own default variant.  Therefore esmf
 +gcc8 variant is no longer needed to fix that other port.

 It looks like trying to fix esmf +gcc8 will be complicated.  Since this
 variant is no longer needed, please close this ticket with
 resolution:wontfix.  Thanks.

--
Ticket URL: <https://trac.macports.org/ticket/57493#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------

Comment (by Dave-Allured):

 This problem is caused by a missing statement `#include <cstddef>`.
 Nominally it is missing in

--
Ticket URL: <https://trac.macports.org/ticket/57493#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------

Comment (by Dave-Allured):

 The cause of this problem was found.  It is simply a missing `include`
 statement for `cstddef` in `ESMC_Conf.h`.  However, because of the unusual
 use of many customized copies of this file, the missing `include` should
 probably go into a few higher level files, not into `ESMC_Conf.h`
 directly.

 This bug is triggered by all `GCC 8` and higher versions, due to a
 specific test for `GCC` version number in `ESMC_Conf.h`.  This bug can be
 avoided by installing either the port `esmf` default variant, which uses
 `clang`, or else `+gcc7` or earlier variants.

 ESMF developers already fixed this in their own code base.  I am waiting
 for a pubic release to update Macports.  If someone needs a fix sooner,
 please request or submit a patch to the current version.

--
Ticket URL: <https://trac.macports.org/ticket/57493#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------

Comment (by Dave-Allured):

 I said:  "or else `+gcc7` or earlier variants" but this may be in error.
 This would contradict what Takeshi said.  I did not test the `+gcc7`
 variant.  I said this on the basis of the test for specific GCC versions
 in the code in `ESMC_Conf.h`.

--
Ticket URL: <https://trac.macports.org/ticket/57493#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------
Changes (by Dave-Allured):

 * Attachment "ESMC_Conf.h" added.

 Patched config file.  There are many different versions with the same file
 name in ESMF source.  For Macports using +gcc8, this must go to the
 specific location esmf/build_config/Darwin.gfortran.default/ESMC_Conf.h,
 replacing the original file.

--
Ticket URL: <https://trac.macports.org/ticket/57493>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type

macports-4
In reply to this post by macports-4
#57493: esmf @7_1_0r +gcc8: build error: 'size_t' does not name a type
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  tenomoto
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.5.4
Resolution:                |   Keywords:
      Port:  esmf          |
---------------------------+----------------------

Comment (by Dave-Allured):

 ESMF developers said they will not make a maintenance release for this
 problem.  Port maintainer, can you please add a patch for the specific
 `ESMC_Conf.h` file above?  It is a one-line fix.  Thank you.

 Also see the other ESMF fix in #58306.

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