Ivan Čukić | 27 Jun 2012 23:28
Picon
Favicon
Gravatar

Compiler version

Hi all,

I've tested the waters some time ago [1] what would people say if we
started asking for more modern compilers. I've stated there I'll start
the discussion on k-c-d once we branch out 4.9, so I'm doing as
promised. The post was only about kactivities, but the same could be
applied to more stuff.

Mainly, the responses were positive (from both users and developers).

Now, my proposal here is to update the required versions for
Frameworks 4 to reflect those of KDE Frameworks 5 / Qt 5. Now, I've
found different information for this - skelly says [2] the requirement
is GCC 4.6 while some other places state it is GCC 4.5, so I'm not
sure whether it was a typing error or not.

The other thing I'd like to discuss is whether we should have the same
requirements for libraries and applications. For example, while I
intend to require at least GCC 4.5 for the kactivities daemon (and
would like to require even 4.6, but will not) I intend to keep the
library compatible with old GCCs.

As an additional argument for raising the bar, here are the GCC
versions in most modern distros (collected by other people, didn't
check):
- Debian - 4.7 (testing)
- openSuse 12.1 - 4.6
- Kubuntu - 4.6
- Fedora 16 - 4.6
- Gentoo - 4.5 (stable)
(Continue reading)

Rolf Eike Beer | 27 Jun 2012 23:39
Picon
Favicon

Re: Compiler version

> Hi all,
>
> I've tested the waters some time ago [1] what would people say if we
> started asking for more modern compilers. I've stated there I'll start
> the discussion on k-c-d once we branch out 4.9, so I'm doing as
> promised. The post was only about kactivities, but the same could be
> applied to more stuff.

That reminds me of a question I always wanted to ask: is there any reason
why we don't use '#pragma once', i.e. is there a supported compiler that
can't handle this?

> Mainly, the responses were positive (from both users and developers).

What is the current minimum requirement?

> As an additional argument for raising the bar, here are the GCC
> versions in most modern distros (collected by other people, didn't
> check):
> - Debian - 4.7 (testing)
> - openSuse 12.1 - 4.6

openSUSE 11.4 - 4.5
openSUSE 12.2 (upcoming) - 4.7

Eike

Ivan Cukic | 27 Jun 2012 23:50
Picon
Favicon
Gravatar

Re: Compiler version


> > Mainly, the responses were positive (from both users and developers).
> 
> What is the current minimum requirement?

Can't find anything similar for the later versions of KDE SC, but for 4.4 it 
is quite a list (even gcc 3.3 [1]):

http://techbase.kde.org/Schedules/KDE4/4.4_Requirements

Cheerio,
Ivan

[1] http://gcc.gnu.org/gcc-3.3/

--

-- 
I don't really trust a sane person.
  -- Lyle Alzado

Martin Gräßlin | 27 Jun 2012 23:41
Picon
Favicon

Re: Compiler version

On Wednesday 27 June 2012 23:28:30 Ivan Čukić wrote:
> Hi all,
> 
> I've tested the waters some time ago [1] what would people say if we
> started asking for more modern compilers. I've stated there I'll start
> the discussion on k-c-d once we branch out 4.9, so I'm doing as
> promised. The post was only about kactivities, but the same could be
> applied to more stuff.
Thanks for bringing up the issue, I actually intended to write a similar mail 
tomorrow to request that applications are allowed to require compilers 
supporting C++11 features.

So +1 for a minimum requirement of gcc 4.6 or clang 3.1

Cheers
Martin
vivo75@gmail.com | 28 Jun 2012 14:38
Picon

Re: Compiler version

Il 27/06/2012 23:41, Martin Gräßlin ha scritto:
> On Wednesday 27 June 2012 23:28:30 Ivan Čukić wrote:
>> Hi all,
>>
>> I've tested the waters some time ago [1] what would people say if we
>> started asking for more modern compilers. I've stated there I'll start
>> the discussion on k-c-d once we branch out 4.9, so I'm doing as
>> promised. The post was only about kactivities, but the same could be
>> applied to more stuff.
> Thanks for bringing up the issue, I actually intended to write a similar mail
> tomorrow to request that applications are allowed to require compilers
> supporting C++11 features.
actually for stability and feature related to c++11 gcc-4.7 is nearly 
the minimum, but in my experience gcc-4.7 is still a bit rough so +1 for 
gcc-4.6
>
>
> So +1 for a minimum requirement of gcc 4.6 or clang 3.1
>

diff between
http://gcc.gnu.org/gcc-4.6/cxx0x_status.html
and
http://gcc.gnu.org/gcc-4.7/cxx0x_status.html

--- cxx0x-gcc-46.txt    2012-06-28 14:33:15.058728078 +0200
+++ cxx0x-gcc-47.txt    2012-06-28 14:33:16.198733511 +0200
 <at>  <at>  -1,27 +1,27  <at>  <at> 
-           Status of Experimental C++0x Support in GCC 4.6
+           Status of Experimental C++11 Support in GCC 4.7
(Continue reading)

Thiago Macieira | 28 Jun 2012 16:31
Picon
Favicon

