Building libcURL for QNX 6.3.2 and Windows XP from source

August 14, 2008 by

To have access on files using FTP, HTTP and directly from file system I use the free library libcurl. Another important aspect is portability as the application should work on QNX using qcc/gcc 4.2.3 and on Windows using VC9/VS2008. So I give libcurl a try. The build process for libcURL is as stated in the documentation very straight forward. But there where two little pitfalls discovered when using VS2008.

Read the rest of this entry »

Script fails with “No such file or directory”

July 9, 2008 by

While running a script it fails immediately with “No such file or directory“. Even a print or echo command in the second line of the script is ignored. The used program to process the script does exist and is running, too. In this case checking the line endings may help:

file nameofthescript

will report:

ISO-8859 English text, with CRLF line terminators

but expected is:

ISO-8859 English text

The problem are the CR/LF line endings. These are typically used from MS Windows applications. Correct the line endings using any editor. For MS Windows try the Notepad++ open source editor. It has a build-in menu item to fix the line endings: Format -> Convert to Unix.

QNX Momentics IDE Tau – Eclipse 3.2 with CDT 4 – Installation on Windows XP

July 3, 2008 by

This post is only a rough outline of installing a new IDE for QNX.

Download the Development Build of the IDE and the momentics-632-patch-for-profiler from

http://community.qnx.com/sf/frs/do/listReleases/projects.ide/frs.ide_integration_builds

Follow the instructions on the Wiki page Builds_Tau_Integration

And get a faster and more useful IDE for QNX.

I would suggest to give the IDE some more memory in the qde.ini file change -Xmx512M to -Xmx700M.

Another tweak would to rename the eclipse/jre directory. This way the qde.exe does not find the embedded JRE 5 but instead the one installed on your system. So it is possible to benefit from the speedup from Java 6. In case you get any trouble you can rename the directory back again and QDE will start the next time with the embedded Java VM.

Afterwards I’ve updated binutils and gcc, too. These are the download locations I used:

http://community.qnx.com/sf/frs/do/viewRelease/projects.toolchain/frs.binutils.binutils_2_18

http://community.qnx.com/sf/frs/do/viewRelease/projects.toolchain/frs.gcc.gcc_4_2

I follow the instructions at
http://community.qnx.com/sf/wiki/do/viewPage/projects.toolchain/wiki/Downloads_gcc4.2Preview

the obvious required change is to use 4.2.3 as the version number.

and later on:
http://community.qnx.com/sf/frs/do/viewRelease/projects.toolchain/frs.gdb.gdb_6_7_u8

I hope that you enjoy the IDE, too. Now I’m waiting for CDT 5.0 …

Installing the VMware tools in Ubuntu/Debian using .deb archives

February 22, 2008 by

Searching VMware tools packaged as .deb archives for Debian or Ubuntu has failed for all of my searches. The solutions I found in the first place were all related to install the tools from the tar Archive provided by VMware, e.g.

http://www.ubuntugeek.com/howto-install-vmware-tools-in-ubuntu.html,
VMware – Community Ubuntu Documentation,
VMware/Tools – Community Ubuntu Documentation.

The problem is that the name of the package has changed to open-vm-tools and open-vm-tools-gui in the not upcoming Ubuntu release named Hardy:

Ubuntu — Informationen über Paket open-vm-tools-gui in hardy
Ubuntu — Informationen über Paket open-vm-tools in hardy

The packages are based on these source releases:
SourceForge.net: Files for Open Virtual Machine Tools

