<p>I need to install ESMF-5.2.0rp3 version. I have downloaded it from <a href="https://github.com/esmf-org/esmf/releases/tag/ESMF_5_2_0rp3" rel="nofollow noreferrer">https://github.com/esmf-org/esmf/releases/tag/ESMF_5_2_0rp3</a>. Also I installed the following prerequisites: Fortran95, GCC &amp; C++ 7.5.0, netcdf-bin, libnetcdf-dev, libnetcdff-dev, Open MPI 3.1.1, LAPACK 3.9.0, Perl v5.26.1 and GNU Make 4.1.</p>
<p>Building of ESMF using <code>make all</code> failing and shows the following error in terminal</p>
<pre><code>/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:1798:31: error: no match for ‘operator==’ (operand types are ‘std::fstream {aka std::basic_fstream&lt;char&gt;}’ and ‘long int’)
  if ((fin == NULL)  ||  (fout == NULL))
                               ^

</code></pre>
<p>The output of <code>make all</code> is large so I can't paste it here. Finally the building interrupted by showing the following last lines</p>
<pre><code>/usr/include/c++/7/bits/stl_iterator.h:302:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/rpc/netdb.h:42:0,
                 from /usr/include/netdb.h:32,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:31:
/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:1798:34: note:   ‘std::fstream {aka std::basic_fstream&lt;char&gt;}’ is not derived from ‘const std::reverse_iterator&lt;_Iterator&gt;’
  if ((fin == NULL)  ||  (fout == NULL))
                                  ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/include/ESMCI_Util.h:25,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/include/ESMCI_LogErr.h:34,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/include/ESMCI_Comp.h:33,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/../include/ESMCI_WebServNetEsmfServer.h:23,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:28:
/usr/include/c++/7/bits/stl_pair.h:448:5: note: candidate: template&lt;class _T1, class _T2&gt; constexpr bool std::operator==(const std::pair&lt;_T1, _T2&gt;&amp;, const std::pair&lt;_T1, _T2&gt;&amp;)
     operator==(const pair&lt;_T1, _T2&gt;&amp; __x, const pair&lt;_T1, _T2&gt;&amp; __y)
     ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:448:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/rpc/netdb.h:42:0,
                 from /usr/include/netdb.h:32,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:31:
/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:1798:34: note:   ‘std::fstream {aka std::basic_fstream&lt;char&gt;}’ is not derived from ‘const std::pair&lt;_T1, _T2&gt;’
  if ((fin == NULL)  ||  (fout == NULL))
                                  ^
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2994: recipe for target '/home/user/esmf-ESMF_5_2_0rp3/obj/objO/Linux.gfortran.64.openmpi.default/ESMCI_WebServNetEsmfServer.o' failed
make[8]: *** [/home/user/esmf-ESMF_5_2_0rp3/obj/objO/Linux.gfortran.64.openmpi.default/ESMCI_WebServNetEsmfServer.o] Error 1
make[8]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/mod/modO/Linux.gfortran.64.openmpi.default'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1528: recipe for target 'esmflib' failed
make[7]: *** [esmflib] Error 2
make[7]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/mod/modO/Linux.gfortran.64.openmpi.default'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1524: recipe for target 'tree_lib' failed
make[6]: *** [tree_lib] Error 2
make[6]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[5]: *** [tree] Error 1
make[5]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[4]: *** [tree] Error 1
make[4]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[3]: *** [tree] Error 1
make[3]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[2]: *** [tree] Error 1
make[2]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1501: recipe for target 'build_libs' failed
make[1]: *** [build_libs] Error 2
make[1]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1494: recipe for target 'lib' failed
make: *** [lib] Error 2

</code></pre>
<p>Where is my mistake? Am I missing anything in the building procedure? I have also tried to install ESMF using GCC&amp;G++-8.1.0, but the same error came up. If somebody reccomend a solution for this problem it will be a great help. Thanks in advance.</p>

CC BY-SA 4.0
2021-03-26T07:28:54.080Z
Not a solution, but
(1) Why are you using such an archaic version of a software library that appears to be well-maintained to this very date? The version you are using is from 2012; this is 2021.
(2) Why are you using a nonstandard version of a software library? The `rp3` suffix strongly suggests that this is something you should not be using.
(3) Since that release was made in 2012, are you using an equally archaic version of C++ that is compatible with that archaic release?
(4) Did you thoroughly read the build instructions for that release, including compiler version and compiler flags?
David Hammen
CC BY-SA 4.0
2021-03-26T08:23:23.727Z
@DavidHammen  I am working with a ocean model and in the model document they have mentioned that the model code is tested and verified with ESMF-5.2.0rp3. That's the reason for using this specific version. However, is there any chance to work the model codes with the newer ESMF? What is ```rp3```  and why it is unstable? Now I understand that my issue was due to the C++ version and I'll try installing older C++ version. Thank you very much for the advice.
AKASH
<numerical-modelling><ocean-models>
ESMF installation error "error: no match for ‘operator==’ "
AKASH
# ESMF installation error "error: no match for ‘operator==’ "

