Friday, July 20, 2012

What did I miss about modern Linux?

After running Windows alone for a couple of years, I had to install a Linux distro yesterday since the CUDA API in Windows is pretty ridiculous, flat out refusing to work with MinGW (the Windows port of gcc/g++ and pals).

Although I wasted a lot of time trying to get my dumb Medion PC (MS-7358 mainboard) to boot from two different USB keys, eventually a blank CD turned up and Ubuntu 12.04 landed on it. The install was quick, and this time (unlike on the old Acer laptop my kid uses) the Nvidia card was supported better, giving a usable display.

I needed to install some tools first before getting the CUDA API/SDK/drivers on Ubuntu:
The following NEW packages will be installed:
  build-essential dpkg-dev freeglut3-dev g++ g++-4.6 libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl libdrm-dev
  libgl1-mesa-dev libglu1-mesa-dev libice-dev libkms1 libpthread-stubs0
  libpthread-stubs0-dev libsm-dev libstdc++6-4.6-dev libtimedate-perl
  libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev libxext-dev
  libxi-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev
  x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
  xorg-sgml-doctools xtrans-dev
0 upgraded, 36 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.3 MB of archives.
Fetched 15.3 MB in 3s (3,835 kB/s)
Setting up build-essential (11.5ubuntu2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Now I really wish I'd prefixed this with the "time" command, because it took far less than a minute - maybe 15 to 30 seconds to install all of this... the C++ compiler, X11 libraries and a bunch of other stuff.

In contrast, it took a good 5 minutes just to install Visual Studio 2010 on my Windows 7 laptop (a 64-bit box with a better CPU than this desktop) and the library problems cost me a couple of hours of headbanging which was never resolved.

There are still serious driver problems in Linux, but the whole experience has improved so much since I started with a Red Hat install back in 1998.
Being able to install any number of programs and libraries rapidly, with a single command, is so much more relaxing than trying to hack things together in Windows. Try it!