pcb-rnd devlog

unglib: glib removal

glib problems

As mentioned in a previous post, glib is sometimes dangerous. Even if it was not, it's still huge and contradicts the UNIX philosophy: Do One Thing and Do It Well. Glib tries to do a lot of things. I do not doubt it is trying to do each of these things well, but as a combination it's pretty much impossible to Keep It Simple, Stupid. While glib is modular in design, from the viewpoint of an application it is not modular: it's highly unlikely that the application can replace a part of glib while keeping the rest.

The source of these problems is that glib is a "megalib" that tries to solve a host of problems as a package.

The solution

The solution is to replace the megalib with a set of independent minilibs. Each minilib:

The minilibs are imported as svn externals in trunk/src_3rd. They are small enough so that they can be distributed together with pcb sources.

Current state

The "unglib" patch is mostly done. All references of glib are removed from the core and the lesstif hid. There are a three components that still depend on glib, but they each can be disabled:

This means pcb-rnd can be compiled with lesstif (or a compatible motif) on a UNIX box without depending on glib. Together with the earlier effort that removed autotools, it means a UNIX box without any "GNU infection" should be able to compile and run pcb-rnd.