[opensuse-buildservice] Building with gcc8 on Tumbleweed
Greetings. I have a C++ project that I want to build for openSUSE Tumbleweed. I get build errors when using the default GCC 9 and the developers advise me to try using GCC 8 instead. What's the right way of configuring the project to do this? I tried updating my project's metadata as follows: <repository name="openSUSE_Tumbleweed"> [...] <path project="devel:gcc" repository="openSUSE_Factory"/> [...] </repository> And then in my spec file I replaced BuildRequires: gcc-c++ with BuildRequires: gcc8-c++ But this doesn't seem to work. When I do a build, I see that both GCC 8 and GCC 9 get installed. But the build then fails with the following message: checking for the target C++ compiler... not found DEBUG: _cxx: Trying /usr/bin/g++ ERROR: Cannot find the target C++ compiler Generally speaking, is there something else I should be doing to force OBS builds to use GCC 8 instead of whatever Tumbleweed's current version is? Regards, Tristan -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tristan Miller Free Software developer, ferret herder, logologist https://logological.org/ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Thursday 2020-05-07 21:39, Tristan Miller wrote:
And then in my spec file I replaced
BuildRequires: gcc-c++
with
BuildRequires: gcc8-c++
But this doesn't seem to work.
Oh it works. I mean, it does what you _asked_ it to do: have gcc8 installed. You did not ask for gcc8 to be the _default_. This needs %configure CC=gcc-8 CXX=g++-8 cmake -DCMAKE_C_COMPILER=gcc-8 -Dorsomethingsomething ... -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Donnerstag, 7. Mai 2020, 21:39:02 CEST wrote Tristan Miller:
Greetings.
I have a C++ project that I want to build for openSUSE Tumbleweed. I get build errors when using the default GCC 9 and the developers advise me to try using GCC 8 instead. What's the right way of configuring the project to do this?
I tried updating my project's metadata as follows:
<repository name="openSUSE_Tumbleweed"> [...] <path project="devel:gcc" repository="openSUSE_Factory"/> [...] </repository>
And then in my spec file I replaced
BuildRequires: gcc-c++
with
BuildRequires: gcc8-c++
But this doesn't seem to work. When I do a build, I see that both GCC 8 and GCC 9 get installed. But the build then fails with the following message:
checking for the target C++ compiler... not found DEBUG: _cxx: Trying /usr/bin/g++ ERROR: Cannot find the target C++ compiler
Generally speaking, is there something else I should be doing to force OBS builds to use GCC 8 instead of whatever Tumbleweed's current version is?
setting export CXX=g++-8 before most likely. (out of my head, untested) -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Greetings. On Fri, 08 May 2020 07:51:33 +0200, Adrian Schröter <adrian@suse.de> wrote:
setting
export CXX=g++-8
before most likely. (out of my head, untested)
Thanks (also to Jan). Doing something like this was what I needed. (Passing the options to %configure wasn't an option as the project doesn't directly use a configure script, though I was able to do something analogous, and also exported CC and CXX just to be safe.) Regards, Tristan -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tristan Miller Free Software developer, ferret herder, logologist https://logological.org/ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Adrian Schröter
-
Jan Engelhardt
-
Tristan Miller