Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Csound 5 status

Date2005-09-01 17:29
FromMichael Gogins
SubjectRe: [Cs-dev] Csound 5 status
It should be easy to deal with the undefined _CreateCsoundVST. Presumably, 
you have now built _CsoundVST.so or .dylib or whatever. You now need to add 
that library to your link line for csoundvst_main (and perhaps other 
libraries as well, see the Linux link line for ideas).

Regards,
Mike


----- Original Message ----- 
From: "Graham Breed" 
To: 
Sent: Thursday, September 01, 2005 8:18 AM
Subject: Re: [Cs-dev] Csound 5 status


> Michael Gogins wrote:
>> Two problems here. As you note, you're failing to link with the Python 
>> library, and you need to extend another #ifdef from LINUX to MACOSX for 
>> the threading stuff in CsoundVST's System class.
>>
>> Perhaps you can patch up custom.py to point to your Python library. 
>> Perhaps someone who's more familiar with OS X development can help with 
>> the Python linkage, or google on the Python and Mac developer lists.
>
> As it happens, I've used Swig with Python on OSX before, and you don't 
> have to specify the Python libraries at all.  What I did is add 
> "-undefined suppress -flat_namespace" when linking.  But without the 
> quotes, which get added if I do the obvious with custom.py.  Instead, this 
> works:
>
>     customSHLINKFLAGS.append('-undefined')
>     customSHLINKFLAGS.append('suppress')
>     customSHLINKFLAGS.append('-flat_namespace')
>
> Or at least appears to.  That leaves me with
>
> g++ -o CsoundVST 
> frontends/CsoundVST/csoundvst_main.o -L. -L. -L/usr/local/lib -L. -L. -lstdc++ 
>  -lpthread -lm
> ld: Undefined symbols:
> _CreateCsoundVST
>
> That's a reassuringly simple error, but at this point I have no idea what 
> do do about it.
>
>> I hope if you get this to compile, that you will either book your changes 
>> into Csound 5 CVS (if you are a Csound developer; if not, may wish to 
>> become one) or email a zip of them to me so I can merge them.
>
> I don't have developer access, and it's reassuring to know I can't 
> accidentally break anything.  How about I send the patches here?  Also, I 
> can post the full scons output, if anybody wants to check the warnings.
>
>
>                    Graham
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-09-01 22:07
FromGraham Breed
SubjectRe: [Cs-dev] Csound 5 status
Michael Gogins wrote:
> It should be easy to deal with the undefined _CreateCsoundVST. Presumably, 
> you have now built _CsoundVST.so or .dylib or whatever. You now need to add 
> that library to your link line for csoundvst_main (and perhaps other 
> libraries as well, see the Linux link line for ideas).

You mean in SConstruct?  Ah, well, that gives the right solutions to 
some of the previous problems.  I now have a CsoundVST!  And it fails to 
run like this:

csound5 ./CsoundVST
Starting CsoundVST...
Localisation of messages is disabled, using default language.
time resolution is 1000.000 ns
BEGAN Shell::runScript()...
==============================================================================================================
==============================================================================================================
PyRun_SimpleString returned 0.
ENDED Shell::runScript().
BEGAN Shell::runScript()...
==============================================================================================================
Traceback (most recent call last):
   File "", line 1, in ?
ImportError: No module named CsoundVST
==============================================================================================================
PyRun_SimpleString returned -1.
ENDED Shell::runScript().
BEGAN Shell::runScript()...
==============================================================================================================
AttributeError: 'module' object has no attribute 'csound'
==============================================================================================================
PyRun_SimpleString returned -1.
ENDED Shell::runScript().
Csound tidy up: Segmentation fault


But the build still goes on to fail with

gcc -g -O2 -DCSOUND_WITH_API -DMACOSX -Wall -DPIPES -DHAVE_FCNTL_H 
-DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_MALLOC_H -DHAVE_SYS_TIME_H 
-DHAVE_SYS_TYPES_H -DHAVE_CTYPE_H -DHAVE_TERMIOS_H -DHAVE_STRING_H 
-DHAVE_DIRENT_H -DWINDOWS -DUSE_FLTK -fPIC -DBETA -I. -IH 
-I/usr/include/malloc -I/opt/local/include/boost-1_32 -c -o 
Opcodes/py/pythonopcodes.os Opcodes/py/pythonopcodes.c
Opcodes/py/pythonopcodes.c:20:20: Python.h: No such file or directory
In file included from Opcodes/py/pythonopcodes.c:21:
Opcodes/py/pythonopcodes.h:24:20: Python.h: No such file or directory
In file included from Opcodes/py/pythonopcodes.c:22:
Opcodes/py/pythonhelper.h:24:20: Python.h: No such file or directory

and so on, with screenfuls of errors.  I'll look a this in the morning.

As it happens, I can't build the DLL for csound either.

