Trying to install algoscore results in these two problems.
1- I install the program but it opens with this message
- cs.nas: Runtime error: cannot find module: csound
at lib/algoscore-driver.nas line 170
called from lib/algoscore-driver.nas line 209
called from cs.nas line 19
(and no csound classes are present)
2-(trying to install again) I get from Terminal.
Linking C executable /Users/marceloconduru/desktop/AlgoScore/algoscore
/usr/bin/ld: Undefined symbols:
_csoundCompile
_csoundCreate
_csoundDeleteChannelList
_csoundDestroy
_csoundDisposeOpcodeList
_csoundGetChannelPtr
_csoundGetHostData
_csoundGetKr
_csoundGetNchnls
_csoundGetScoreTime
_csoundGetSr
_csoundInitialize
_csoundListChannels
_csoundNewOpcodeList
_csoundPerformKsmps
_csoundPreCompile
_csoundReset
_csoundRewindScore
_csoundScoreEvent
_csoundSetDrawGraphCallback
_csoundSetIsGraphable
_csoundSetMessageCallback
_csoundSetOutputValueCallback
collect2: ld returned 1 exit status
make[2]: *** [/Users/marceloconduru/desktop/AlgoScore/algoscore] Error 1
make[1]: *** [CMakeFiles/algoscore.dir/all] Error 2
make: *** [all] Error 2
My Csound is 5.10/Intel and syst. is OSX 10.4.11.
All dependencies are installed and I'm using Cmake to build.
I've tried the .app file but it doesn't work.
Thanks for any help



