Surveillance is the business model of the Internet, after all — and [the NSA] simply got copies for itself.
After multiple years of listening to Security Now mention Bruce Schneier for his security insights, I’ve finally subscribed to his Crypto-Gram newsletter. This is one of his many thought-provoking essays.
In my systems programming course we learn various techniques of the C programming language. On multiple assignments we are provided code that only runs on 32-bit. I run Linux Mint 64-bit on my laptop, using Eclipse for my C/C++ development and the GNU toolchain to compile, which is an issue when the 32-bit C/C++ code is compiled by default for 64-bit. Valgrind is also unhappy since it cannot run the cross compiled 32-bit code (probably many other profiling tools encounter this as well).
This guide should work flawlessly on Ubuntu and its derivatives since Linux Mint is based upon Ubuntu and uses its packages.
I solved this problem by adding the -m32 tag to the eclipse compiler and linker settings, and installing the required 32-bit packages for my operating system.
Go to Project->Properties then click on Settings, which is under C/C++ Build
Make sure that the current configuration that is selected is All Configurations
Select the Tool Settings tab, select GCC C Compiler, if it isn’t selected already, and in the Command form change gcc to gcc -m32 to enable 32-bit compiling with GCC
Do the same change of gcc to gcc -m32 on the GCC C Linker page, then click OK to save the settings
Make sure to clean the project so that previously created object files compiled with 64-bit GCC are removed, otherwise the build will fail. Go to Project->Clean… and either select Clean all projects or select Clean projects selected below, then selecting the current project (In my case it is comp2401a3). Click OK
Installing the following packages enabled standard C/C++ library calls to work. If other libraries are used within the code, additional 32-bit packages might have to be installed. Installation via Linux Mint, based on Ubuntu, is via the standard apt-get install command.
This might also be required if the code still does not compile:
apt-get install ia32-libs-gtk
Package for Valgrind
When running Valgrind on the 32-bit code the following error occurred.
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld-linux.so.2
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux.so.2
valgrind: Possible fixes: (1, short term): install glibc’s debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind: Cannot continue — exiting now. Sorry.
After adding the suggested package libc6-dbg, the error still occurred. Installing the 32-bit version of the package fixed the error:
apt-get install libc6-dbg:i386
As shown above, it can be troublesome to set up cross compiling of 32-bit C/C++ code on a 64-bit machine, but if the reward of programming in the native operating system is worth more than programming in a virtual machine or on another computer, then it is a worthy cause.
This isn’t the first time I’ve had a personal website. The previous one started as a hobby of mine when I was nine and in grade 5. My inner geek found the internet fascinating and I wanted to be on it. The website was designed in the good ol’ FrontPage program by Microsoft. I packed the pages full of cool videos, game cheats, images and links, then shared my website with friends at school when we had computer class. I even went to the extent of designing a poster and putting it up in my classroom and in the computer lab.
As the years progressed I learned more about CSS, and web standards, allowing me to build a more “sophisticated” website. I emphasize the word “sophisticated” because all it was, was static html pages, barely utilizing a linked stylesheet, and later on, a static php website. In hindsight I couldn’t believe how big of a nerd I was, but more importantly, I had the drive and devotion to learn and apply myself towards a medium that many people of my age at that time didn’t even attempt.
Unfortunately a combination of me losing interest and not wanting to pay for the web hosting any more allowed the website to slip off of the internet at the beginning of 2009. The source files hopefully still reside on some hard drive in my parents house.
Even though the content and coding was primitive and limited, it got me interested in coding, bringing me to where I am today: a university student studying computer science.
After having built up a portfolio of website and visual design work from previous jobs and school work, and the fact that I’ll be competing to be an intern at a company this upcoming summer is why I’m reclaiming a slice of the internet for myself.
I plan on including my CV and a portion of my portfolio on this website, as well as doing the whole blog thing, providing constructive commentary on topics that interest me, most likely in the spectrum of computer science.