(Asked by: username_0 on 2021-03-26)

I need to install ESMF-5.2.0rp3 version. I have downloaded it from <https://github.com/esmf-org/esmf/releases/tag/ESMF_5_2_0rp3>. Also I installed the following prerequisites: Fortran95, GCC & C++ 7.5.0, netcdf-bin, libnetcdf-dev, libnetcdff-dev, Open MPI 3.1.1, LAPACK 3.9.0, Perl v5.26.1 and GNU Make 4.1.

Building of ESMF using `make all` failing and shows the following error in terminal

```
/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:1798:31: error: no match for ‘operator==’ (operand types are ‘std::fstream {aka std::basic_fstream<char>}’ and ‘long int’)
  if ((fin == NULL)  ||  (fout == NULL))
                               ^

```

The output of `make all` is large so I can't paste it here. Finally the building interrupted by showing the following last lines

```
/usr/include/c++/7/bits/stl_iterator.h:302:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/rpc/netdb.h:42:0,
                 from /usr/include/netdb.h:32,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:31:
/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:1798:34: note:   ‘std::fstream {aka std::basic_fstream<char>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
  if ((fin == NULL)  ||  (fout == NULL))
                                  ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/include/ESMCI_Util.h:25,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/include/ESMCI_LogErr.h:34,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/include/ESMCI_Comp.h:33,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/../include/ESMCI_WebServNetEsmfServer.h:23,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:28:
/usr/include/c++/7/bits/stl_pair.h:448:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:448:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/rpc/netdb.h:42:0,
                 from /usr/include/netdb.h:32,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:31:
/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:1798:34: note:   ‘std::fstream {aka std::basic_fstream<char>}’ is not derived from ‘const std::pair<_T1, _T2>’
  if ((fin == NULL)  ||  (fout == NULL))
                                  ^
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2994: recipe for target '/home/user/esmf-ESMF_5_2_0rp3/obj/objO/Linux.gfortran.64.openmpi.default/ESMCI_WebServNetEsmfServer.o' failed
make[8]: *** [/home/user/esmf-ESMF_5_2_0rp3/obj/objO/Linux.gfortran.64.openmpi.default/ESMCI_WebServNetEsmfServer.o] Error 1
make[8]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/mod/modO/Linux.gfortran.64.openmpi.default'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1528: recipe for target 'esmflib' failed
make[7]: *** [esmflib] Error 2
make[7]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/mod/modO/Linux.gfortran.64.openmpi.default'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1524: recipe for target 'tree_lib' failed
make[6]: *** [tree_lib] Error 2
make[6]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[5]: *** [tree] Error 1
make[5]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[4]: *** [tree] Error 1
make[4]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[3]: *** [tree] Error 1
make[3]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[2]: *** [tree] Error 1
make[2]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1501: recipe for target 'build_libs' failed
make[1]: *** [build_libs] Error 2
make[1]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1494: recipe for target 'lib' failed
make: *** [lib] Error 2

```

Where is my mistake? Am I missing anything in the building procedure? I have also tried to install ESMF using GCC&G++-8.1.0, but the same error came up. If somebody reccomend a solution for this problem it will be a great help. Thanks in advance.

**Tags:** numerical-modelling, ocean-models

> **Comments:**
> **username_1**: Not a solution, but (1) Why are you using such an archaic version of a software library that appears to be well-maintained to this very date? The version you are using is from 2012; this is 2021. (2) Why are you using a nonstandard version of a software library? The `rp3` suffix strongly suggests that this is something you should not be using. (3) Since that release was made in 2012, are you using an equally archaic version of C++ that is compatible with that archaic release? (4) Did you thoroughly read the build instructions for that release, including compiler version and compiler flags?  
> **username_0**: @username_1  I am working with a ocean model and in the model document they have mentioned that the model code is tested and verified with ESMF-5.2.0rp3. That's the reason for using this specific version. However, is there any chance to work the model codes with the newer ESMF? What is ```rp3```  and why it is unstable? Now I understand that my issue was due to the C++ version and I'll try installing older C++ version. Thank you very much for the advice.  

---

## 0 answers

