Catégorie: "Développement"

Rebuild of the Debian archive with clang

February 29th, 2012

Recently, I have been working on a side project for Debian. The goal was to rebuild of the Debian archive (the distribution) with clang, a new C/C++ compiler.

clang is now ready to build software for production (either for C, C++ or Objective-C). This compiler is providing many more warnings and interesting errors than the gcc suite while not carrying the same legacy as gcc.
This rebuild has several goals. The first one is to prove (or not) that clang is a viable alternative. Second, building a software with different compilers improves the overall quality of code by providing different checks and alerts.

The result are detailed and explained here:
http://clang.debian.net/

Conclusions
When I had the idea to rebuild Debian with a new compiler, I was expecting many issues and bugs caused by clang but I have been surprised to notice that most of the issues are either difference in C standard supported, difference of interpretation or corner cases.
My personal opinion is that clang is now stable and good enough to rebuild most of the packages in the Debian archive, even if many of them will need minor tweaks to compile properly.
In the next few years, coupled with better static analysis tools, clang might replace gcc/g++ as the C/C++ compiler used by default in Linux and BSD distributions.
The clang developers are progressing very fast: 14.5% of the packages were failing with version 2.9 against 8.8% with version 3.0.
Several major steps in the clang adoptions have been made like chromium/chrome being built by default with clang, Xcode providing clang by default, FreeBSD working on the gcc -> clang switch, etc.
However, on the Debian point of view, one of the important step would be to make sure that clang manages all the Debian architecture/kernel (11 official, 6 unofficial)

Java en Opensource ?

Juin 30th, 2006

Mont Aoraki (NZ)
Mont Aoraki

Ce matin à l'INRIA avait lieu une conférence sur Java. L'intervenant était James Gosling (oui, moi aussi un jour j'aurais une page wikipedia :p) qui est considéré comme le créateur de Java.
Il venait pour parler de Java en tant que plateforme scientifique, Java pour le temps réel et le refactoring (réorganisation) de large Java Code (ie plusieurs millions de lignes de code).
Je reviendrais sur la conférence en soit dans un autre billet.

A la fin de la conf, je lui ai posé une question qu'il doit souvent entendre :
"Sun a changé récemment de PDG, celui-ci parle de plus en plus de passer Java en Opensource (logiciel libre), qu'en pensez-vous ?"
Il a tout d'abord rappelé que les sources de Java étaient publiques un bout de temps. Il a ensuite expliqué pourquoi Java n'avait pas été passé en Logiciel Libre "pur" : Sun garantit le fonctionnement de la Java Virtual Machine sur toutes les plateformes officielles mais cette opération ne serait que difficilement envisageable si cette opération était réalisée par quelque chose de décentralisé.
Aussi qu'il est arrivé dans le passé que des partenaires/concurrents reprennent la JVM et l'adapte à leurs besoins tout en cassant la compatibilité avec les autres plateformes (il a cité la PME situé à Seattle, Redmont plus précisement). On se rappelle des problèmes des applets qui ne fonctionnait pas (bien?) avec la "JVM Microsoft".

Enfin, ce qui va faire plaisir aux fadas des logiciels libres. Il a annoncé qu'il envisageait un fonctionnement à la manière du groupe Apache en terme de licence. C'est-à-dire une licence qui soit libre tout en instaurant l'obligation au logiciel de changer de nom si fork il y a.
Il n'a pas donné de dates mais ça va dans le sens logiciel libre...

Ma vie (piouf)

Mai 25th, 2006

De retour en France début avril, ces deux derniers mois ont été consacrés à la recherche d'un boulot et d'un appartement.
J'ai maintenant les deux et qui ont tout pour me plaire.
Niveau de l'appartement, je me suis installé avec mon amie dans un trois pièces situé à Paris (20 ème) près de la place de Nation. Super appartement, content et bien chez nous dedans. Bon, le seul problème est que l'on a pas encore l'ADSL... Donc je squate la connexion chez Pimentech.

Pour le boulot, après de longues recherches (cf message précédent), j'ai finalement trouvé exactement le boulot que je recherchais. Je vais intégrer le prestigieux institut qu'est l'INRIA - Institut National de Recherche en Informatique et Automate (pour ceux qui ne connaissent pas, c'est comme le CNRS mais appliqué à l'informatique). Régulièrement classé dans le top 3 de 01 informatique des entreprises préférées des informaticiens.
Je vais être amené à travailler sur le projet Scilab, logiciel de calcul scientifique. Mon travail consistera principalement en les développements multi plates-formes en vue de la réalisation des fonctionnalités de Scilab 5 et la responsabilité des versions UNIX et GNU/Linux du logiciel Scilab. Je sens que je vais bien m'amuser !

Ce fut un retour et une réinstallation en France un peu plus longue que je ne l'avais imaginé mais qu'il est au final bien passé !

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 »

A silly & boring PHP bug ...

November 3rd, 2005

This morning, I received a emails telling me that there is a big problem on a website that I host. Users are not able to upload any image on the server. (Warning: imagejpeg(): Unable to access 474/10434/59107.jpg in /www/libs/functions.php on line 226) Weird... The problem is in a daily used function which has been running for years. The only recent changed was the migration from v4.4.0 => v4.4.1 of PHP few days ago.
Because of the time difference, I only saw this problem when I woke up this morning. And fortunately, Julien has been able to find a temporary workaround... By disabling the safe mode... Dirty but it fixes the problem.

In the first place, I thought it was a change in the default configuration of PHP but I received a other email about the same kind of problems. Let's see the bug tracker of PHP... Ok, I am not the first one who has this issue.
http://bugs.php.net/bug.php?id=35060
http://bugs.php.net/bug.php?id=35071

One of the workaround that I found in this bug report is to make a touch() before calling the imagejpeg() function... Almost worster than the safe mode fix as I use it everywhere.
And I saw that Sniper is considering this as a feature (this is not a bug but a feature). Well, I don't see the point of touching a file before creating it after but well...
And people are complaining about this. Like this message :

Changing the way functions work within a minor update (version+=0.0.1) is an irresponsible way of maintaining software. This bug (please don't call it a "feature") caused a lot of trouble on our servers.

And I don't think that the way Sniper is any answering really help in the first bug report.
However, it seems that he considers this as a bug in the second bug report. The modification here shows it : http://cvs.php.net/php-src/ext/gd/php_gd.h (details here : http://cvs.php.net/diff.php/php-src/ext/gd/php_gd.h?r1=1.59.2.1&r2=1.59.2.2&ty=u).

Now, let's see if they are going to release a 4.4.1.1 version or we will stay with a safe_mode=off for a little while...

Edit : Comments closed. Thank you spammers.