Open Build Service include gcc-6 compiler

17 views Asked by At

I am using Open Build Service (https://build.opensuse.org/) and I need to include gcc-6 compiler since I am getting the following error in the build:

configure: error: *** A compiler with support for C++14 language features is required.

How can I add a repository for gcc-6 and then configure the yml file to use gcc-6 please?

1

There are 1 answers

1
olh On

Assuming the target is some variant of SUSE Linux, add BuildRequires: gcc-c++ to the rpm spec file. Depending on the target, the default gcc version might be too old to support C++14. In this case use a specific newer version, like BuildRequires: gcc10-c++. In the %build section, add export CXX=/usr/bin/g++-10 before the configure call, to make it aware of the required compiler.

Other than that this question lacks almost all details to give a specific and helpful answer...