Serenity: macOS: Unable to build latest master "clang: error: unknown argument: '-fconcepts'"

Created on 3 Aug 2020  路  8Comments  路  Source: SerenityOS/serenity

After I pull the latest master, I'm unable to run the make command. I'm getting the following error

[  0%] Building CXX object Meta/Lagom/CMakeFiles/LagomCore.dir/__/__/AK/Base64.cpp.o
clang: error: unknown argument: '-fconcepts'
make[2]: *** [Meta/Lagom/CMakeFiles/LagomCore.dir/__/__/AK/Base64.cpp.o] Error 1
make[1]: *** [Meta/Lagom/CMakeFiles/LagomCore.dir/all] Error 2
make: *** [all] Error 2

I'm using macOS Mojave.

clang version: clang-1001.0.46.4
cmake: 3.17.0

I'm happy to provide any other details, if needed

All 8 comments

Same problem here.

In order to build successfully, I've removed the -fconcepts flag from CMakeLists.txt file, deleted the generated Build folder and I've run again the BuildIt.sh. Not sure if this breaks any feature(s).

Fixed by a619943001b83c227f144beb64122f0a9ba17c23

Issue still persist. Getting below error now.

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/umasankar/serenity/Build
[  0%] Building CXX object Meta/Lagom/CMakeFiles/LagomCore.dir/__/__/AK/Base64.cpp.o
In file included from /Users/umasankar/serenity/AK/Base64.cpp:28:
In file included from /Users/umasankar/serenity/./AK/String.h:31:
In file included from /Users/umasankar/serenity/./AK/Stream.h:29:
/Users/umasankar/serenity/./AK/Concepts.h:36:1: error: expected unqualified-id
concept Integral = IsIntegral<T>::value;
^
/Users/umasankar/serenity/./AK/Concepts.h:39:1: error: expected unqualified-id
concept FloatingPoint = IsFloatingPoint<T>::value;
^
In file included from /Users/umasankar/serenity/AK/Base64.cpp:28:
In file included from /Users/umasankar/serenity/./AK/String.h:31:
/Users/umasankar/serenity/./AK/Stream.h:67:20: error: no type named 'Integral'
      in namespace 'AK::Concepts'
template<Concepts::Integral Integral>
         ~~~~~~~~~~^
/Users/umasankar/serenity/./AK/Stream.h:68:46: error: unknown type name
      'Integral'
InputStream& operator>>(InputStream& stream, Integral& value)
                                             ^
/Users/umasankar/serenity/./AK/Stream.h:75:20: error: no type named
      'FloatingPoint' in namespace 'AK::Concepts'
template<Concepts::FloatingPoint FloatingPoint>
         ~~~~~~~~~~^
/Users/umasankar/serenity/./AK/Stream.h:76:46: error: unknown type name
      'FloatingPoint'
InputStream& operator>>(InputStream& stream, FloatingPoint& value)
                                             ^
6 errors generated.
make[2]: *** [Meta/Lagom/CMakeFiles/LagomCore.dir/__/__/AK/Base64.cpp.o] Error 1
make[1]: *** [Meta/Lagom/CMakeFiles/LagomCore.dir/all] Error 2
make: *** [all] Error 2

I am not sure but I think that might be related to #2901. make/ninja clean, rm -rf Build/Root and try rebuilding.

No luck

I followed https://github.com/SerenityOS/serenity/blob/master/Documentation/BuildInstructions.md#macos-prerequisites
which fixed it for me:

brew install coreutils flock qemu e2fsprogs m4 autoconf libtool automake bash gcc@10

Once you've built the toolchain, navigate to Build/, rm -rf *, then run

cmake .. -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10

@diversys It worked. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MWGuy picture MWGuy  路  4Comments

BenWiederhake picture BenWiederhake  路  8Comments

danboid picture danboid  路  6Comments

nvella picture nvella  路  7Comments

bgianfo picture bgianfo  路  6Comments