Catégorie: "Linux"

OpenCascade : How to make money with free software ?

Avril 11th, 2006

I wrote this article 6 mois ago. I was waiting for some stuffs around this. However, it is too late so I release it.

My main concern about free software as a way of doing business is "how do you make money out of it ?".
Unfortunatelly, I still don't see any solution ... Of course, it is possible by selling services, maintenance, help, more (costly) advanced version, side development (usually proprietary) but it is not doing money only on free software/development.

Let's me describe on of the solution that uses Opencascade, a former department of Matra.

They produces for a quite long time (about 10 years) a big project called "Open CASCADE". It is a framework used to modelise, visualise 3D models (and many other things that I hardly understand)... It has an aspect of gas factory ("Usine à gaz" as we say in French) because the size/age/complexity of the project. However, it is a very convenient way of doing 3D (many famous corporations use it).

At work, I am working on a project launched by the BRGM (Bureau de recherche géologique et minière ... the equivalent of the french CNRS but for earth sciences) about 10 years ago. The aim of the project is to provide to geologists and geophysists a way of representing the underground. The corporation where I work is doing the work of adding new features, packaging and selling the software. For this project, we use Opencascade.

My work on this project was to provide a visualisation of drillholes in a 3D space (holes that are dug in the ground to get the geological structure of the underground). Basically, I was supposed to represent a (drunk) worm hole from a serie of points.
I tried many way (from the ugliest to the sharpest) but I found some problems with my favorite. When I used too much points, the framework start to reject me (technical description is following my message). As I don't like when a software rejects me, I spent time one this issue (I thought that it was my fault because it is a quite basic feature in the software). I finally successed to isolate the issue and send a kind of SOS/bug report to someone at OpenCascade.
This request cost us 2 units of support from our contract.

Then, one week after, they get back to us with a "There is a bug in Pipe algorithm.". OK, cool. I was a bit proud to find a bug in this kind of big software (for the courageus/crazy, the reason of the bug is : "This bug is caused by complex structure of the curve approximated from 14 (15) points (some discontinuities of derivatives of high levels). Such structure of the curve causes turbulence of the local coordinate system of section along the curve. That is why the algorithm can not build a pipe where the section is orthogonal to the curve in each point all along the curve.", obvious no ?). However, I was expecting a small patch which will fix the issue and a "thank for the bug report". Instead of this, I saw :

The bug fix production can be started after your confirmation.
Please note that the standard price of a query is 15 units of your support program.

OK, now, I know how they make cash (at least a part of it).
You submit what you think to be a bug, it costs you 2 units. They confirm that is a bug, you have to pay 15 units to get the fix. Otherwise, you have to wait for the new release planned whenitwillbeready.
I am not saying it is a bad solution (and I do understand why they do that ... it is called support) but it could be more respectful for the user who spent many time to isolate a bug and report it and consequently helped to improve their software...
(For their defense, they provided me a workaround for my issue).

Lire la suite »

Flying tux

Décembre 13th, 2005

Lors de mon vol Melbourne => Hong Kong, le système de vidéo de la business class avec Cathay Pacific est tombé en rade. Donc on a patienté pour que ça revienne et on a vu que le système tourne sous Linux. Le problème était visiblement que le serveur de fichier NFS était en rade et donc que les clients n'arrivaient pas à le monter...

Voila la photo... Je suis un peu passé pour un cinglé à prendre ça en photo dans l'avion.
Linux / Tux used by Cathay Pacific
Linux / Tux used by Cathay Pacific

Bug fixes admin & dev

November 2nd, 2005

