On 18 Oct 2014, at 13:29 , tor-dev-request@lists.torproject.org wrote:
Date: Fri, 17 Oct 2014 22:29:02 -0400 From: Nick Mathewson nickm@freehaven.net To: tor-dev@lists.torproject.org Subject: Re: [tor-dev] Building TOR using Visual Studio
- Some people want to use paid versions of Visual Studio, and have
paid for a version earlier than VS2013, and don't want to pay for a newer one. I sympathize with this: I've been on paid upgrade treadmills myself, and it's always tempting to save money by skipping steps in the upgrade treadmill. I've even paid for commercial compilers in my misspent youth.
Are there no-cost, non-license-restricted compilers available for Windows that support C99?
This could be a way out for those who don't wish to pay for the VS 2013 upgrade.
But it's a bit more of a barrier than using an existing compiler on the system.
- Some compilers for weird old hardware have never been upgraded to
even rudimentary C99 support, and trying to build code with those weird old compilers is a good way to expose some bugs. I sympathize with this too: there was one guy who would always compile new versions of Tor on his old Irix boxes, and he always turned up a new warning or two when he did.
Static analysers, better compiler warnings, and runtime checks are starting to fill the role previous occupied by obscure systems. And mobile/embedded platforms help with this too :-)
I think we may be able to compensate for lack of C89 support for old compilers, by using a combination of coverity, clang --analyze, gcc/clang -ftrapv , and clang -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error.
Oh, and unit tests :-)
teor pgp 0xABFED1AC hkp://pgp.mit.edu/ https://gist.github.com/teor2345/d033b8ce0a99adbc89c5 http://0bin.net/paste/Mu92kPyphK0bqmbA#Zvt3gzMrSCAwDN6GKsUk7Q8G-eG+Y+BLpe7wt...
teor wrote:
Are there no-cost, non-license-restricted compilers available for Windows that support C99?
Yes, the MinGW compilers fit the bill.
Erik
On 18 Oct 2014, at 06:29, teor teor2345@gmail.com wrote:
Are there no-cost, non-license-restricted compilers available for Windows that support C99?
This could be a way out for those who don't wish to pay for the VS 2013 upgrade.
But it's a bit more of a barrier than using an existing compiler on the system.
Well, it's always possible to compile it using mingw with gcc. Not that big of a barrier imo?
teor:
Nick Mathewson:
- Some people want to use paid versions of Visual Studio, and have
paid for a version earlier than VS2013, and don't want to pay for a newer one. I sympathize with this: I've been on paid upgrade treadmills myself, and it's always tempting to save money by skipping steps in the upgrade treadmill. I've even paid for commercial compilers in my misspent youth.
Are there no-cost, non-license-restricted compilers available for Windows that support C99?
I assume MinGW fits: http://www.mingw.org/
MinGW is also what is used to build Tor for the Windows version of the Tor Browser (run on GNU/Linux).
On Sat, Oct 18, 2014 at 03:29:51PM +1100, teor wrote: | | On 18 Oct 2014, at 13:29 , tor-dev-request@lists.torproject.org wrote: | > Date: Fri, 17 Oct 2014 22:29:02 -0400 | > From: Nick Mathewson nickm@freehaven.net | > To: tor-dev@lists.torproject.org | > Subject: Re: [tor-dev] Building TOR using Visual Studio | | > * Some people want to use paid versions of Visual Studio, and have | > paid for a version earlier than VS2013, and don't want to pay for a | > newer one. I sympathize with this: I've been on paid upgrade | > treadmills myself, and it's always tempting to save money by skipping | > steps in the upgrade treadmill. I've even paid for commercial | > compilers in my misspent youth. | | Are there no-cost, non-license-restricted compilers available for Windows that support C99? | | This could be a way out for those who don't wish to pay for the VS 2013 upgrade.
Depending on what you mean by "non-license-restricted", Visual Studio Express may fit the bill.
https://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express http://www.visualstudio.com/downloads/download-visual-studio-vs
Others have brought up mingw, I'm not sure how many of the security features included in the Visual Studio toolchain (such as ASLR, DEP and SEH) are available when building with mingw.
Adam
On Sat, Oct 18, 2014 at 03:29:51PM +1100, teor wrote:
- Some compilers for weird old hardware have never been upgraded to
even rudimentary C99 support, and trying to build code with those weird old compilers is a good way to expose some bugs. I sympathize with this too: there was one guy who would always compile new versions of Tor on his old Irix boxes, and he always turned up a new warning or two when he did.
Static analysers, better compiler warnings, and runtime checks are starting to fill the role previous occupied by obscure systems. And mobile/embedded platforms help with this too :-)
I think we may be able to compensate for lack of C89 support for old compilers, by using a combination of coverity, clang --analyze, gcc/clang -ftrapv , and clang -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error.
Oh, and unit tests :-)
Theo de Raadt [1]:
"The answer to that is not news.
On a regular basis, we find real and serious bugs which affect all platforms, but they are incidentally made visible on one of the platforms we run, following that they are fixed. It is a harsh reality which static and dynamic analysis tools have not yet resolved.
Now, If you don't realize this is the reason we try to run on the older platforms..."