I'm in the process of moving from XP to Linux. (I'm new to Linux)

I have succesfully installed CLIPs on Ubuntu, using the SPM. I would however, like to build CLIPS from the sources - since I will be extending its current functionality.

I have downloaded the CLIPS sources (v6.2.4) from http://sourceforge.net/projects/clipsrules/files/CLIPS/

in to my /home/morpheous/projects/CLIPS folder, and I now want to build it. However, I am new to the gnu build tools and make (I have already run sudo aptitude install build-essential).

Can anyone offer any help/instructions on how I may build CLIPS (I suspect that I may need to build the X11 interface as well - but that is a lower priority for now)

  • ./configure -> make -> make install ?
    – ukanth
    Nov 2 '09 at 12:44

A quick look at the project homepage suggests that Linux is not a supported environment, only Windows and OSX are, so there may be no quick way to build it with the standard GNU build chain (you may need to build a new makefile or similar, and as you are not familiar with the relevant tools this is likely to be something that will take time and frustration).

Is this package the same tool? If so then someone has already done the work for you and aptitude install clips should do the trick if you have universe enabled (or you should be able to find it in the GUI package manager too).

EDIT: as per ~quack's comment, I think misread your question more than a little previously. All packages in Debian/Ubuntu have corresponding source packages (though it is not always a 1-to-1 relationship, as one source package may build into several binary packages in the case of large projects).

If you look at the package details pages linked to above you will see links for the files clips_6.24.orig.tar.gz and clips_6.24-3.diff.gz. The former will be the official upstream source used, and the latter is a patch containing the changes the package maintainers have added. The differences will include any build scripts they needed to create (or alter, if a build script was present but didn't fit with the distro's build policies) as well as pack-ported security fixes from later versions.

You can get the files from there, though you are better off using apt and dpkg as this will reduce the risk of your local machines idea of what packages it has getting badly misrecorded (though this is much less of an issue for applications than it is for libraries).

The general pattern is:

  1. get the dependencies with apt-get build-dep <package_name>
  2. get the source package with apt-get source <package_name>
  3. make any changes you need
  4. build a binary package with dpkg-buildpackage
  5. install the resulting package with dpkg

See this document for a few more details. That page is for Debian, but the Ubuntu packaging process is pretty much identical by design. There are a few extra complications that you might hit, but hopefully this info will at least get you started.

If you do want to build from original upstream sources (perhaps because the Ubuntu source package is not up-to-date enough for your current needs), then you will find the data in the <package>.orig.tar.gz and <package>.diff.gz archives valuable in providing pointers to what build scripts you will need to make/alter to get the source compiled, if the upstream version does not already have appropriate scripts/makefiles as you have found in this case. You make need to compile other packages from upstream sources too though if you take this path, as the later version may require later versions of the packages it depends upon than are available in the standard repo.

  • 1
    i'm guessing "SPM" is "Synaptic Package Manager", so yeah, that's probably the package he's talking about having already installed. Nov 2 '09 at 13:38
  • +1 for expanding. i'd guess OP is trying to rebuild because the std package doesn't include some config options he wants. how/where would you put ./configure tweaks in order to use dpkg-buildpackage to get a custom build of this (or some arbitrary) package? Nov 2 '09 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy