4 ms·
For anyone wanting an easy way of trying it out, I recommend grabbing `zbeekman/nightly-gcc-trunk-docker-image:latest` from Docker Hub, which has the latest ver
by umvi 8y ago
For anyone wanting an easy way of trying it out, I recommend grabbing `zbeekman/nightly-gcc-trunk-docker-image:latest` from Docker Hub, which has the latest version of GCC pre-built (which, actually looking it it right now is 10.0) - also, see GitHub landing page for it[1].
I find this to be the easiest way to try out new GCC versions and I actually use it exclusively for building testing my GCC 9 projects. With just a small wrapper Dockerfile, you can easy accommodate CMake or any other build dependencies.
For example, I have one I use for building CMake projects[2] (see README of same project for example of how to use said docker image).
GCC 9 is great, by the way. One of the best improvements, IMO is that gcov can now print coverage reports to stdout in JSON format which means you can take advantage of parallel computing to generate coverage reports fast. The Dockerfile I linked to in [2] above is a part of a utility I made as a drop-in replacement for lcov and can generate lcov reports at times up to 100x faster thanks to GCC 9 improvements.
[1] https://github.com/zbeekman/nightly-gcc-trunk-docker-image https://github.com/zbeekman/nightly-gcc-trunk-docker-image
[2] https://github.com/RPGillespie6/fastcov/blob/master/Dockerfile https://github.com/RPGillespie6/fastcov/blob/master/Dockerfi...
- cozzyd 8y agogcc is not particularly hard to build from source either.
- umvi 8y agoI had a heck of a time getting it to build under Ubuntu. It was simple under OpenSUSE however (I followed the instructions both times)
- Keyframe 8y agoWhat problems did you have? It's dead easy.
- umvi 8y agoUnder Ubuntu 18.04 I followed the instructions here: https://gcc.gnu.org/wiki/InstallingGCC https://gcc.gnu.org/wiki/InstallingGCC And everything went well until the `make` step - it just blew up with a million compiler errors. I did the same thing under OpenSUSE and it built just fine.
- ComputerGuru 8y agoWith C++, a million errors are oftentimes one error a million different ways.
- pkaye 8y agoIts one error after name mangling.
- magicalhippo 8y agoFlashback... When trying C for the first time, I ported a ~300 line Pascal program. I had read C syntax for some time, and the program was rather simple so I felt confident in the job. After transcribing the ~300 lines I tried to compile for the first time: 3728 errors and warnings... I read through the code and everything looked correct, so I gave up. Picked it up again some weeks later. Turned out that I had, by force of habit, erroneously added a semicolon at the end of macro definition on line 3. Fixing that it compiled flawlessly. At the time I was also unaware that I was actually using a C++ compiler, djgpp, which I'm sure did the error count no favors.
- marktangotango 8y agoAh djgpp, rhide and allegro, that was my gateway drug.
- uzbit 8y agoSame here! A while back I found some of my old Allegro games from a high school CS class (choked back chunks), and with little effort got them to compile on modern macOS. It was quite nostalgic.
- cozzyd 8y agoInteresting... never had any trouble on CentOS or Fedora. Maybe not enough gcc developers use Ubuntu...