Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Csound 5 status

Date2005-08-31 17:50
FromMichael Gogins
SubjectRe: [Cs-dev] Csound 5 status
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.

Regards,
Mike

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

Michael Gogins wrote:
> I would try manually editing boost/ublas/config.h. Also, try googling the ublas list.

You mean boost/numeric/ublas/config.hpp?  There's an

#if __GNUC__ >= 3 && __GNUC_MINOR__ >= 4
// By ABI definition see GCC bug id 9982
#define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
#endif

but that's no help for GCC 3.3.


I searched for the "Unknown compiler version" and the link said not to 
worry about it.  Sure enough, the version of boost I have doesn't know 
about GCC 4, but I'll stick with it anyway.

I've made some progress with these additions to custom.py:

elif sys.platform == 'darwin':
     platform = 'darwin'
     customCPPPATH.append('/usr/include/malloc')
     customCPPPATH.append('/opt/local/include/boost-1_32/')
     customCPPPATH.append('/usr/include/python2.3')

and a couple of alterations to frontends/CsoundVST/AEffect.h so that 
"#if CARBON" becomes "#if CARBON || MACOSX".  I don't know what's so 
special about Carbon here, but I'm guessing it follows from OSX.

Then, frontends/CsoundVST/CsoundVSTMain.cpp fails and as it's full of 
platform-specific #defines with no mention of MACOSX this doesn't 
surprise me.  The error is:

g++-4.0 -DCSOUND_WITH_API -fexceptions -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 -framework -framework 
-DWINDOWS -DUSE_FLTK -fPIC -DBETA -I. -IH -I/usr/include/malloc 
-I/opt/local/include/boost-1_32 -I/usr/include/python2.3 
-I/usr/local/include -I/usr/local/include -Ifrontends/CsoundVST -c -o 
frontends/CsoundVST/CsoundVSTMain.os frontends/CsoundVST/CsoundVSTMain.cpp
frontends/CsoundVST/CsoundVSTMain.cpp:32: warning: ignoring #pragma 
export on
frontends/CsoundVST/CsoundVSTMain.cpp:61: warning: ignoring #pragma 
export off
frontends/CsoundVST/CsoundVSTMain.cpp:42: error: '::main' must return 'int'
frontends/CsoundVST/CsoundVSTMain.cpp: In function `int main(long int 
(*)(AEffect*, long int, long int, long int, void*, float))':
frontends/CsoundVST/CsoundVSTMain.cpp:57: error: invalid conversion from 
'AEffect*' to 'int'


How can main be expected to return a pointer?  I don't know, but it must 
work for somebody.  Change it to an int and it compiles, but that might 
be hiding the problem rather than solving it.  Note that in Linux this 
is main_plugin, not main.


With that changed, it gets to

g++-4.0 -dynamiclib -o _CsoundVST.dylib 
frontends/CsoundVST/AudioEffect.os frontends/
CsoundVST/audioeffectx.os frontends/CsoundVST/Composition.os 
frontends/CsoundVST/Conv
ersions.os frontends/CsoundVST/Counterpoint.os 
frontends/CsoundVST/CounterpointNode.o
s frontends/CsoundVST/CppSound.os frontends/CsoundVST/CsoundFile.os 
frontends/CsoundV
ST/Cell.os frontends/CsoundVST/CsoundVST.os 
frontends/CsoundVST/csoundvst_api.os fron
tends/CsoundVST/CsoundVstFltk.os frontends/CsoundVST/CsoundVSTMain.os 
frontends/Csoun
dVST/CsoundVstUi.os frontends/CsoundVST/Event.os 
frontends/CsoundVST/Hocket.os fronte
nds/CsoundVST/ImageToScore.os frontends/CsoundVST/Lindenmayer.os 
frontends/CsoundVST/
MCRM.os frontends/CsoundVST/Midifile.os 
frontends/CsoundVST/MusicModel.os frontends/C
soundVST/Node.os frontends/CsoundVST/Random.os 
frontends/CsoundVST/Rescale.os fronten
ds/CsoundVST/Score.os frontends/CsoundVST/ScoreNode.os 
frontends/CsoundVST/Sequence.o
s frontends/CsoundVST/Shell.os frontends/CsoundVST/StrangeAttractor.os 
frontends/Csou
ndVST/System.os frontends/CsoundVST/CsoundVST_wrap.os -L. -L. 
-L/usr/local/lib -L. -L
. -L/usr/local/lib -lcsound -lsndfile -lfltk_images -lpng -lz -lfltk 
-lpthread -lstdc
++ -lpthread -lm
ld: common symbols not allowed with MH_DYLIB output format with the 
-multi_module opt
ion
ld: common symbols not allowed with MH_DYLIB output format with the 
-multi_module opt
ion
./libcsound.a(aops.o) definition of common _cpsocfrc (size 32768)
./libcsound.a(window.o) definition of common _mkxyFn (size 4)
./libcsound.a(window.o) definition of common _rdxyFn (size 4)
/usr/bin/libtool: internal link edit command failed
scons: *** [_CsoundVST.dylib] Error 1
scons: building terminated because of errors.



                   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-08-31 21:05
FromGraham Breed
SubjectRe: [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