Dear Raj,
Thanks for reporting this issue. Are you building the code from the master branch of the source code from GitLab, or building a release version of Nektar++?
Can you also confirm whether you’re building on an Intel or Apple Silicon-based Mac?
It looks like this is caused by clang in Xcode 13 now generating a warning for this deprecated case, where previous clang versions didn’t. The warning is then interpreted as an error via the use of -Werror.
We’ll need to investigate this and look at implementing an update to resolve this issue. As a workaround, I think you may be able to add the “-Wno-deprecated-copy” flag to the compile options so that you can get a working build.
It should be possible to do this by adding the flag to the CMake configuration options for compiler flags. However, there are lots of different options. An easier way may be to edit the cmake/NektarCommon.cmake file in the Nektar++ source tree to set this globally. If you’re using the source code from master, you should see that line 116 of that file is "TARGET_COMPILE_OPTIONS(${name} PRIVATE -Werror)”. Add a new line directly after this one (with the same level of indentation) with the following content:
TARGET_COMPILE_OPTIONS(${name} PRIVATE -Wno-deprecated-copy)
This should add the -Wno-deprecated-copy to the compile options and prevent the warning being triggered. You’ll probably need to clean your build directory and re-run CMake, starting the build from scratch for this to take effect.
I don’t have access to a Mac with Monterey installed to test this but let us know if this resolves the issue for now.
Best wishes,
Jeremy
This
email from khemraj_shukla@brown.edu originates from outside Imperial. Do not click on
links and attachments unless you recognise the sender. If you trust the
sender, add them to your safe senders
list to disable email stamping for this address.
|
Dear All-
I have to add a couple of cpp routines to NeTar++ and I was trying to compile the NekTar++ on my MacOS monterey. I am landing up in the following issue. I am using the Clang compiler. I also switched it to the gcc compiler but in that case the issue was coming from the Boost Library. I tried to compile Boost from source but no luck. Therefore I had to switch to clang and installed it through macport.
I will appreciate your help in this regard.
Thanks!
Raj
/nektar++/library/LibUtilities/SimdLib/scalar.hpp:124:12: error: definition of implicit copy assignment operator for 'scalarT<unsigned long long, void>' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy]
inline scalarT(const scalarT &rhs) = default;
^
_______________________________________________
Nektar-users mailing list
Nektar-users@imperial.ac.ukhttps://mailman.ic.ac.uk/mailman/listinfo/nektar-users