Gentoo Archives: gentoo-science

From: grozin@g.o
To: gentoo-science@l.g.o
Subject: [gentoo-science] -std=c++11
Date: Sun, 05 Feb 2017 20:17:49
1 Hello *,
3 Sorry, I'm not a C++ expert, and I need some help. I'm trying to bump
4 sci-mathematics/ginac and some of its revdeps. The current ginac is 1.7.2,
5 and it needs -std=c++11 (or gnu++11). I added append-cxxflags -std=c++11
6 to src_configure; also added src_test which was missing previously. ginac
7 compiles and passes tests, also ginsh works. Fine.
9 The current sci-physics/nestedsums is 1.5.1, it depends on
10 >=sci-mathematics/ginac-1.7 and needs -std=c++11. I've made the necessary
11 changes to the ebuild, it compiles and seems to work (its testsuite is
12 broken, cannot use it). Also fine.
14 Then there's sci-physics/reduze. It is still 2.1, no new versions have
15 appeared. It has to be recompiles after upgrading ginac.
17 If I compile it without -std=c++11, I get a lot of syntax errors in .h
18 files from ginac:
20 /usr/include/ginac/ptr.h:37:13: error: expected ‘;’ at end of member
21 declaration
22 /usr/include/ginac/ptr.h:37:15: error: ‘noexcept’ does not name a type
23 /usr/include/ginac/ptr.h:57:31: error: ‘>>’ should be ‘> >’ within a
24 nested template argument list
25 /usr/include/ginac/ptr.h:124:44: error: expected initializer before
26 ‘noexcept’
28 etc. etc.
30 If I compile it with -std=c++11, I get errors about operators from stdlib:
32 /var/tmp/portage/sci-physics/reduze-2.1/work/reduze-2.1/reduze/files.cpp:726:27:
33 error: no match for ‘operator<<’ (operand types are
34 ‘std::basic_ostream<char>’ and ‘std::ofstream {aka
35 std::basic_ofstream<char>}’)
36 /var/tmp/portage/sci-physics/reduze-2.1/work/reduze-2.1/reduze/functions.h:258:46:
37 error: cannot bind ‘std::basic_ostream<char>’ lvalue to
38 ‘std::basic_ostream<char>&&’
40 etc.
42 Does this mean that in order to compile it stdlib should be recompiled
43 with -std=c++11? Will it break all the other C++ packages in the system?
45 Many thanks in advance,
46 Andrey


Subject Author
Re: [gentoo-science] -std=c++11 David Seifert <soap@g.o>