Installing these packages from Hardy in a Ubuntu 7.10 (Gutsy ) system you may take the following way:

  • Add the following line to /etc/apt/sources.list to get the sources from Hardy:
    deb-src http://de.archive.ubuntu.com/ubuntu hardy main universe
  • Then it is possible to build the package from source (as it is decribed at http://www.selflinux.org/selflinux/html/apt06.html):
    $ sudo apt-get update
    $ sudo apt-get build-dep open-vm-tools
    $ sudo apt-get -b source open-vm-tools
  • Finally install the succefully build deb archives:
    $ sudo dpkg -i open-vm-tools_2008.01.23-74039-0ubuntu1_i386.deb open-vm-tools-gui_2008.01.23-74039-0ubuntu1_i386.deb
    
    Wähle vormals abgewähltes Paket open-vm-tools.
    (Lese Datenbank ... 114218 Dateien und Verzeichnisse sind derzeit installiert.)
    Entpacke open-vm-tools (aus open-vm-tools_2008.01.23-74039-0ubuntu1_i386.deb) ...
    Wähle vormals abgewähltes Paket open-vm-tools-gui.
    Entpacke open-vm-tools-gui (aus open-vm-tools-gui_2008.01.23-74039-0ubuntu1_i386.deb) ...
    Richte open-vm-tools ein (2008.01.23-74039-0ubuntu1) ...
    * Loading open-vm-tools modules
    FATAL: Module vmhgfs not found.
    FATAL: Module vmmemctl not found.                     [ OK ]
    * Starting open-vm guest daemon guestd                           [ OK ]
    Richte open-vm-tools-gui ein (2008.01.23-74039-0ubuntu1) ...
  • The FATAL messages above are showing that the named kernel modules are missing. As far as I can remember the module vmhgfs eases the use of host files within the guest system. I suppose that these modules will be available with the upcoming Hardy release.

Two tips for using ScribeFire

December 4, 2007 by

I’m using the Firefox Add-On ScribeFire to collect information before posting to my blog. I works perfectly for that task. It is available at no cost from https://addons.mozilla.org/en-US/firefox/addon/1730 (Homepage: http://www.scribefire.com/)

But there are two tips for using it:

  1. [Update: The following behavior is fixed in recent versions.] Do not forget to save all the things you entered in the editor. There is not auto save function. I you switch between different posts or notes you will lose any unsaved information from the editor.
  2. Using the wordpress feature you should use the “Source Editing” Tab for the Editor and not the “Rich (normal) Editing” Tab. The latter one will add <br> to every line of your source code. These will be visible if you publish the post to the blog.

Otherwise it works really good!

Technorati Tags: , ,

Generating the Python docs on a Ubuntu GNU/Linux box

December 4, 2007 by

The first thing is to checkout the Python and doctools directories from the subversion repositories:

$ svn co http://svn.python.org/projects/python/trunk python
$ svn co http://svn.python.org/projects/doctools/trunk doctools

To install the required tools, as suggested from the doctools/README, I added the following packages:

# apt-get install python-pygments python-docutils

These are the steps really generating the documentation:

$ cd doctools
$ mkdir build-html
$ python sphinx-build.py -b html ../python/Doc build-html

Open the files generated in build-html, e.g. build-html/index.html, using file->open using your favorite web browser.

Everything works pretty straight forward as described in the doctools/README file.

Technorati Tags: , , , ,

Modify a read only tuple

December 4, 2007 by

Using tuples is very handy because of their flexibility and speed. But there is a drawback. Assigning a single item to a tuple does not work and results in a

 TypeError: object doesn't support item assignment

Appending to the tuple does not work, too. The reason is that tuples are immutable (read only) data structures (http://docs.python.org/lib/typesseq-mutable.html). The trick was provided at http://ada.rg16.asn-wien.ac.at/~python/ how2think/english/chap09.htm: replace the old read-only tuple with the new one where two tuples are concatenated:


>>> tuple = ('a', 'b', 'c', 'd', 'e')
>>> tuple[0]
'a'
>>> tuple[0] = 'A'
TypeError: 'tuple' object does not support item assignment
>>> tuple.append('A')
AttributeError: 'tuple' object has no attribute 'append'
>>> tuple = ('A',) + tuple[1:]
>>> tuple
('A', 'b', 'c', 'd', 'e')

Technorati Tags:

Example for creating a compressed file using Python

November 30, 2007 by

This example shows that the same methods can be used to writing a normal text file and a compressed file. Corresponding reading functions are provided, too.

Read the rest of this entry »