Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:4316] Csound 5 SConstruct

Date2004-03-15 00:30
From"gogins@pipeline.com"
Subject[CSOUND-DEV:4316] Csound 5 SConstruct
In Csound 5 CVS, I have committed a _very preliminary_ SConstruct file, an
SCons build file. On my installation of Cygwin, it builds everything in
Csound CVS: Csound API library, all plugin opcodes, all utilities, console
Csound, and CsoundVST plugin and front end. The CsoundVST front end runs,
but does not render Csound files and is hard to debug. Csound renders
trapped to soundfile and to real-time audio, and the FLTK graphs work.

On my installation of Fedora Core Linux, it builds all the above except for
the CsoundVST plugin and front end.

Much remains to be done before a valid comparison with autotools can be
made:

- Create a working custom.py for dependency header and library locations,
especially on Windows. Currently too many library and header paths are
hard-coded.

- Add rules for building packages for distribution.

- Get the mingw and Visual C++ configurations working.

However, I feel that my favorable first impression of SCons has been
confirmed: that it is essentially as powerful as autotools -- but easier to
understand, easier to work with, less likely to break, and it builds
projects faster. 

Particularly gratifying is that building Windows DLLs with gcc is cake.

Anybody who wants to play around with this alpha build system should go to
www.scons.org, download and install it, look at the User's Guide, and try
it out.



--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .

Date2004-03-15 05:52
Fromstevenyi
Subject[CSOUND-DEV:4317] Re: Csound 5 SConstruct
Hi Michael,

In the middle of trying this SCons stuff out.  The SConstruct looks very
easy to work with (then again, I like reading python code).  =)  I had
to change a line:

if commonEnvironment['buildCsoundVST'] == 1 and boostFound and
fltkFound:

instead of:

if commonEnvironment['buildCsoundVST'] and boostFound and fltkFound:

as the second line didn't recognize if I passed buildCsoundVST=0 at the
commandline and thus was trying to build CsoundVST and failing
everytime.  (I've checked that change in.)

I received this error with Flgraph.cpp:

g++
-DCSOUND_WITH_API-DLINUX-g-O2-Wall-DPIPES-DHAVE_FCNTL_H-DHAVE_UNISTED_H-DHAVE_MALLOC_H-DHAVE_SGTTY_H-DHAVE_SYS_IOCTL_H-DHAVE_SYS_TIME_H-DHAVE_TERMIOS_H-DHAVE_STRING_H-DHAVE_STRINGS_H-DRTAUDIO-DWINDOWS-DUSE_FLTK -DBETA -I. -IH -I/usr/local/include -I/usr/include -c -o InOut/FL_graph.o InOut/FL_graph.cpp
:5:16: warning: ISO C requires whitespace after the macro
name
InOut/FL_graph.cpp: In function `void add_graph(WINDAT*)':
InOut/FL_graph.cpp:197: error: `memcpy' undeclared (first use this
function)
InOut/FL_graph.cpp:197: error: (Each undeclared identifier is reported
only
   once for each function it appears in.)