Re: Compiler version

On quinta-feira, 28 de junho de 2012 14.38.37, vivo75 <at> gmail.com wrote:
> actually for stability and feature related to c++11 gcc-4.7 is nearly 
> the minimum, but in my experience gcc-4.7 is still a bit rough so +1 for 
> gcc-4.6

That's nonsense. C++11 support in GCC 4.5 and 4.6 is just fine.

--

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
vivo75@gmail.com | 28 Jun 2012 18:53
Picon

Re: Compiler version

Il 28/06/2012 16:31, Thiago Macieira ha scritto:
> On quinta-feira, 28 de junho de 2012 14.38.37, vivo75 <at> gmail.com wrote:
>> actually for stability and feature related to c++11 gcc-4.7 is nearly
>> the minimum, but in my experience gcc-4.7 is still a bit rough so +1 for
>> gcc-4.6
> That's nonsense. C++11 support in GCC 4.5 and 4.6 is just fine.
>

Thiago you work to qt5 which include the c++11 stuff, so probably you 
know better than rumors around, must admit that I've spoken by those 
rather than an extended experience in the field.

What made me think the rumors were true is:
a) many programs which support to be compiled with c++11 syntax require 
gcc-4.7
b) that the resolved/fixed bug list is rather long:

A search for resolved/fixed bugs with 'C++0x' or 'C++11' in the summary
580 bugs found [1]

the same search with gcc-4.7.{0,1,2} as "known to fail" is much shorter:
22 bugs found [2]

feature wise instead the increment in 4.7 seem to be short (there was a 
diff in the first mail):

Non-static data member
New wording for C++11 lambdas
Template aliases
Delegating constructors
(Continue reading)

Thiago Macieira | 28 Jun 2012 21:20
Picon
Favicon

Re: Compiler version

On quinta-feira, 28 de junho de 2012 18.53.03, vivo75 <at> gmail.com wrote:
> Il 28/06/2012 16:31, Thiago Macieira ha scritto:
> > On quinta-feira, 28 de junho de 2012 14.38.37, vivo75 <at> gmail.com wrote:
> >> actually for stability and feature related to c++11 gcc-4.7 is nearly
> >> the minimum, but in my experience gcc-4.7 is still a bit rough so +1 for
> >> gcc-4.6
> > 
> > That's nonsense. C++11 support in GCC 4.5 and 4.6 is just fine.
> 
> Thiago you work to qt5 which include the c++11 stuff, so probably you
> know better than rumors around, must admit that I've spoken by those
> rather than an extended experience in the field.

We may not be talking about the same thing.

> What made me think the rumors were true is:
> a) many programs which support to be compiled with c++11 syntax require
> gcc-4.7

It depends on which C++11 feature you're using. Qt has an #define for each of 
them so you can know if the compiler supports such a feature.

Qt does not require C++11 and will not for many years. What's more, any 
program requiring full and unrestricted C++11 support will be extremely niche 
and not very popular until at least 2014. For those of us living in the real 
world, we have to accept that C++11 support is limited and therefore limit 
what we use of it.

That being the case, GCC 4.5 and 4.6 are more than enough.

(Continue reading)

Scott Kitterman | 28 Jun 2012 21:34

Re: Compiler version

On Thursday, June 28, 2012 09:20:54 PM Thiago Macieira wrote:
> On quinta-feira, 28 de junho de 2012 18.53.03, vivo75 <at> gmail.com wrote:
> > Il 28/06/2012 16:31, Thiago Macieira ha scritto:
> > > On quinta-feira, 28 de junho de 2012 14.38.37, vivo75 <at> gmail.com wrote:
> > >> actually for stability and feature related to c++11 gcc-4.7 is nearly
> > >> the minimum, but in my experience gcc-4.7 is still a bit rough so +1
> > >> for
> > >> gcc-4.6
> > > 
> > > That's nonsense. C++11 support in GCC 4.5 and 4.6 is just fine.
> > 
> > Thiago you work to qt5 which include the c++11 stuff, so probably you
> > know better than rumors around, must admit that I've spoken by those
> > rather than an extended experience in the field.
> 
> We may not be talking about the same thing.
> 
> > What made me think the rumors were true is:
> > a) many programs which support to be compiled with c++11 syntax require
> > gcc-4.7
> 
> It depends on which C++11 feature you're using. Qt has an #define for each
> of them so you can know if the compiler supports such a feature.
> 
> Qt does not require C++11 and will not for many years. What's more, any
> program requiring full and unrestricted C++11 support will be extremely
> niche and not very popular until at least 2014. For those of us living in
> the real world, we have to accept that C++11 support is limited and
> therefore limit what we use of it.
> 
(Continue reading)

Thiago Macieira | 28 Jun 2012 22:01
Picon
Favicon

Re: Compiler version

On quinta-feira, 28 de junho de 2012 15.34.31, Scott Kitterman wrote:
> It's probably worth mentioning that there are issues in GCC 4.7 with mixing 
> C++98 and C++11 code on one system.  Here's the best discussion of it I
> could find:
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646
> 
> I don't pretend to understand all that, so I'm unlikely to be a good source
> of  further answers, but this isn't just theoretical.  There are some
> projects in Ubuntu that were making a lot of use of C++11 features and they
> stepped all over this once Ubuntu moved to GCC 4.7 (which is standard in
> the current development release).
> 
> Scott K

We don't care. Qt code does not use the Standard Library for anything.

During the discussion last year, we were almost about to permit it again. But 
I guess that we'll have to keep the ban on it for another 5 years now.

--

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
Alexander Neundorf | 30 Jun 2012 17:02
Picon
Favicon

Re: Compiler version

On Thursday, 28. June 2012 14:38:37 vivo75 <at> gmail.com wrote:
> Il 27/06/2012 23:41, Martin Gräßlin ha scritto:
> > On Wednesday 27 June 2012 23:28:30 Ivan Čukić wrote:
> >> Hi all,
> >> 
> >> I've tested the waters some time ago [1] what would people say if we
> >> started asking for more modern compilers. I've stated there I'll start
> >> the discussion on k-c-d once we branch out 4.9, so I'm doing as
> >> promised. The post was only about kactivities, but the same could be
> >> applied to more stuff.
> > 
> > Thanks for bringing up the issue, I actually intended to write a similar
> > mail tomorrow to request that applications are allowed to require
> > compilers supporting C++11 features.
> 
> actually for stability and feature related to c++11 gcc-4.7 is nearly
> the minimum, but in my experience gcc-4.7 is still a bit rough so +1 for
> gcc-4.6
> 
> > So +1 for a minimum requirement of gcc 4.6 or clang 3.1

-1 from me.
Latest Slackware release has 4.5, and I would very much prefer if this stays 
working.

I don't see the features mentioned worth dropping platforms.

Alex

(Continue reading)

Heinz Wiesinger | 30 Jun 2012 17:31
Picon

Re: Compiler version

On Saturday 30 June 2012 17:02:27 Alexander Neundorf wrote:
> On Thursday, 28. June 2012 14:38:37 vivo75 <at> gmail.com wrote:
> > Il 27/06/2012 23:41, Martin Gräßlin ha scritto:
> > > On Wednesday 27 June 2012 23:28:30 Ivan Čukić wrote:
> > >> Hi all,
> > >> 
> > >> I've tested the waters some time ago [1] what would people say if we
> > >> started asking for more modern compilers. I've stated there I'll start
> > >> the discussion on k-c-d once we branch out 4.9, so I'm doing as
> > >> promised. The post was only about kactivities, but the same could be
> > >> applied to more stuff.
> > > 
> > > Thanks for bringing up the issue, I actually intended to write a similar
> > > mail tomorrow to request that applications are allowed to require
> > > compilers supporting C++11 features.
> > 
> > actually for stability and feature related to c++11 gcc-4.7 is nearly
> > the minimum, but in my experience gcc-4.7 is still a bit rough so +1 for
> > gcc-4.6
> > 
> > > So +1 for a minimum requirement of gcc 4.6 or clang 3.1
> 
> -1 from me.
> Latest Slackware release has 4.5, and I would very much prefer if this stays
> working.
> 
> I don't see the features mentioned worth dropping platforms.

Next Slackware will come with 4.7 (and clang 3.0) so raising the bar for 
future kde releases shouldn't be a problem there IMHO (based on the fact that 
(Continue reading)

Martin Gräßlin | 1 Jul 2012 13:09
Picon
Favicon

Re: Compiler version

Am 30.06.2012 17:31, schrieb Heinz Wiesinger:
> However, the point of dropping platforms in general remains, I 
> suppose.
 From what I understood the compilers are available in FreeBSD and I 
think there was no other system having problems with it.

Regards
Martin Gräßlin

Andrius da Costa Ribas | 1 Jul 2012 14:40
Picon
Gravatar

Re: Compiler version

Windows emerge tool currently uses gcc 4.6.4 for 64-bit and either gcc 4.7 or msvc 2010 for 32-bit, so for gcc builds there should be no problem, I'm not sure about msvc.


--
Andrius.

2012/7/1 Martin Gräßlin <mgraesslin <at> kde.org>
Am 30.06.2012 17:31, schrieb Heinz Wiesinger:

However, the point of dropping platforms in general remains, I suppose.
From what I understood the compilers are available in FreeBSD and I think there was no other system having problems with it.

Regards
Martin Gräßlin




Antonis Tsiapaliokas | 30 Jun 2012 19:20
Picon

Re: Compiler version

-1 from me.
Latest Slackware release has 4.5, and I would very much prefer if this stays
working.

I don't see the features mentioned worth dropping platforms.

Alex


Yes, but the slackware-current is coming with gcc-4.7....
Alexander Neundorf | 1 Jul 2012 11:34
Picon
Favicon

Re: Compiler version

On Saturday, 30. June 2012 19:20:07 Antonis Tsiapaliokas wrote:
> > -1 from me.
> > Latest Slackware release has 4.5, and I would very much prefer if this
> > stays
> > working.
> > 
> > I don't see the features mentioned worth dropping platforms.
> > 
> > Alex
> 
> Yes, but the slackware-current is coming with gcc-4.7....

..which is not yet released, so I do not really care.
Please let's not require a compiler version which is not yet in already 
released versions of the distributions, released for let's say at least one 
month.

After our IMO medium smooth switch to git, let's not break building KDE 
already again

Alex

Ivan Čukić | 1 Jul 2012 23:08
Picon
Favicon
Gravatar

Re: Compiler version

So, in essence, the summary of the thread so far:

- libs still need to be compilable by old compilers until we get
Qt5/KF5 (afterwards, the requirement will be that of Qt itself)
- apps that don't target Mac, can depend on gcc-4.5-equivalent
compilers, as present in all stable releases of important distros
- 4.6 is desired for the features, but problematic since not all
current stable versions of distros sport this version (last to fall
into line - Slackware)

So, which are the new features in 4.6?
- Null pointer constant 	N2431
- Forward declarations for enums 	N2764
- Generalized constant expressions 	N2235
- Unrestricted unions 	N2544
- Range-based for 	N2930

From my point of view, nullptr and range-for are the important ones.

> Please let's not require a compiler version which is not yet in already
> released versions of the distributions, released for let's say at least one
> month.

While KDE SC 4.10 doesn't target the current releases, I do see the
reasoning behind the idea to use the compilers available now in stable
distributions (obviously with the exception of Debian).

So, I'd be content in using 4.5 for the time being simply because the
two features I find important in 4.6 can be /simulated/ in 4.5.

--

-- 
Cheerio,
Ivan

--
While you were hanging yourself on someone else's words
Dying to believe in what you heard
I was staring straight into the shining sun

Scott Kitterman | 2 Jul 2012 01:21

Re: Compiler version

On Sunday, July 01, 2012 11:08:43 PM Ivan Čukić wrote:
...
> - 4.6 is desired for the features, but problematic since not all
> current stable versions of distros sport this version (last to fall
> into line - Slackware)
...
Debian Stable (Squeeze) is also 4.5 by default.  The next version (Wheezy) 
will be gcc 4.7 by default.

Scott K

Pino Toscano | 2 Jul 2012 01:32
X-Face
Picon
Favicon

Re: Compiler version

Alle lunedì 2 luglio 2012, Scott Kitterman ha scritto:
> On Sunday, July 01, 2012 11:08:43 PM Ivan Čukić wrote:
> ...
> 
> > - 4.6 is desired for the features, but problematic since not all
> > current stable versions of distros sport this version (last to fall
> > into line - Slackware)
> 
> ...
> Debian Stable (Squeeze) is also 4.5 by default.

Debian Stable (Squeeze) is 4.4.5 by default, with GCC 4.3.5 being 
provided too.

--

-- 
Pino Toscano
Ivan Cukic | 2 Jul 2012 10:09
Picon
Favicon
Gravatar

Re: Compiler version


> > Debian Stable (Squeeze) is also 4.5 by default.
> 
> Debian Stable (Squeeze) is 4.4.5 by default, with GCC 4.3.5 being
> provided too.

Yes, that is the reason I excluded Debian from the distros to watch in this 
case.

Debian stable will not ship 4.10 in any form, and from my experience, people 
who use debian on the desktop, and care about having latest kde packages, use 
testing or sid. (myself included)

Cheerio

--

-- 
I don't really trust a sane person.
  -- Lyle Alzado

Martin Gräßlin | 2 Jul 2012 08:52
Picon
Favicon

Re: Compiler version

Am 01.07.2012 23:08, schrieb Ivan Čukić:
> So, I'd be content in using 4.5 for the time being simply because the
> two features I find important in 4.6 can be /simulated/ in 4.5.
I think that sounds like a good compromise, so +1

For 4.11 we can then re-evaluate whether it makes sense/is possible to 
update to gcc 4.6.

Cheers
Martin Gräßlin

Raphael Kubo da Costa | 27 Jun 2012 23:49
Picon
Favicon

Re: Compiler version

Ivan Čukić <ivan.cukic <at> kde.org> writes:

> Now, my proposal here is to update the required versions for
> Frameworks 4 to reflect those of KDE Frameworks 5 / Qt 5. Now, I've
> found different information for this - skelly says [2] the requirement
> is GCC 4.6 while some other places state it is GCC 4.5, so I'm not
> sure whether it was a typing error or not.

The most up-to-date discussion I can find about defining a lowest common
denominator is [1].

In short, if I understand it correctly we (as well as Qt) are still
supposed to support Apple with gcc 4.2.1. This also happens to help the
situation on FreeBSD, where the default compiler is also gcc 4.2.1 +
patches (the latest GPLv2 release), even though it is possible to
require a more recent version from its ports system.

Apple (as well as FreeBSD) seems to be moving towards clang, however I
do not know if they have made it their default compiler in some release
of theirs.

> - FreeBSD 10 - Clang 3.1 (*very* modern)

FreeBSD 10 is the development version, and even there clang is not the
default compiler yet. For the foreseeable future we're still having gcc
4.2.1 used by default, but, as I said, we could require another version
even if a few users complain (I'd prefer if the requirements for KDE 4
were not changed, though).

[1] http://article.gmane.org/gmane.comp.kde.devel.buildsystem/7133

Ben Cooksley | 28 Jun 2012 00:05
Picon
Favicon

Re: Compiler version

On Thu, Jun 28, 2012 at 9:49 AM, Raphael Kubo da Costa
<rakuco <at> freebsd.org> wrote:
> Ivan Čukić <ivan.cukic <at> kde.org> writes:
>
>> Now, my proposal here is to update the required versions for
>> Frameworks 4 to reflect those of KDE Frameworks 5 / Qt 5. Now, I've
>> found different information for this - skelly says [2] the requirement
>> is GCC 4.6 while some other places state it is GCC 4.5, so I'm not
>> sure whether it was a typing error or not.
>
> The most up-to-date discussion I can find about defining a lowest common
> denominator is [1].
>
> In short, if I understand it correctly we (as well as Qt) are still
> supposed to support Apple with gcc 4.2.1. This also happens to help the
> situation on FreeBSD, where the default compiler is also gcc 4.2.1 +
> patches (the latest GPLv2 release), even though it is possible to
> require a more recent version from its ports system.

Debian Squeeze has gcc 4.4.5, and this is the base of build.kde.org.
It would be appreciated if we did not have to run Debian Testing on
the build slaves.

>
> Apple (as well as FreeBSD) seems to be moving towards clang, however I
> do not know if they have made it their default compiler in some release
> of theirs.
>
>> - FreeBSD 10 - Clang 3.1 (*very* modern)
>
> FreeBSD 10 is the development version, and even there clang is not the
> default compiler yet. For the foreseeable future we're still having gcc
> 4.2.1 used by default, but, as I said, we could require another version
> even if a few users complain (I'd prefer if the requirements for KDE 4
> were not changed, though).
>
> [1] http://article.gmane.org/gmane.comp.kde.devel.buildsystem/7133

Regards,
Ben

Ivan Cukic | 28 Jun 2012 00:55
Picon
Favicon
Gravatar

Re: Compiler version

From Ben Cooksley:
> Debian Squeeze has gcc 4.4.5, and this is the base of build.kde.org.
> It would be appreciated if we did not have to run Debian Testing on
> the build slaves.

Honestly, while having Jenkins around is quite neat, I don't see a helper tool 
as a valid reason to make the development more difficult.

Anyhow, guessing that we will not agree about raising the requirement for the 
libraries, not for the forseable future, and that is more or less fine for me. 
Libraries are always a special case.

The second are applications. To quote Martin:

> Thanks for bringing up the issue, I actually intended to write a similar
> mail tomorrow to request that applications are allowed to require compilers
> supporting C++11 features.

IMO, application developers should choose which range of systems they want to 
target. For example, for core things that should run (kded, kwallet, etc.???) 
on Lin/Win/Mac, ok, the requirement can't be above 4.2.

For applications that are not essential to the rest of the environment to 
function properly, this shouldn't be the case. If KSomeApp developers decide 
they don't care about Mac, they shouldn't be under the above restrictions.

Workspace applications (kwin, activity manager, and more) are not meant for 
/strange/ platforms like windows/mac, so they should belong to the later 
category.

So, in a nutshell, the more important for other components something is, the 
lower should be the required gcc version.

Cheerio,
Ivan

--

-- 
Money can't buy happiness, but neither can poverty.
  -- Leo Rosten

Ben Cooksley | 28 Jun 2012 01:02
Picon
Favicon

Re: Compiler version

On Thu, Jun 28, 2012 at 10:55 AM, Ivan Cukic <ivan.cukic <at> kde.org> wrote:
> From Ben Cooksley:
>> Debian Squeeze has gcc 4.4.5, and this is the base of build.kde.org.
>> It would be appreciated if we did not have to run Debian Testing on
>> the build slaves.
>
> Honestly, while having Jenkins around is quite neat, I don't see a helper tool
> as a valid reason to make the development more difficult.

I was simply requesting that the dependency is not raised
unnecessarily (lambdas seem to definitely be desirable).
I understand however that 4.4.5 is indeed quite old and that a
different underlying base may be needed however to be able to build
some components of KDE.

>
> Anyhow, guessing that we will not agree about raising the requirement for the
> libraries, not for the forseable future, and that is more or less fine for me.
> Libraries are always a special case.
>
> The second are applications. To quote Martin:
>
>> Thanks for bringing up the issue, I actually intended to write a similar
>> mail tomorrow to request that applications are allowed to require compilers
>> supporting C++11 features.
>
> IMO, application developers should choose which range of systems they want to
> target. For example, for core things that should run (kded, kwallet, etc.???)
> on Lin/Win/Mac, ok, the requirement can't be above 4.2.
>
> For applications that are not essential to the rest of the environment to
> function properly, this shouldn't be the case. If KSomeApp developers decide
> they don't care about Mac, they shouldn't be under the above restrictions.
>
> Workspace applications (kwin, activity manager, and more) are not meant for
> /strange/ platforms like windows/mac, so they should belong to the later
> category.
>
> So, in a nutshell, the more important for other components something is, the
> lower should be the required gcc version.
>
> Cheerio,
> Ivan
>
>
> --
> Money can't buy happiness, but neither can poverty.
>  -- Leo Rosten
>

Regards,
Ben

Martin Gräßlin | 28 Jun 2012 09:42
Picon
Favicon

Re: Re: Compiler version

On Thursday 28 June 2012 00:55:15 Ivan Cukic wrote:
> Workspace applications (kwin, activity manager, and more) are not meant for
> /strange/ platforms like windows/mac, so they should belong to the later
> category.
What about freebsd? Personally I am not willing to support that platform 
anymore if it would mean that we have to restrict ourself to an outdated gcc 
version. Reasons why in general I would find it acceptable to drop support for 
non-linux in KWin are outlined in a recent discussion on plasma mailing list 
[1].

 <at> Raphael any idea about that?

Cheers
Martin Gräßlin

[1] http://mail.kde.org/pipermail/plasma-devel/2012-June/019955.html
Raphael Kubo da Costa | 28 Jun 2012 18:37
Picon
Favicon

Re: Compiler version

Martin Gräßlin <mgraesslin <at> kde.org> writes:

> What about freebsd? Personally I am not willing to support that platform
> anymore if it would mean that we have to restrict ourself to an outdated gcc
> version. Reasons why in general I would find it acceptable to drop support for
> non-linux in KWin are outlined in a recent discussion on plasma mailing list
> [1].
>
>  <at> Raphael any idea about that?

In the future, the idea is to use clang instead of gcc by default, but I
wouldn't count on that for this decision: there's still work to do, and
even when a new FreeBSD comes out with clang as the default compiler
we'll still have to support a few older releases with gcc 4.2 anyway.

That said, it wouldn't really be a problem if a newer gcc was required;
we do have many different gcc release series in the ports system
(including 4.7.x and 4.8 snapshots) and in the end users will simply
have to use them to build KDE instead.

As for the Plasma post, there's ongoing work towards having recent X.org
releases, as well as improving support for KMS and things like that
(AFAICT the NVidia binary blog probably already works fine, and I am
using KMS with an Intel graphics card myself with Mesa 7.11.2, with
updates on the way). The KMS code might not apply to all supported
FreeBSD versions, but this is something that will be automatically
solved with time -- other than that, I don't really know what difference
it all would make for KWin and workspace in general (I'm not subscribed
to plasma-devel, but I can do that or you guys can CC me if you prefer
to continue this part of the discussion elsewhere).

Alexander Neundorf | 27 Jun 2012 23:52
Picon
Favicon

Re: Compiler version

On Wednesday 27 June 2012, Ivan Čukić wrote:

> Hi all,

...

> As an additional argument for raising the bar, here are the GCC

> versions in most modern distros (collected by other people, didn't

> check):

> - Debian - 4.7 (testing)

> - openSuse 12.1 - 4.6

> - Kubuntu - 4.6

> - Fedora 16 - 4.6

> - Gentoo - 4.5 (stable)

> - FreeBSD 10 - Clang 3.1 (*very* modern)

Slackware 13.37: gcc 4.5.2

Alex

Thomas Lübking | 28 Jun 2012 00:03
Picon

Re: Compiler version

Am 27.06.2012, 23:52 Uhr, schrieb Alexander Neundorf <neundorf <at> kde.org>:

> On Wednesday 27 June 2012, Ivan Čukić wrote:
>> Hi all,
> ...
>> As an additional argument for raising the bar, here are the GCC
>> versions in most modern distros (collected by other people, didn't
>> check):
>> - Debian - 4.7 (testing)
>> - openSuse 12.1 - 4.6
>> - Kubuntu - 4.6
>> - Fedora 16 - 4.6
>> - Gentoo - 4.5 (stable)
>> - FreeBSD 10 - Clang 3.1 (*very* modern)
>
> Slackware 13.37: gcc 4.5.2

- Arch: 4.7.1 / Clang 3.1 - 4.6 is still available

Cheers,
Thomas

Albert Astals Cid | 27 Jun 2012 23:55
Picon
Favicon
Gravatar

Re: Compiler version

El Dimecres, 27 de juny de 2012, a les 23:28:30, Ivan Čukić va escriure:
> Hi all,

Hi

> 
> I've tested the waters some time ago [1] what would people say if we
> started asking for more modern compilers. 

Can you explain why you need a more modern version, I see a good analysis of 
what the current situation regarding compiler availability but i fail to see 
why we need a newer compiler.

Cheers,
  Albert

