Charlie Harvey

Io — Day 0, setting it up on Debian

Well, it has been a while since Ruby, so I thought it was time to have a crack at the next of the my Seven Languages In Seven Weeks challenges, its time to play with Io. As it turns out Io was a bit of a faff to install on Debian Squeeze. So I’ve written up a day 0 tute on how to do just that. I’ve found a combination of the advice from Tim Hardy and from Eric Hogue on the Seven Languages Forums, advice from the install guide, this post, installing the io language from Brian Racer and installing stuff from the aptitude curses interface got me there in the end.

Install the dependencies

Our first, Debian-specific step is to install all the dependencies required. As you can see I didn't have g++ or rpm or cmake installed and a couple of headers were also needed. $ sudo aptitude install cmake librpmbuild1 rpm libssl-dev g++ libxml2-dev libpcre3-dev python-dev

Get the source for Io

There's a couple of ways to do this. Directly download a zip file, or do a git clone. I’d tend to opt for git cloning, to make it easier to update in the future. Choose one of: $ wget -O io.zip --no-check-certificate http://github.com/stevedekorte/io/zipball/master $ unzip io.zip $ cd stevedekorte-io-[hash] OR $ git clone git://github.com/stevedekorte/io.git $ cd io

Set up a build directory

mkdir build && cd build

Compile and Install

Time to build and install Io! $ cmake .. Will produce summit like this: -- Configuration set to: DebugFast -- GMP libs: GMP_LIBRARIES-NOTFOUND GMPXX_LIBRARIES-NOTFOUND -- Could NOT find GMP (missing: GMP_INCLUDE_DIR GMP_LIBRARIES) -- checking for one of the modules 'libffi' -- Could NOT find FFI (missing: FFI_INCLUDE_DIRS FFI_LIBRARIES) -- checking for one of the modules 'cairo' -- checking for one of the modules 'glib-2.0' -- checking for one of the modules 'cairo' -- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) -- Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) -- Could NOT find GLFW (missing: GLFW_LIBRARY GLFW_INCLUDE_DIR) -- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) -- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) -- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) -- checking for one of the modules 'glib-2.0' -- Could NOT find PythonLibs (missing: PYTHON_INCLUDE_DIRS) -- checking for one of the modules 'sqlite>=3;sqlite3' -- Found ZLIB: /usr/lib/libz.so -- Configuring done -- Generating done -- Build files have been written to: /path/to/io/build You’ll notice that I was missing some dependencies. These didn't seem to be core, but might mean I can't use some language addons. Next, we'll compile with a simple $ make Which produces a tonne of compiler messages: -----------------SNIPPED------------ [ 98%] Building C object addons/Volcano/CMakeFiles/IoVolcano.dir/source/IoHttpParser.c.o [ 99%] Building C object addons/Volcano/CMakeFiles/IoVolcano.dir/source/IoVolcanoInit.c.o Linking C shared library _build/dll/libIoVolcano.so [ 99%] Built target IoVolcano [ 99%] Generating ../../../addons/Zlib/source/IoZlibInit.c Scanning dependencies of target IoZlib [ 99%] Building C object addons/Zlib/CMakeFiles/IoZlib.dir/source/IoZlibEncoder.c.o [100%] Building C object addons/Zlib/CMakeFiles/IoZlib.dir/source/IoZlibDecoder.c.o [100%] Building C object addons/Zlib/CMakeFiles/IoZlib.dir/source/IoZlibInit.c.o Linking C shared library _build/dll/libIoZlib.so [100%] Built target IoZlib $ Next let's install Io: $ sudo make install Which gives us: -----------------SNIPPED------------ -- Installing: /usr/local/lib/io/addons/Zlib/io/Zlib.io -- Installing: /usr/local/lib/io/addons/Zlib/CMakeLists.txt -- Installing: /usr/local/lib/io/addons/Zlib/_build -- Installing: /usr/local/lib/io/addons/Zlib/_build/dll -- Installing: /usr/local/lib/io/addons/Zlib/_build/dll/libIoZlib.so -- Installing: /usr/local/lib/io/addons/Zlib/_build/headers -- Installing: /usr/local/lib/io/addons/Zlib/_build/binaries -- Installing: /usr/local/lib/io/addons/Zlib/_build/lib -- Installing: /usr/local/lib/io/addons/Zlib/_build/objs Finally we'll need to run ldconfig to update our library paths. $ sudo ldconfig

Let’s test Io!

Finally we can check if its all happy with a quick Hello, World. $ io Io 20090105 Io> "Hello, World!" println Hello, World! ==> Hello, World! Io>

Final Thoughts

If you are on a multi user system or just want t sandbox your install, Brian Racer's installing Io article details a way of doing that. Don't forget you still need to ldconfig after following the steps Brian outlines. The install took a bit of time, but I’m now ready to move on to Day One. How exciting!


Comments

  • Be respectful. You may want to read the comment guidelines before posting.
  • You can use Markdown syntax to format your comments. You can only use level 5 and 6 headings.
  • You can add class="your language" to code blocks to help highlight.js highlight them correctly.

Privacy note: This form will forward your IP address, user agent and referrer to the Akismet, StopForumSpam and Botscout spam filtering services. I don’t log these details. Those services will. I do log everything you type into the form. Full privacy statement.