gcc -g -O2 -DCSOUND_WITH_API -DMACOSX -Wall -DPIPES -DHAVE_FCNTL_H 
-DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_MALLOC_H -DHAVE_SYS_TIME_H 
-DHAVE_SYS_TYPES_H -DHAVE_CTYPE_H -DHAVE_TERMIOS_H -DHAVE_STRING_H 
-DHAVE_DIRENT_H -D__BUILDING_LIBCSOUND -DWINDOWS -DUSE_FLTK -fPIC -DBETA 
-I. -IH -I/usr/include/malloc -I/opt/local/include/boost-1_32 -c -o 
InOut/window.os InOut/window.c
gcc -g -O2 -DCSOUND_WITH_API -DMACOSX -Wall -DPIPES -DHAVE_FCNTL_H 
-DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_MALLOC_H -DHAVE_SYS_TIME_H 
-DHAVE_SYS_TYPES_H -DHAVE_CTYPE_H -DHAVE_TERMIOS_H -DHAVE_STRING_H 
-DHAVE_DIRENT_H -D__BUILDING_LIBCSOUND -DWINDOWS -DUSE_FLTK -fPIC -DBETA 
-I. -IH -I/usr/include/malloc -I/opt/local/include/boost-1_32 -c -o 
OOps/aops.os OOps/aops.c
scons: *** Source file: InOut/FL_graph.o is static and is not compatible 
with shared target: libcsound.dylib

I just happened to try that.


              Graham








-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-09-01 22:39
FromIstvan Varga
SubjectRe: [Cs-dev] Csound 5 status
Graham Breed wrote:

> As it happens, I can't build the DLL for csound either.
> 
> gcc -g -O2 -DCSOUND_WITH_API -DMACOSX -Wall -DPIPES -DHAVE_FCNTL_H 
> -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_MALLOC_H -DHAVE_SYS_TIME_H 
> -DHAVE_SYS_TYPES_H -DHAVE_CTYPE_H -DHAVE_TERMIOS_H -DHAVE_STRING_H 
> -DHAVE_DIRENT_H -D__BUILDING_LIBCSOUND -DWINDOWS -DUSE_FLTK -fPIC -DBETA 
> -I. -IH -I/usr/include/malloc -I/opt/local/include/boost-1_32 -c -o 
> InOut/window.os InOut/window.c
> gcc -g -O2 -DCSOUND_WITH_API -DMACOSX -Wall -DPIPES -DHAVE_FCNTL_H 
> -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_MALLOC_H -DHAVE_SYS_TIME_H 
> -DHAVE_SYS_TYPES_H -DHAVE_CTYPE_H -DHAVE_TERMIOS_H -DHAVE_STRING_H 
> -DHAVE_DIRENT_H -D__BUILDING_LIBCSOUND -DWINDOWS -DUSE_FLTK -fPIC -DBETA 
> -I. -IH -I/usr/include/malloc -I/opt/local/include/boost-1_32 -c -o 
> OOps/aops.os OOps/aops.c
> scons: *** Source file: InOut/FL_graph.o is static and is not compatible 
> with shared target: libcsound.dylib
> 
> I just happened to try that.

You have found a bug in SConstruct.
At line 621, replace this

if not ((commonEnvironment['useFLTK'] == '1' and fltkFound)):
     print 'CONFIGURATION DECISION: Not building with FLTK for graphs and widgets.'
else:
     print 'CONFIGURATION DECISION: Building with FLTK for graphs and widgets.'
     fltkEnvironment = csoundLibraryEnvironment.Copy()
     if (commonEnvironment['noFLTKThreads'] == '1'):
       fltkEnvironment.Append(CCFLAGS = ['-DNO_FLTK_THREADS'])
     libCsoundSources.append(fltkEnvironment.Object('InOut/FL_graph.cpp'))
     libCsoundSources.append(fltkEnvironment.Object('InOut/winFLTK.c'))

with

if not ((commonEnvironment['useFLTK'] == '1' and fltkFound)):
   print 'CONFIGURATION DECISION: Not building with FLTK for graphs and widgets.'
else:
   print 'CONFIGURATION DECISION: Building with FLTK for graphs and widgets.'
   fltkEnvironment = csoundLibraryEnvironment.Copy()
   if (commonEnvironment['noFLTKThreads'] == '1'):
     fltkEnvironment.Append(CCFLAGS = ['-DNO_FLTK_THREADS'])
   if (commonEnvironment['dynamicCsoundLibrary'] == '1'):
     libCsoundSources.append(fltkEnvironment.SharedObject('InOut/FL_graph.cpp'))
     libCsoundSources.append(fltkEnvironment.SharedObject('InOut/winFLTK.c'))
   else:
     libCsoundSources.append(fltkEnvironment.Object('InOut/FL_graph.cpp'))
     libCsoundSources.append(fltkEnvironment.Object('InOut/winFLTK.c'))


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net