> I've stated there I'll start
> the discussion on k-c-d once we branch out 4.9, so I'm doing as
> promised. The post was only about kactivities, but the same could be
> applied to more stuff.
> 
> Mainly, the responses were positive (from both users and developers).
> 
> Now, my proposal here is to update the required versions for
> Frameworks 4 to reflect those of KDE Frameworks 5 / Qt 5. Now, I've
> found different information for this - skelly says [2] the requirement
> is GCC 4.6 while some other places state it is GCC 4.5, so I'm not
> sure whether it was a typing error or not.
> 
> 
> The other thing I'd like to discuss is whether we should have the same
> requirements for libraries and applications. For example, while I
> intend to require at least GCC 4.5 for the kactivities daemon (and
> would like to require even 4.6, but will not) I intend to keep the
> library compatible with old GCCs.
> 
> As an additional argument for raising the bar, here are the GCC
> versions in most modern distros (collected by other people, didn't
> check):
> - Debian - 4.7 (testing)
> - openSuse 12.1 - 4.6
> - Kubuntu - 4.6
> - Fedora 16 - 4.6
> - Gentoo - 4.5 (stable)
> - FreeBSD 10 - Clang 3.1 (*very* modern)

Ivan Cukic | 28 Jun 2012 00:27
Picon
Favicon
Gravatar

Re: Compiler version


> Can you explain why you need a more modern version, I see a good analysis of
> what the current situation regarding compiler availability but i fail to
> see why we need a newer compiler.

For me, the main reasons for this request are:
- lambdas (gcc 4.5)
- variadic templates (4.3 / 4.4)
- auto (4.4)
- nullptr (4.6)
- =default, =delete (4.4)
- explicit override (4.7)
- unique/shared_ptr (?? works in 4.5)

nullptr and override are really useful while developing, even as enabled-if-
possible - so I can live without hard-requiring them (macro-based switch), but 
lambdas are not so easily replaceable while making the life much easier and a 
lot of methods shorter :)

Cheerio,
Ivan

--

-- 
Acting is merely the art of keeping a large group of people from coughing.
  -- Sir Ralph Richardson

Martin Gräßlin | 28 Jun 2012 09:37
Picon
Favicon

Re: Re: Compiler version

On Thursday 28 June 2012 00:27:08 Ivan Cukic wrote:
> > Can you explain why you need a more modern version, I see a good analysis
> > of what the current situation regarding compiler availability but i fail
> > to see why we need a newer compiler.
> 
> For me, the main reasons for this request are:
> - lambdas (gcc 4.5)
> - variadic templates (4.3 / 4.4)
> - auto (4.4)
> - nullptr (4.6)
> - =default, =delete (4.4)
> - explicit override (4.7)
> - unique/shared_ptr (?? works in 4.5)
> 
> nullptr and override are really useful while developing, even as enabled-if-
> possible - so I can live without hard-requiring them (macro-based switch),
> but lambdas are not so easily replaceable while making the life much easier
> and a lot of methods shorter :)
how would nullptr be useful with a macro-based switch? I actually want to do a 
sed s/NULL/nullptr/g on the complete code base. And I hope everyone can 
understand that :-)

Other features I really want to make use of is auto and lambdas. I think both 
will help to increase the readability and maintainability of the code base.

Cheers
Martin
Ivan Cukic | 28 Jun 2012 10:14
Picon
Favicon
Gravatar

Re: Compiler version


> how would nullptr be useful with a macro-based switch? I actually want to do
> a sed s/NULL/nullptr/g on the complete code base. And I hope everyone can
> understand that :-)

Well, nullptr is a compile time check, right (like explicit override)? So, you 
compile your code with a compiler that supports it, making your code safe in 
that aspect, while someone could still compile the code with an older 
compiler.

It doesn't help in the cases where there is an ambigous resolution int vs ptr, 
but it can be done if needed. [1]

> What about freebsd? Personally I am not willing to support that platform 
> anymore if it would mean that we have to restrict ourself to an outdated gcc 

They are moving towards clang 3.1 for FreeBSD 10. So, I don't see them as a 
problem in this case - they should become compliant in the version that will 
ship 4.10.

http://lists.freebsd.org/pipermail/freebsd-stable/2012-May/067486.html

Cheerio,
Ivan

[1] http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/nullptr

--

-- 
While you were hanging yourself on someone else's words
Dying to believe in what you heard
I was staring straight into the shining sun

Thiago Macieira | 28 Jun 2012 10:20
Picon
Favicon

Re: Compiler version

On quinta-feira, 28 de junho de 2012 10.14.03, Ivan Cukic wrote:
> Well, nullptr is a compile time check, right (like explicit override)? So,
> you  compile your code with a compiler that supports it, making your code
> safe in that aspect, while someone could still compile the code with an
> older compiler.

Qt 5 has Q_NULLPTR that expands to nullptr on C++11 and 0 otherwise.
--

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
Rolf Eike Beer | 28 Jun 2012 18:09
Picon
Favicon

Re: Compiler version

Am Donnerstag, 28. Juni 2012, 10:20:42 schrieb Thiago Macieira:
> On quinta-feira, 28 de junho de 2012 10.14.03, Ivan Cukic wrote:
> > Well, nullptr is a compile time check, right (like explicit override)? So,
> > you  compile your code with a compiler that supports it, making your code
> > safe in that aspect, while someone could still compile the code with an
> > older compiler.
> 
> Qt 5 has Q_NULLPTR that expands to nullptr on C++11 and 0 otherwise.