Three small problems at work/personnal today.

  • I had to update the kernel of my boss's computer (running Ubuntu) in order to change an include.h into the GNU/Linux kernel (no more modification in the kernel). Then, I rebooted the computer but the data partition was not mounted. Getting stuff like :
    root@scully:/# mount /data/
    mount: /dev/hdb1 already mounted or /data busy
    Of course, hdb1 is not mounted and /data is not busy (fuser -v /data is your friend).

    After a few investigation, I found that evms is trying to access to the drive on boot and I guess it is not releasing the hard drive properly or something like that.
    Nov 02 17:07:28 scully _5_ Engine: is_volume_change_pending: Change pending: Volume /dev/evms/hdb1 needs to be activated.
    The dirty workaround is to launch evms AFTER the mount all options.
    mv /etc/rcS.d/S27evms /etc/rcS.d/S99evms

    Be carreful, this could cause side effects.

  • I had to debug an issue under the linux version of our softwares. Impossible to read big files (over 2 go).
    Then, I created a fake file of 3 go and made a small program to reproduce the issue.
    Here is the source :

    void myRead(FILE * fichier){
    	/*lit le fichier caractere par caractere*/
    	char buf;
    	int ret=1;
    	if (fichier!=NULL)
    int main () {
    	FILE *myFile = fopen( "bigfile","r" );
    	if (myFile!=NULL) {
    		printf("myFile not opened");
    	return 0;

    Amazing, isn't it ?

    When I run this program (after tsize testsize.cpp), I only get a myFile not opened.
    Launching again this software with strace and I can see in the middle of the dump a :
    open("bigfile", O_RDONLY) = -1 EFBIG (File too large)

    After a few links, I finally found the solution :
    Add at the beginning of the source (before some includes) these three lines
    #define _FILE_OFFSET_BITS 64
    => defines which interface will be used by default
    #define _LARGEFILE64_SOURCE
    => permits the use of 64 bits functions
    => permits the use of fseeko() and ftello()
    Of course, it is possible to specify these define in the g++ command line like that : g++ -D_FILE_OFFSET_BITS=64 -o testsize testsize.cpp


  • Sealers Cove - Wilson PromontoryLast but not least (I like this expression), an trick avoid stealer to make a direct link to one of your image on their website and wasting your bandwith. Personally, I don't care. I have plenty of bandwith and it represents a small part of the current traffic.
    However, I had to fix this problem for a website which offers legal mp3 & avi.
    The trick consists of using mod_rewrite. It checks the referent and if it is not from the official website and that it is trying to reach a file with a specific extension (mp3 and so on), we redirect the navigator to an other URL.

    Just put this few lines into your .htaccess and it should do it (if you have access to mod_rewrite for your website) :

    DirectoryIndex index.php
    RewriteEngine On
    # Rewrite Rules for files
    # if the referent is not empty
    RewriteCond %{HTTP_REFERER} !^$
    # if the domain is not our
    RewriteCond %{HTTP_REFERER} !^(.*)(|*)$
    # if the extension if in the list 
    RewriteCond %{REQUEST_URI} \.(mp3|wmv|wma|zip|avi|mpg)$ [NC]
    # Redirect to an URL 
    RewriteRule ^(.*)$ [L]

    Pretty simple isn't it ?

PS : why this image ? Well, this post is too technical... This picture has been taken last week end in Sealers Cove in Wilson 's Promontory in Victoria.

Edit : comments are closed. Thank you spammer.

Quick update of my kernel on a Dell Inspiron 8600

September 15th, 2005

Still boring to manage proprietary drivers with a Linux Kernel... Each time I want to update my kernel, I have to reinstall the ATI (ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]) and WIFI (Intel Corp. PRO/Wireless LAN 2100 3B Mini PCI Adapter) drivers ...

So, I write down a quick procedure for a lazy copy/paste the next time.
Procedure for GNU/Linux with gcc 3.3 / kernel 2.6.13 / Ati Drivers fglrx 8.16.20 for / ipw2100 1.1.0 / Alien 8.56 (RPM to .deb)
ATI drivers :


alien fglrx_6_8_0-8.19.10-1.i386.rpm
dpkg --force-overwrite -i fglrx-6-8-0_8.19.10-2_i386.deb
cd /lib/modules/fglrx/build_mod
chmod +x ./ && ./
cd ..
chmod +x ./ && ./

Wifi Card :

tar zxvf ipw2100-1.1.0.tgz
cd ipw2100-1.1.0
mv attachment.cgi\?id\=429 compilation_fix
patch < compilation_fix
make install

And the /etc/modules should have (the order does matter) :

i8k force=1

Edit : Comments are closed. Thank you spammers

X Drive III from Memup under Linux (2.6)

July 8th, 2005

Just a quick memo for me and other who will get this external harddrive/card reader.

This box contains a 60 go (in fact 56) and can read a few memory card : CF I and II, MS, MS Pro, SD, MMC, IBM MicroDrive, RS-MMC, mini-SD, MS Duo and MS Pro Duo.

As I don't want to reboot under Windows each time I want to use it, here is the procedure to have it working under Linux.

You need a few modules :

- SCSI disk support (BLK_DEV_SD)
-> Device Drivers
  -> SCSI device support
    -> SCSI device support (SCSI [=y])
      ->  SCSI disk support

- Qlogic QLA 1240/1x80/1x160 SCSI support (SCSI_QLOGIC_1280)
-> Device Drivers
  -> SCSI device support
    -> SCSI device support (SCSI [=y])
      -> SCSI low-level drivers
        -> Qlogic QLA 1240/1x80/1x160 SCSI support

- USB Mass Storage support (USB_STORAGE)
-> Device Drivers
  -> USB support
    -> Support for Host-side USB (USB [=y])
      -> USB Mass Storage support 

It should be enough. Recompile kernel/modules. Reboot

Plug the two USB connectors (DON'T forget to plugin both if it is not working with only one because of the lack of energy provided by my laptop).
If you try the command lsusb, you should see that :

Bus 001 Device 008: ID 0d7d:1470 Phison Electronics Corp.

And in /var/log/, you should get messages :

Jul  8 16:34:18 zoidberg kernel: usb-storage: scsi cmd done, result=0x0
Jul  8 16:34:18 zoidberg kernel: usb-storage: *** thread sleeping.
Jul  8 16:34:18 zoidberg kernel: SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
Jul  8 16:34:18 zoidberg kernel: sda: assuming drive cache: write through

Then, you should be able to mount the /dev/sdXX (sda1 for me) partition where you want with the command :

mount -t vfat /dev/sda1 /mnt/external

Or add in the /etc/fstab this line :

/dev/sda1	/mnt/external			vfat    rw,user

Edit : comments are closed. Thank your spammer.