Hi Geoff,

Unfortunately, the binary_function has been removed in recent versions of the 
Clang compiler. As a workaround, you can change `binary_function` in line 48 of 
src/sorting.h to `std::__binary_function`. That fixes the compilation with 
Clang.

Alternatively, you can use gcc-13 from homebrew as a compiler which still works 
without modifying the code.

Cheers,
Oliver


> On 12. Dec 2023, at 20:27, Smith, Geoffrey CIV USN NRL (7233) Washington DC 
> (USA) <geoffrey.sm...@nrl.navy.mil> wrote:
> 
> Hi —
> 
> Sorry if this question is too basic; I did some searching of the mail archive 
> and did not see a solution, but I certainly could have missed it.
> 
> I am trying to build a fresh clone of ARTS 2.4 on a clean, updated, MacBook 
> Pro M2 running 14.1.2.  I am getting an error during make…. I am attempting 
> to include the relevant parts here:
> 
> [ 12%] Building CXX object src/CMakeFiles/matpack.dir/lin_alg.cc.o
> [ 13%] Building CXX object src/CMakeFiles/matpack.dir/logic.cc.o
> In file included from /Users/gbsmith/local/arts/src/logic.cc:38:
> /Users/gbsmith/local/arts/src/sorting.h:48:26: error: no template named 
> 'binary_function'; did you mean '__binary_function'?
> class IndexComp : public binary_function<Index, Index, bool> {
>                        ^~~~~~~~~~~~~~~
>                        __binary_function
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__functional/binary_function.h:49:1:
>  note: '__binary_function' declared here
> using __binary_function = __binary_function_keep_layout_base<_Arg1, _Arg2, 
> _Result>;
> ^
> 1 error generated.
> make[2]: *** [src/CMakeFiles/matpack.dir/logic.cc.o] Error 1
> make[1]: *** [src/CMakeFiles/matpack.dir/all] Error 2
> 
> I am not sure what to try next except move to the development version.  Any 
> advice appreciated; any additional information that might help please just 
> let me know.
> 
> Thanks much,
> 
> Geoff Smith
> Remote Sensing Division
> Naval Research Laboratory
> geoffrey.sm...@nrl.navy.mil
> 
> 




Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to