Is there any chance that these macros will find their way into Qt4? I don't 
mean that they should be used by Qt itself everywhere (or at all), but 
providing them would allow an easy forward-compatible way of introducing this 
stuff. That may not really help for KDE (or we need to require 4.8.3 or need to 
ship them ourself) but for other stuff out there this would be an improvement 
that you basically get for free.

Eike
Tomaz Canabrava | 28 Jun 2012 18:37
Picon
Favicon

Re: Compiler version

On Thu, Jun 28, 2012 at 1:09 PM, Rolf Eike Beer
<kde <at> opensource.sf-tec.de> wrote:
> Am Donnerstag, 28. Juni 2012, 10:20:42 schrieb Thiago Macieira:
>> On quinta-feira, 28 de junho de 2012 10.14.03, Ivan Cukic wrote:
>> > Well, nullptr is a compile time check, right (like explicit override)? So,
>> > you  compile your code with a compiler that supports it, making your code
>> > safe in that aspect, while someone could still compile the code with an
>> > older compiler.
>>
>> Qt 5 has Q_NULLPTR that expands to nullptr on C++11 and 0 otherwise.
>
> Is there any chance that these macros will find their way into Qt4? I don't
> mean that they should be used by Qt itself everywhere (or at all), but
> providing them would allow an easy forward-compatible way of introducing this
> stuff. That may not really help for KDE (or we need to require 4.8.3 or need to
> ship them ourself) but for other stuff out there this would be an improvement
> that you basically get for free.
>
> Eike

That'd be hard, since there's no Qt 4.9 planned, but a simple macro
that won't break stuff can be made on KDE api to define Q_NULLPTR (
implications? ) when it's doesn't exists.
Thiago, on C++ 0 and (void*) 0 are the same thing? I know that on C
they aren't, and I didn't found the information easily on the web.

Tomaz

Thiago Macieira | 28 Jun 2012 18:50
Picon
Favicon

Re: Compiler version

On quinta-feira, 28 de junho de 2012 13.37.14, Tomaz Canabrava wrote:
> Thiago, on C++ 0 and (void*) 0 are the same thing? I know that on C
> they aren't, and I didn't found the information easily on the web.

No, they are not.

In C++, 0 can be cast to any pointer, but so can 0L and false. However, 
(void*)0 is a null of type void* and that cannot be cast to any pointer type 
except for void *.

--

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
Thiago Macieira | 28 Jun 2012 18:51
Picon
Favicon

Re: Compiler version

On quinta-feira, 28 de junho de 2012 18.09.22, Rolf Eike Beer wrote:
> Am Donnerstag, 28. Juni 2012, 10:20:42 schrieb Thiago Macieira:
> > On quinta-feira, 28 de junho de 2012 10.14.03, Ivan Cukic wrote:
> > > Well, nullptr is a compile time check, right (like explicit override)?
> > > So,
> > > you  compile your code with a compiler that supports it, making your
> > > code
> > > safe in that aspect, while someone could still compile the code with an
> > > older compiler.
> > 
> > Qt 5 has Q_NULLPTR that expands to nullptr on C++11 and 0 otherwise.
> 
> Is there any chance that these macros will find their way into Qt4? I don't
> mean that they should be used by Qt itself everywhere (or at all), but
> providing them would allow an easy forward-compatible way of introducing
> this stuff. That may not really help for KDE (or we need to require 4.8.3
> or need to ship them ourself) but for other stuff out there this would be
> an improvement that you basically get for free.

There's no plan in backporting features.

But you can take Qt 5's qcompilerdetection.h's bottom part about C++11.

--

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
Thiago Macieira | 28 Jun 2012 00:24
Picon
Favicon

Re: Compiler version

On quarta-feira, 27 de junho de 2012 23.28.30, Ivan Čukić wrote:
> Now, my proposal here is to update the required versions for
> Frameworks 4 to reflect those of KDE Frameworks 5 / Qt 5. Now, I've
> found different information for this - skelly says [2] the requirement
> is GCC 4.6 while some other places state it is GCC 4.5, so I'm not
> sure whether it was a typing error or not.

I'd love to raise the minimum for Qt to 4.5, but it's not going to happen. 
We're saying 4.4 everywhere, except Mac where gcc 4.2.1 by Apple is ok.

That does not include FreeBSD. They'll have to upgrade.

--

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
David Jarvie | 6 Jul 2012 10:02
Picon
Favicon

Re: Compiler version

On Monday 02 July 2012 09:09:53 Ivan Cukic wrote:
> 
> > > Debian Stable (Squeeze) is also 4.5 by default.
> > 
> > Debian Stable (Squeeze) is 4.4.5 by default, with GCC 4.3.5 being
> > provided too.
> 
> Yes, that is the reason I excluded Debian from the distros to watch in this 
> case.
> 
> Debian stable will not ship 4.10 in any form, and from my experience, people 
> who use debian on the desktop, and care about having latest kde packages, use 
> testing or sid. (myself included)

Not in all cases - I use Debian stable (although I'll probably update to testing quite soon).

--

-- 
David Jarvie.
KDE developer.
KAlarm author -- http://www.astrojar.org.uk/kalarm


Gmane