Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Csound 5 status

Date2005-09-01 02:30
FromMichael Gogins
SubjectRe: [Cs-dev] Csound 5 status
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.

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.

Regards,
Mike

-----Original Message-----
From: Graham Breed 
Sent: Aug 31, 2005 4:05 PM
To: csound-devel@lists.sourceforge.net
Subject: Re: [Cs-dev] Csound 5 status

Michael Gogins wrote:
> The "main" error occurs on some other platforms and already has an #ifdef. Try extending hat #ifdef to include DARWIN or MACOSX. I think the Linux #ifdef is the one you can use.

Unfortunately, "DARWIN" doesn't seem to be defined, which is shame as 
that leaves no way to specify a free Darwin system.  Anyway, it's happy 
with "MACOSX".  I added some "static" declarations to get round the 
other errors I was having.  The latest error, then, is:

g++-4.0 -dynamiclib -o _CsoundVST.dylib 
frontends/CsoundVST/AudioEffect.os frontends
CsoundVST/audioeffectx.os frontends/CsoundVST/Composition.os 
frontends/CsoundVST/Con
ersions.os frontends/CsoundVST/Counterpoint.os 
frontends/CsoundVST/CounterpointNode.
s frontends/CsoundVST/CppSound.os frontends/CsoundVST/CsoundFile.os 
frontends/Csound
ST/Cell.os frontends/CsoundVST/CsoundVST.os 
frontends/CsoundVST/csoundvst_api.os fro
tends/CsoundVST/CsoundVstFltk.os frontends/CsoundVST/CsoundVSTMain.os 
frontends/Csou
dVST/CsoundVstUi.os frontends/CsoundVST/Event.os 
frontends/CsoundVST/Hocket.os front
nds/CsoundVST/ImageToScore.os frontends/CsoundVST/Lindenmayer.os 
frontends/CsoundVST
MCRM.os frontends/CsoundVST/Midifile.os 
frontends/CsoundVST/MusicModel.os frontends/
soundVST/Node.os frontends/CsoundVST/Random.os 
frontends/CsoundVST/Rescale.os fronte
ds/CsoundVST/Score.os frontends/CsoundVST/ScoreNode.os 
frontends/CsoundVST/Sequence.
s frontends/CsoundVST/Shell.os frontends/CsoundVST/StrangeAttractor.os 
frontends/Cso
ndVST/System.os frontends/CsoundVST/CsoundVST_wrap.os -L. -L. 
-L/usr/local/lib -L. -
. -L/usr/local/lib -lcsound -lsndfile -lfltk_images -lpng -lz -lfltk 
-lpthread -lstd
++ -lpthread -lm
ld: Undefined symbols:
_PyRun_SimpleString
_PyErr_Print
_PyImport_ImportModule
_PyLong_AsLong
_PyObject_CallMethod
_PyObject_GetAttrString
_PySys_SetArgv
__ZN6csound6System12createThreadEPFvPvES1_i
__ZN6csound6System13parsePathnameESsRSsS1_S1_S1_
__ZN6csound6System7executeEPKc
_Py_Initialize
__ZN6csound6System14waitThreadLockEPvm
__ZN6csound6System16createThreadLockEv
__ZN6csound6System16notifyThreadLockEPv
__ZN6csound6System17destroyThreadLockEPv
_PyArg_ParseTuple
_PyCFunction_Type
_PyCObject_FromVoidPtr
_PyCObject_Import
_PyDict_SetItemString
_PyErr_Clear
_PyErr_Fetch
_PyErr_Format
_PyErr_Occurred
_PyErr_SetString
_PyExc_AttributeError
_PyExc_IOError
_PyExc_IndexError
_PyExc_MemoryError
_PyExc_NameError
_PyExc_NotImplementedError
_PyExc_OverflowError
_PyExc_RuntimeError
_PyExc_SyntaxError
_PyExc_SystemError
_PyExc_TypeError
_PyExc_ValueError
_PyExc_ZeroDivisionError
_PyFloat_FromDouble
_PyFloat_Type
_PyInt_FromLong
_PyInt_Type
_PyList_GetItem
_PyList_Size
_PyList_Type
_PyLong_AsDouble
_PyLong_AsUnsignedLong
_PyLong_FromUnsignedLong
_PyLong_Type
_PyModule_AddObject
_PyModule_GetDict
_PyOS_snprintf
_PyObject_CallObject
_PyObject_Free
_PyObject_GetAttr
_PyObject_Init
_PyObject_Malloc
_PyObject_SetAttrString
_PyObject_Size
_PyObject_Str
_PySequence_Check
_PySequence_GetItem
_PySequence_Size
_PyString_AsString
_PyString_FromFormat
_PyString_FromString
_PyString_FromStringAndSize
_PyString_Type
_PyTuple_GetItem
_PyTuple_GetSlice
_PyTuple_Size
_PyType_IsSubtype
_PyType_Type
_Py_BuildValue
_Py_InitModule4
__Py_NoneStruct
__Py_NotImplementedStruct
__Py_TrueStruct
__Py_ZeroStruct
__ZN6csound6System12getFilenamesESs
__ZN6csound6System17getDirectoryNamesESs
__ZN6csound6System25getSharedLibraryExtensionEv
__ZN6csound6System4beepEv
__ZN6csound6System5sleepEd
__ZN6csound6System9shellOpenEPKcS2_
_cpsocfrc
_mkxyFn
_rdxyFn
/usr/bin/libtool: internal link edit command failed

So it's not finding the Python libraries, among other things.


             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 13:18
FromGraham Breed
SubjectRe: [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

Date2005-09-01 22:28
FromAnthony Kozar
SubjectRe: [Cs-dev] Csound 5 status
I do not think that this is a good idea -- at least for a permanent
solution.  Using those two link flags usually indicates that you need to
create a .bundle instead of .dylib.  This is a consequence of having two
object files, each having symbols that reference each other.

But I am not sure of the solution.  I only know that using those flags
overrides some of the important features of dynamic library linking on OS X
and should generally be avoided.

Anthony


Graham Breed wrote on 9/1/05 8:18 AM:

> 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')



-------------------------------------------------------
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-02 10:20
FromGraham Breed
SubjectRe: [Cs-dev] Csound 5 status
Anthony Kozar wrote:
> I do not think that this is a good idea -- at least for a permanent
> solution.  Using those two link flags usually indicates that you need to
> create a .bundle instead of .dylib.  This is a consequence of having two
> object files, each having symbols that reference each other.
> 
> But I am not sure of the solution.  I only know that using those flags
> overrides some of the important features of dynamic library linking on OS X
> and should generally be avoided.

Don't worry, I found a better way in SConstruct.  There are some 
platform specific options that had just never been set for OSX, so I 
copied the Linux ones.


Current status: the standard build now completes!  I'll look at the 
answers in my mail this morning for setting the Python path and linking 
the dynamic Csound lib.


                 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-02 12:23
FromIstvan Varga
SubjectRe: [Cs-dev] Csound 5 status
Graham Breed wrote:

> Current status: the standard build now completes!  I'll look at the 
> answers in my mail this morning for setting the Python path and linking 
> the dynamic Csound lib.

The dynamic Csound library should already be fixed in the CVS
sources.


-------------------------------------------------------
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