Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile SAFRAN from source on MacOS #20

Open
stefano-bragaglia opened this issue Feb 29, 2024 · 2 comments
Open

Cannot compile SAFRAN from source on MacOS #20

stefano-bragaglia opened this issue Feb 29, 2024 · 2 comments

Comments

@stefano-bragaglia
Copy link

Our system administrator is preventing us from running unsigned application, so I cannot run the compiled version available here.

I'm trying to compile it from source as described in the original documentation.

I've installed cmake with brew, however the latest version that I have access to is 3.28.3.

>>> make --version
cmake version 3.28.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

I've downloaded and extracted boost 1.76.0 into the project root folder then I've created a build folder, moved into it and run:

>>> cmake ../
    ...
-- Configuring done (19.4s)
-- Generating done (0.6s)
-- Build files have been written to: /Users/stefano/Workspace/2024/SAFRAN/build

No error was reported so I've run:

>>> make 
    ...
/Users/stefano/Workspace/2024/SAFRAN/boost_1_76_0/boost/container_hash/hash.hpp:131:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
        struct hash_base : std::unary_function<T, std::size_t> {};
                           ~~~~~^~~~~~~~~~~~~~
                                __unary_function
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
3 warnings and 1 error generated.
make[2]: *** [CMakeFiles/lsafran.dir/src/ApplicationEngine.cpp.o] Error 1
make[1]: *** [CMakeFiles/lsafran.dir/all] Error 2
make: *** [all] Error 2 

This command unfortunately failed. You suggested to use make (> 9.6.0) but I couldn't find any reference in Google about such version. Can you please share a link where to get such version of the tool?

If the version of cmake I have is ok, should I just update the code as suggested in the make command output? Shall I update the documentation to reflect the patch that must be applied in order to compile SAFRAN?

Thanks in advance for any help, looking forward to try out AnyBURL/SAFRAN!

@matthias-samwald
Copy link
Contributor

@nomisto Could you help?

@nomisto
Copy link
Contributor

nomisto commented Mar 23, 2024

Sorry for the late reply. I'll look into it!

The make (> 9.6.0) is an error, this should be cmake (> 3.9.0) sorry for that. If you have one of the newer versions it should work, 3.9 is quite old.

I have not much experience with MacOS unfortunately and no access to it to test the software and reproduce it.

The weird thing is, that this error is not coming from the SAFRAN code, it is coming from the boost code.

I don't know what XCode is, but here they have a similar issue https://stackoverflow.com/questions/77133361/no-template-named-unary-function-in-namespace-std-did-you-mean-unary-fun .

What you could try is either an older compiler, or using a newer boost package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants