MATLAB R2012a system() function

MATLAB does not integrate nicely with Linux operating systems, and instead, provides its own copies of binaries, and libraries. These libraries are often outdated, which can cause problems such as the one below.

When calling external C++ compilers though the system() function, I found myself running into an eglibc error. This occurred when running MATLAB R2012a on a Debian Wheezy machine with eglibc 2.13 and gcc 4.7.1.

/tmp/hello-world: /opt/matlab/bin/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.15' not found (required by /tmp/hello-world.so)

The solution is to override GNU Standard C++ Library version used by MATLAB, and force it to use the system version of the library by using LD_PRELOAD. Start MATLAB using the following command from the terminal which should solve your issues:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 matlab

apt-listchanges

Running Debian Testing means that I constantly have new packages pushed to my machine. While the majority of these changes cause no problems, occasionally there can be a few hiccups.

apt-listchanges is a useful package that shows any Debian NEWS files during package upgrades. It can also be configured to show the Debian changelogs too. It cleverly displays each changelog version since the version that was previously in Testing (bear in mind that not every package version in Sid reaches Testing).

To enable the changelog behaviour, run

dpkg-reconfigure apt-listchanges

as root, and change the type of notifications from news to both.

This will add an output similar to the one shown below when upgrading packages.

mtr (0.82-2) unstable; urgency=low

  * Add patch by Moritz Mühlenhoff to enable hardened build flags,
    closes: #654117.

 -- Robert Woodcock   Sun, 08 Jan 2012 08:05:30 -0800


chromium-browser (16.0.912.63~r113337-1) unstable; urgency=low

  [ Giuseppe Iuculano ]
  * New stable version:
    - Medium CVE-2011-3903: Out-of-bounds read in regex matching. Credit to
      David Holloway of the Chromium development community.
    - Low CVE-2011-3905: Out-of-bounds reads in libxml. Credit to Google
      Chrome Security Team (Inferno).
    - Medium CVE-2011-3906: Out-of-bounds read in PDF parser. Credit
      to Aki Helin of OUSPG.
    - High CVE-2011-3907: URL bar spoofing with view-source. Credit
      to Luka Treiber of ACROS Security.
    - Low CVE-2011-3908: Out-of-bounds read in SVG parsing. Credit to Aki
      Helin of OUSPG.
    - Medium CVE-2011-3909: [64-bit only] Memory corruption in CSS property
      array. Credit to Google Chrome Security Team (scarybeasts) and Chu.
    - Medium CVE-2011-3910: Out-of-bounds read in YUV video frame handling.
      Credit to Google Chrome Security Team (Cris Neckar).
    - High CVE-2011-3912: Use-after-free in SVG filters. Credit to
      Arthur Gerkis.
    - High CVE-2011-3913: Use-after-free in Range handling. Credit
      to Arthur Gerkis.
    - High CVE-2011-3914: Out-of-bounds write in v8 i18n handling.
      Credit to Sławomir Błażek.
    - High CVE-2011-3915: Buffer overflow in PDF font handling.
      Credit to Atte Kettunen of OUSPG.
    - Medium CVE-2011-3917: Stack-buffer-overflow in FileWatcher. Credit to
      Google Chrome Security Team (Marty Barbella).
    - High CVE-2011-3904: Use-after-free in bidi handling. Credit to Google
      Chrome Security Team (Inferno) and miaubiz.
  * [5299644] Update patches for v16

  [ Michael Gilbert ]
  * [ce38c6a] depend on gyp >= r1119
  * [d4236b8] fix upstream channel naming in source readme
  * [3683f5d] refresh nss-workaround.patch and system_v8.patch
  * [4c18347] add myself to uploaders

 -- Giuseppe Iuculano   Sun, 01 Jan 2012 13:45:54 +0100

apg - Automated Password Generator

I discovered apg recently, a handy tool for generating secure passwords on the commandline.

user@host:~$ apg

Please enter some random data (only first 16 are significant)
(eg. your old password):>
Ujecabhytor3 (Uj-ec-ab-hyt-or-THREE)
yaxJant7 (yax-Jant-SEVEN)
eewIcIkheaj9 (eew-Ic-Ik-heaj-NINE)
GitAbpavhav7 (Git-Ab-pav-hav-SEVEN)
GrysAcksId8 (Grys-Acks-Id-EIGHT)
VurHocs1 (Vur-Hocs-ONE)

You can also pass a seed to apg via the commandline for use within scripts:

user@host:~$ apg -c date +%s
FiWaztyt
BykerWij
AndyewAbFa
Huoforea
enyuavhew
gaiwilcij