Patches to Csound version 3.482 to get it to compile and run under Linux with glibc

Please refer to the Gutsy Stuff section of the parent directory to see the context of this work, and what I did to add things to this version of Csound.



Update 4 July:
The patch file I developed, as documented below, is now included in the effectively identical source distributions by Dave Phillips and Nicola Bernardi.  See Dave's README.Linux file, which tells you how to run "patch < Glibc.patch" to modify the three source files before compiling.  These files are:

ftp://mustec.bgsu.edu/pub/linux/  Dave Phillips' site:  Csound-3.482-Linux.src.tgz   429 Kb (440,029 bytes)   Sat Jun 06 14:33 - (note that sread.c amd diskin.c in this file have a June 7 date.)

ftp://musart.dist.unige.it/CSOUND  Nicola Bernardi's site: csound-3.482-linux.src.tar.gz  429 Kb (439,369 bytes) Sat Jun 06 02:51

For archival purposes, I have placed Dave's file here at the First Principles site:  Csound-3.482-Linux-dp.src.tgz 440,029 bytes.



The following written on 4 June:

This is an account of my attempt to get Dave Phillip's latest Linux Csound 3.482 code-base to compile and run an a glibc system: specifically a PPro running Red Hat Linux 5.0, with kernel 2.0.31,  GCC  2.7.2.3-8 and glibc 2.0.5c-10.

The site for glibc is http://www.gnu.org/software/libc/libc.html

A few days ago, Damien Miller <dmiller@ilogic.com.au> and I worked on making Dave's 3.481 release compile under glibc.  There were three files that Damien changed to get it all going.  These three files do not seem to have been altered in 3.482, so I applied Damien's patches to them, added some comments (although not enough in the MIDI receive code - I don't understand it, since I don't know the world of termios) and saved them with their original names, with the old versions clearly labelled with different names:

Then I followed the instructions in Dave's README.linux file - here saved in a right margin 70 form: README.linux-col70.txt   regarding the make process:
  I didn't see anything in Make.Variables which needed changing.  I ran "make help"

I chose not to have dynamically linked executables, to have X11 graphics, and not to have debugging or profiling.

Then I ran "make" . . .     . . . . The main Csound program compiled and linked!  I am not so sure about the other programs - there were link warnings and errors.  I only use the Csound program and am not familiar at all with the others, so I won't fuss over them here.

This new "make" arrangement looks like a wonder!

Then I pointed Ceclia's csound configuration  to this Csound executable (  1050528 bytes) and ran a module from the Cecilia tutorial. This reads a stereo .wav file and writes one.  It worked perfectly!

This proves that Damien's changes to diskin.c and wave.c were successful.  I don't have a means of testing the MIDI In at this stage.  I would imagine that the new glibc friendly code would work just as well when compiled on an earlier library, so perhaps Dave Phillips can test this out?

Here is a patch file which describes the changes made to the three files:  3files-glibc.patch  .

As they say in the classics - perhaps these patches can be incorporated in the next major release of Csound.
 
To facilitate Dave and others testing the MIDI receive code, here is the resulting Csound executable.  Since all the glibc material is staticly linked into this executable, I think that its successful operation on any system, including those with a kernel based on an earlier version of libc (such as Dave's 2.0.29?) would be reasonable proof that the changes to MIDI In are working.

csound executable1050528 bytes

- Robin
 

     

Update history