May 14

It seems I’m not the only one who has a problem with Gutsy Gibbon. A search on the internet shows several hits and possible fixes. Let’s see it it works.

  • You have to comment out the “CDROM” line in your “/etc/apt/sources.list” by typing the following at the Terminal:
    • gksudo gedit /etc/apt/sources.list
  • Once you have your /etc/apt/sources.list file open look for the following line:
    • deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ – Release i386 (20071016)]/ gutsy main restricted
  • Comment the line out so that it looks like the following line:
    • #deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ – Release i386 (20071016)]/ gutsy main restricted
  • Save the “/etc/apt/sources.list” file and close it.
  • Update your “/etc/apt/sources.list” by typing the following at the Terminal:
    • sudo apt-get update

All these commands work fine, the CDROM line is the first line in the file on my system. Using the Synaptic Package Manager the build-essential package is located and marked for installation. This triggered the request for the Gutsy Gibbon error and indeed, the installation now works fine. All other packages are marked again for installation and no problems occur during installation of these packages as well.

Now let’s check if a program can be made using Anjuta, a new Generic C project is started with all settings to default. After confirming all settings several scripts are running and NO, again error messages that disappear to fast to see what else is missing. It seemes to be something with int…tool, this might have to do with the option to add internationalization to the project. In the Package Manager there is a package intltool, this is installed and might solve the problem.

Now something funny happened. Previously I always started a new Generic C project and when it failed to generete the required files I closed Anjuta and deleted the folder that was created (foobar-sample). The next time Anjuta was started to test again it complained the project was missing, no problem since I deleted it myself. By mistake I pressed the New button which added a blank file in the IDE after which I created the new project and found the errors again. I closed Anjuta, deleted the folder foobar-sample again and I started Anjuta again. Now no error is displayed, the Newfile#1 is opened again and (even better) when creating a new project with Newfile#1 still open the messages remain visible! YES! More good news, installing the intltool package solved the int…tool error, but there is still an error reported: glib must be installed.

Glib is not a package that is available in the Package Manager, searching what glib is results in the GTK project that provides a Graphical Tool Kit. Since I will not be developing graphical programs I will not install it. After deleting the project again, start Anjuta, create a new Generic C project and set the options Add shared library support and Add internationalization both to NO the project is now created without any errors. Build the project using the Build | Build Project menu option will copile and link it. Finally the program can be executed using the Build | Execute Project menu, the result “Hello world” is displayed in the Terminal box at the bottom.


May 13

Another discussion with the experts reveil that next to GCC a set of development essentials are needed. He gave me a list of all the packages he installs in a development PC:

  • autoconf
  • autogen
  • automake1.8
  • automake1.9
  • autotools-dev
  • binutils
  • build-essential
  • cpp
  • cvs
  • dhcp3-server
  • dpkg-dev
  • g++
  • gcc
  • gftp-common
  • gftp-gtk
  • libc6-dev
  • libpcre3
  • libstdc++6-4.0-dev
  • libsvn0 (seems this does not exist, libsvn1 selected instead)
  • libtool
  • linux-kernel-headers (seems this does not exist, linux-kernel-devel selected instead)
  • m4
  • make
  • minicom
  • nfs-common
  • nfs-kernel-server
  • openssh-server
  • portmap
  • smbfs
  • ssh
  • subversion

I’m not sure I need all this but I don’t want to take the risk anymore. Using the Synaptic Package Manager all these packages can be installed, click on the All item to list all available packages, than click on the list of packages and start typing the package, during the typing a search will be executed so you will not need to type the whole package name.

Most packages are already installed, some of them are automatically selected when selecting another one. Libsvn0 and linux-kernel-headers do not exist, instead Linsvn1 and linux-kernel-devel are selected. After the marking process a click on the Apply button starts the installation. However, after a few seconds the disk “Ubuntu 7.10_Gutsy Gibbon_ – Release i386 (20071016)” is requested in the CD-ROM player. The Ubuntu CD-ROM is inserted but the title does not amtch and Ubuntu refuses to continue the installation….

May 7

Chapter 4 of the manual becomes interesting,  it explains how the create a new project. The previous chapter explains that Anjuta works with project files that are located in the folder of the project. In such project files the make files are stored. This might explain why the build menu is disabled, there is no project file in this folder.

Selecting the File | New… | Project option displays a message that it could not find autogen version 5, this can be downloaded from There is no autogen in the Add/Remove application part, it is however available in the Synaptic Package Manager. After installation and selecting the File | New… | Project option a Application Wizzard is started. The first page indeed explains that as part of the process a build file will be generated.

I have no idea what the create, so below settings are based on common sense. As project type there is an Anjuta Plugin in the C tab, it looks tempting to use this one but I decide the click the Generic C project instead. In the next tab a project name is provided that is automaticly added to my development folder in the next tab. I do not want to add internationalization support and after confirming the settings several files are generated. A “Hello World” application is generated automaticly and a build is started. There are several error messages displayed that I need to install more stuff but before I can read them they are gone…..

May 6

Time to call in the experts. It looks like GCC is installed but I still get error messages it can not be found. The experts tell me that GCC is not by default installed and I should use the System | Administration | Synaptic Package manager to install GCC and all essentials I need for developing programs. It seems GCC is not seen as an application but as a tool.

After typing the password there is a huge list of available packages. A search on GCC still shows a lot of hit, apparently some packages are installed (marked with a green fill check box in front of it). Also the version of the installed package is displayed, the cris-dist 1.64-1 is displayed as well.

There are several GCC 4.1 packages already installed, most of them an Ubuntu spin-off. GCC is now at 4.3.0 but this is not shown yet. I marked all GCC-4.2 packages for installation and clicked the apply button. A message appears that 58MB will be installed. Sounds good….

While browsing through the list also a GCC AVR version seems to exists. This might be something to investigate later on.

The installation took only about 10 seconds, that most was already downloaded but not installed? After closing the package manager and opening Terminal windows it’s time to check if the compiler now actually works. In the folder that contains the previously generated hello.c file the command gcc -o hello_host hello.c is typed, after pressing the enter key no error is displayed but also no messages. Executing the ls command shows that indeed the file hello_host exists! The program can be executed by typing the ./hello_host command and viola: Hello world!

Another piece of advice the experts gave me (and so far they have been right) is to install a proper Integrated Development Environment (IDE) to prevent working with a simple editor and typing all these commands. They advice Anjuta as an IDE. This is an application so clicking the Applications | Add/Remove menu should provide access to this application. Indeed, clicking the Programming category shows Anjunta IDE as an available application. The comments state that it is provided by the Ubuntu community and integrates well with the Ubuntu desktop. Perfect. Checking the check box and pressing the Apply Changes button ask (again) for my password before installation.

After installation it is placed in Applications | Development, launching the program shows a type of explorer. Clicking on the Open button and navigating the my hello.c file triggers a message that there are two plug ins available for editing: Scintilla and GtkSourceview. Let’s start with the first one. The file hello.c is opened and the syntax is highlighted which is a very handy feature for developing programs. The font is very big, clicking the Settings | Scintilla Editor menu this can be changed to 8pt.

In the Settings menu there is also a Plug in menu available. This shows a list of possible plugins that can be used in combination with Anjuta, the plug ins Automake Build, Debugger and Terminal are checked, this add two menus (Build and Debug) next to a series of button at the bottom of Anjuta that toggle a window between breakpoints and a terminal.

Clicking the Build | Compile menu now compiles the program, but this creates the file hello.o and not the executable. For this they need to be linked together, normally these are combined in the Build process however the Build option in the Build menu is disabled. Something is missing, perhaps reading the manual might help.