Re: algoscore installation
Hi Marcelo,
You will want to check the linker options in the makefile. Perhaps they are not correct for OS X. If you see a linker option like -lcsound, that is for Linux. These are the correct options for compiling and linking on OS X with the "floats" build of Csound:
a) compiling options:
-I/Library/Frameworks/CsoundLib.Framework/Headers
b) linker options:
-framework CsoundLib
If you are using the "doubles" build of Csound, then replace "CsoundLib" with "CsoundLib64" in both of the above flags.
Good luck!
Anthony
Hi Anthony, I solve the
Hi Anthony,
I solve the problem just using - set (CMAKE_EXE_LINKER_FLAGS "-undefined dynamic_lookup"). It comes commented in the original form of CMakeList.txt.
Now all the csound classes are present - at least it appears on the pane - and the console doesn't point any missing.
All seems to be fine.
Thanks
Marcelo
No, the problem is not
No, the problem is not solved. Even with all csound classes present is not possible to run csound_bus - AS crashes. Seems to me something related with dynamic libraries.
And about the library link - on the Make file there is:
if (APPLE)
#set (CMAKE_OSX_ARCHITECTURES ppc;i386 )
#add_definitions( -I/opt/local/include ) # this shouldn't be needed
#set (CMAKE_EXE_LINKER_FLAGS "-undefined dynamic_lookup")
set (MAC_INTEGRATION TRUE)
set (MAC_INTEGRATION_SRC ige-mac-menu.c)
find_library (CARBON Carbon)
find_library (APPSERV ApplicationServices)
find_library (APPKIT AppKit)
set (MAC_INTEGRATION_LIBS ${CARBON} ${APPKIT} ${APPSERV} objc)
add_definitions( -xobjective-c )
endif ()
then comes some checking libraries and in the case of csound is:
message (STATUS "checking for Csound")
find_path (CSOUND_INCLUDE_DIR
NAMES csound.h csound/csound.h CsoundLib/csound.h
PATHS /Library/Frameworks/CsoundLib64.Framework/Headers /opt/local/include /usr/include
)
find_library (CSOUND_LIBRARY
NAMES CsoundLib64 csound CsoundLib
PATHS /Library/Frameworks/CsoundLib64.framework /opt/local/lib /usr/local/lib /usr/lib
)
Don't know if it is right but as I saw that MacPort create include and lib directories for the other dependencies, I made the same for csound and put this path option also on the make file.
But it doesn't work. AS is not linking with csound.
No, the problem is not
No, the problem is not solved. Even with all csound classes present is not possible to run csound_bus - AS crashes. Seems to me something related with dynamic libraries.
And about the library link - on the Make file there is:
if (APPLE)
#set (CMAKE_OSX_ARCHITECTURES ppc;i386 )
#add_definitions( -I/opt/local/include ) # this shouldn't be needed
#set (CMAKE_EXE_LINKER_FLAGS "-undefined dynamic_lookup")
set (MAC_INTEGRATION TRUE)
set (MAC_INTEGRATION_SRC ige-mac-menu.c)
find_library (CARBON Carbon)
find_library (APPSERV ApplicationServices)
find_library (APPKIT AppKit)
set (MAC_INTEGRATION_LIBS ${CARBON} ${APPKIT} ${APPSERV} objc)
add_definitions( -xobjective-c )
endif ()
then comes some checking libraries and in the case of csound is:
message (STATUS "checking for Csound")
find_path (CSOUND_INCLUDE_DIR
NAMES csound.h csound/csound.h CsoundLib/csound.h
PATHS /Library/Frameworks/CsoundLib64.Framework/Headers /opt/local/include /usr/include
)
find_library (CSOUND_LIBRARY
NAMES CsoundLib64 csound CsoundLib
PATHS /Library/Frameworks/CsoundLib64.framework /opt/local/lib /usr/local/lib /usr/lib
)
Don't know if it is right but as I saw that MacPort create include and lib directories for the other dependencies, I made the same for csound and put this path option also on the make file.
But it doesn't work. AS is not linking with csound.
Re: No, the problem is not
Marcelo,
I've never used AlgoScore, so I'm just shooting in the dark here. Have you tried contacting the program's author?
Here are a couple of other things I would try:
Try to find a flag for CMake that makes it print out diagnostic information and/or the actual commands that it is executing to build the program. Without knowing whether the above "find_library" check is succeeding and without seeing the exact linker command, it is difficult for me to know what it happening. (I've never used CMake either).
Also, what happens if you change this line
#set (CMAKE_EXE_LINKER_FLAGS "-undefined dynamic_lookup")
to this
set (CMAKE_EXE_LINKER_FLAGS "-framework CsoundLib64")
?
Hi Anthony. Trying this -
Hi Anthony.
Trying this - set (CMAKE_EXE_LINKER_FLAGS "-framework CsoundLib64"). Results: -- checking for Csound
-- not found. CSOUND SUPPORT DISABLED!
But I've tried Cscore on Terminal and get this message :
... remainder of line flushed
Csound tidy up: Segmentation fault
Recently I've installed Csound float - just to see if these problems have something to do with the double version. Now, as I think it's not the case, I discard the float version. But maybe it is causing the segfault. Is it making sense? I will clean all the csound files and install it again.
Solving the segfault I will try a bit more with algoscore and maybe contact the author. I just giving a look in programs that works in a upper layer of the sco file.
Thanks
Re: Hi Anthony. Trying this
Marcelo,
I am really not sure what the solution to this problem is. I guess I would have to try installing AlgoScore myself, and unfortunately I don't have time for that right now.
I am curious what you typed on the commandline to get Csound to seg fault? Did you really mean to say that you tried "Cscore"? Cscore has been known to crash with unexpected inputs. On the other hand, if the csound executable is crashing, then I would appreciate it if you could send the details to the Csound mailing list including the complete commandline typed and your CSD file.
It is possible that AlgoScore only works with either the doubles or the floats version of Csound. You'll have to check its documentation or contact its author to find out.
Best of luck,
Anthony
Csound is not crashing.
Csound is not crashing. About Cscore I've tried just on Terminal with these commands:
(after cd to dir. where is cscoremain, the code and the .sco)
gcc testb.c cscoremain.c -o testb -framework CsoundLib64 -I/Library/Frameworks/CsoundLib64.framework/Headers
then:
./testb cmaq.sco
results:
i 1) in 1.2relin4.5acter0.25 41 69 0.18 8.8 14 0.51 1
i 1 3.2 4.5 0.25 43 67 0.72 8.8 14 0.68 1s 1
remainder of line flushed
Csound tidy up: Segmentation fault
Don't know if seg fault can be caused by a problem on the code.
#include "cscore.h"
void cscore(CSOUND *cs)
{
EVENT *e; /* a pointer to an event */
EVLIST *a;
int n;
a = cscoreListGetSection(cs); /* read a score as a list of events */
for (n = 1; n <= a->nevents; n++) /*teste*/
{
e = a->e[n]; /* point to event n in event list a (linha n) */
e->p[5] *= .5; /* find pfield 5, multiply its value by .5 */
}
cscoreListPut(cs, a); /* write out the list of events */
cscorePutString(cs, "e"); /* add a "score end" statement */
}
About AS there are, in the make file, options for csound float or double. I've tried both.
Thanks
Re: Cscore crashing
Hi Marcelo,
I think everything above looks OK, except that when compiling any program that uses the Csound or Cscore API with the doubles version, you usually have to include this line before you include the Csound header
#define USE_DOUBLES 1
Since I've been maintaining Cscore, I am very curious what the problem here is. If you could send me your C file (testb.c) and the input score (cmaq.sco) that cause the crash, I will take a look. Please send them to my email address so that I can reply to you more quickly.
Thanks.
Anthony