InOut/FL_graph.cpp:201: error: `strcmp' undeclared (first use this
function)
InOut/FL_graph.cpp:219: error: `strlen' undeclared (first use this
function)
InOut/FL_graph.cpp:220: error: `strcpy' undeclared (first use this
function)
scons: *** [InOut/FL_graph.o] Error 1
scons: building terminated because of errors.


which I'm assuming will be fixed with the config.py you mentioned in
your note, yes?  For the time being I removed the #ifdef check and
included string.h regardless to get past that.

Oh, I see now... It seems that you have no spaces before or after the
something in environment.Append(CCFLAGS = "-Dsomething") and all of
those flags are getting appended to each other without space.  The
manual seems to have " -Dsomething" when appending and "-Dsomething "
when using Prepend().  I'll see if that gets me past the other problem
I'm getting:

:4:16: warning: ISO C requires whitespace after the macro
name
gcc
-DCSOUND_WITH_API-DLINUX-g-O2-Wall-DPIPES-DHAVE_FCNTL_H-DHAVE_UNISTED_H-DHAVE_MALLOC_H-DHAVE_SGTTY_H-DHAVE_SYS_IOCTL_H-DHAVE_SYS_TIME_H-DHAVE_TERMIOS_H-DHAVE_STRING_H-DHAVE_STRINGS_H-DRTAUDIO-DWINDOWS-DUSE_FLTK -DBETA -I. -IH -I/usr/local/include -I/usr/include -c -o OOps/mididevice.o OOps/mididevice.c
:4:16: warning: ISO C requires whitespace after the macro
name
OOps/mididevice.c: In function `OpenMIDIDevice':
OOps/mididevice.c:400: error: `TIOCGETP' undeclared (first use in this
function)OOps/mididevice.c:400: error: (Each undeclared identifier is
reported only once
OOps/mididevice.c:400: error: for each function it appears in.)
OOps/mididevice.c:401: error: invalid use of undefined type `struct
sgttyb'
OOps/mididevice.c:401: error: `EXTB' undeclared (first use in this
function)
OOps/mididevice.c:402: error: invalid use of undefined type `struct
sgttyb'
OOps/mididevice.c:402: error: `RAW' undeclared (first use in this
function)
OOps/mididevice.c:404: error: `TIOCSETP' undeclared (first use in this
function)OOps/mididevice.c: At top level:
OOps/mididevice.c:126: error: storage size of `tty' isn't known
scons: *** [OOps/mididevice.o] Error 1
scons: building terminated because of errors.

  
I'm going to keep working on the build file a little on my side to see
if I can get a full build (Sorry, forgot to mention this was on Fedora
Core Linux, python 2.2.3, scons 0.93, gcc 3.3.2).  My first impressions:

1)I like the SConstruct file's syntax.  It's easy for me to read, but
then again, as mentioned before, I really like python.

2)When running SCons, it seems to do a dependency check each time it
runs.  Not a big deal though, because:

3)Building with SCons is very fast!  It's seems to breeze by much
quicker than with Autotools or handbuilt Makefile (this observation is
completely subjective).

Thanks very much for checking this in.  All things aside, the build time
is really the part that surprised me the most.  Will write more later as
I spend more time with it.

steven




On Sun, 2004-03-14 at 16:30, gogins@pipeline.com wrote:
> In Csound 5 CVS, I have committed a _very preliminary_ SConstruct file, an
> SCons build file. On my installation of Cygwin, it builds everything in
> Csound CVS: Csound API library, all plugin opcodes, all utilities, console
> Csound, and CsoundVST plugin and front end. The CsoundVST front end runs,
> but does not render Csound files and is hard to debug. Csound renders
> trapped to soundfile and to real-time audio, and the FLTK graphs work.
> 
> On my installation of Fedora Core Linux, it builds all the above except for
> the CsoundVST plugin and front end.
> 
> Much remains to be done before a valid comparison with autotools can be
> made:
> 
> - Create a working custom.py for dependency header and library locations,
> especially on Windows. Currently too many library and header paths are
> hard-coded.
> 
> - Add rules for building packages for distribution.
> 
> - Get the mingw and Visual C++ configurations working.
> 
> However, I feel that my favorable first impression of SCons has been
> confirmed: that it is essentially as powerful as autotools -- but easier to
> understand, easier to work with, less likely to break, and it builds
> projects faster. 
> 
> Particularly gratifying is that building Windows DLLs with gcc is cake.
> 
> Anybody who wants to play around with this alpha build system should go to
> www.scons.org, download and install it, look at the User's Guide, and try
> it out.
> 
> 
> 
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
> 
> 
> 

Date2004-03-15 07:12
Fromstevenyi
Subject[CSOUND-DEV:4318] Re: Csound 5 SConstruct
Nevermind about the spaces in Append: I upgraded SCons to 0.95.1 using
the RPM on the Scons Sourceforge download and the need for spaces was
something i guess was changed between the version I had and this one.  

Now I've come back to last I was when working with Autotools (not bad
considering it was just a couple of hours to get to this point).  I
tried building PortAudio with Jack a while back to see if I could use
that facility with Csound.  However, that also means that when compiling
against libportaudio, libjack is required.  This makes it tricky in
terms of auto-configuring for portaudio.  I don't believe port audio
builds a portaudio-config shell script as most other autotools project
does, so it I'm not sure how to proceed with putting in an automatic
test.  For the time being, I've put in a commandline flag (useJack=1) to
add the jack library. (I've checked in the change.)

Besides that, I'm happy to say that everything seems to have compiled
like a champ.  Fantastic!  My experience of this has been extremely
positive. 

Thanks!
steven