Linux arrives


#1

Well I finally got a version out with linux support! It’s a bit creaky at the moment, so any suggestions from linux experts would be much appreciated!

A bunch of other new classes for you folks too - check out the changelist over at

http://www.rawmaterialsoftware.com/news.php


#2

Woohoo! :smiley:

It’s looking pretty good, though the demo doesn’t run under gnome for me (“ERROR: X returned BadAccess (attempt to access private resource denied) for operation X_GrabButton”). Works fine under my other window managers(KDE, fluxbox, ion, even e17) - all the widgets etc. seem to behave correctly.

The makefiles worked fine for me, though I wonder if it wouldn’t be safer going with autoconf? It would protect against any differences between systems like libraries being in different places, although given the number of dependencies (or lack of - very cool btw :wink:) it’s maybe not particularly necessary. Also, my own experience of trying to write autoconf scripts has been a bit of a nightmare, so maybe I’m not the best person to advocate it…

Can I also put in a request for the audio side of things to (at least have the option to) support JACK? It’s a very cool piece of software that’s (imo) a necessity for decent audio work on linux.

Oh, and I’m running Agnula/DeMuDi, attached to the Debian unstable repositories.

Thanks! :slight_smile:

  • Niall.

#3

well I’m a total linux newbie, so you’re probably right about autoconf, but I know nothing about it, and makefiles always make me dizzy. The one in there was actually done by a friend of mine, so I can’t vouch for it too much. Any improvements you come up with would be much appreciated!

And I’ve not got gnome installed, I was using KDE, so will have to give that a go.


#4

Well basically, autoconf (along with it’s sister tools automake, aclocal and autoheader) is used to automatically generate makefiles for your project, filling in the correct paths for libraries etc. according to the system it’s running on. This is why most linux software you’ll find on the internet requires you to run a configure script before you run make on it - the configure script is generated by autoconf, and in turn generates the correct makefiles for your system.

Generally what you do (don’t take this too literally, it might not be entirely correct) is create a configure.in file (or is it configure.ac?), specifying things like what libraries you’re using. Then you create Makefile.am files for each directory your source is in (these are usually very simple, just listing the files you want to build). Then you run aclocal, which will interrogate your configure.in file, take a note of the libraries you’re using, and copy over a bunch of macros to put into the final configure script, which will tell it what to do about the libraries (i.e. what the include paths are, whether any other libraries need to be linked for the library to work…).

The next step is to run autoconf, which will generate the configure script from configure.in and the macros that aclocal just copied to your project directory.

Then you run automake (remembering the -a option to create any missing files that it needs), which will generate a bunch of Makefile.in files corresponding to your Makefile.am files and your configure.in file. These are basically full makefiles with certain parts replaced with variables, which are then filled in when you run the configure script itself to create the final makefiles for your project.

So what you do is:
[list]aclocal
autoconf
automake -a
./configure
make
make install (optional)[/list]

To distribute the code, you’d typically just supply the configure script and the Makefile.in’s (I think - I might be missing something), and the user would just run the last three steps above (./configure, make, make install).

This seems to be the main tutorial on the subject. Considering the few dependencies JUCE has, it should be relatively simple to convert it to an autoconf-type system, but like I said earlier, writing autoconf scripts isn’t always as simple as it should be…

  • Niall.

#5

god I hate makefiles.

But thanks for the clear explanation - I’ll try that and see what I can do.


#6

Yeah, me too. I’ve been using the Anjuta IDE for my linux work, which hides a lot of the autoconf set up stuff. It’s not as popular as KDevelop, but it feels closer to MSVC to me, which is still my preferred coding environment.

  • Niall.

#7