Re: [Cs-dev] Sugar on a Stick - and OLPCsound

View: New views
8 Messages — Rating Filter:   Alert me  

Re: [Cs-dev] Sugar on a Stick - and OLPCsound

by Art Hunkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

5.08 works with python2.5 but not with python2.6

With SoaS, I imported 2.5 to sit alongside 2.6; 5.08 still didn't work =
(though I didn't really expect it to).

I'm still waiting for 5.10 to be available to Soas; when it is, I'll =
report whether it works with 2.6 (as I *do* expect).

If it does, I'm going to make a strong plea that future versions of =
Csound (I gather, the API) be made independent of python version.

With Sugar, we'll have little or no control over what version of python =
is installed at any given time. If we want to write Csound Activities =
using python (as is usual), Csound will need to adapt to whatever python =
is present.

Either that, or Sugar and Csound will continue to have compatibility =
issues (which will strictly limit its viability).

Art Hunkins
  ----- Original Message -----=20
  From: victor=20
  To: Art Hunkins ; Developer discussions=20
  Sent: Wednesday, July 01, 2009 1:36 PM
  Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound


  Because the 5.10 rpm has a python2.6 dependency. But that might
  be the case for 5.08 too (I am not sure).
    ----- Original Message -----=20
    From: Art Hunkins=20
    To: Developer discussions=20
    Sent: Tuesday, June 30, 2009 2:22 AM
    Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound


    I just noticed that the current OLPC build includes Python 2.5, =
whereas SoaS includes Python 2.6

    Csound 5.08.91 is currently in both. Wouldn't this explain why =
5.08.91 doesn't work on SoaS? And why 5.10 should?

    Art Hunkins
      ----- Original Message -----=20
      From: Victor.Lazzarini@...=20
      To: Developer discussions=20
      Sent: Monday, June 29, 2009 5:38 PM
      Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound


      The message is strange, but it does not say there is a Python
      version mismatch. However, having said that, the 5.08.91
      rpm was built with 2.5 (unless what you have there is another
      build that somehow uses 2.6).=20

      What the message says is that the library module Python
      tried to load does not have one of the API functions. The
      reason for this I don't know.

      Victor



Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Re: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

by Michael Gogins-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As I have mentioned several times on this list, making the Csound API
independent of the Python version is not practical.

We use SWIG to generate the Python wrapper, because it saves a simply
enormous amount of work to do so. Using SWIG also makes it easy to
generate two of the other wrappers: the Lua API and the Java API (the
Lisp API is done with cffi, which is different).

SWIG, however, makes the Python wrapper depend on the specific version
of Python.

The alternatives to using SWIG are basically boost::python, ctypes,
and hand-coding the wrappers in C. My limited experience with
boost::python is that it is not much less work than hand-coding, and
harder to maintain. I have a reasonable amount of experience with both
ctypes, and hand-coding Python wrappers in C. If I had to choose one
of these three, it would be ctypes because it is completely done in
the actual Python code and seems to work well.

I know from experience that hand-coding C wrappers and using ctypes
involves about the same amount of work to get the same sort of
results.

The code that SWIG generates is, naturally, very comparable to what a
good programmer would do by hand. If you want to see how much work
that would be, look at the sizes of the files generated by SWIG. They
are the largest source code files in the entire system, by a large
margin (they are not in CVS, you have to run SWIG to get them).

There are two modules that get Python wrappers in Csound: csnd and
CsoundAC. I estimate that hand-coding wrappers even for csnd would
take a man-month at least. CsoundAC is several times as complex as
csnd.

I am simply not willing to do that amount of work when what we are
currently doing works very well indeed except for this version
independence thing, which I admit is an annoyance.

If anyone has a better idea, some other wrapper system that is
automatic but version-independent, I'd be glad to hear it.

Hope this helps,
Mike

On 7/2/09, Art Hunkins <abhunkin@...> wrote:

> 5.08 works with python2.5 but not with python2.6
>
> With SoaS, I imported 2.5 to sit alongside 2.6; 5.08 still didn't work =
> (though I didn't really expect it to).
>
> I'm still waiting for 5.10 to be available to Soas; when it is, I'll =
> report whether it works with 2.6 (as I *do* expect).
>
> If it does, I'm going to make a strong plea that future versions of =
> Csound (I gather, the API) be made independent of python version.
>
> With Sugar, we'll have little or no control over what version of python =
> is installed at any given time. If we want to write Csound Activities =
> using python (as is usual), Csound will need to adapt to whatever python =
> is present.
>
> Either that, or Sugar and Csound will continue to have compatibility =
> issues (which will strictly limit its viability).
>
> Art Hunkins
>   ----- Original Message -----=20
>   From: victor=20
>   To: Art Hunkins ; Developer discussions=20
>   Sent: Wednesday, July 01, 2009 1:36 PM
>   Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
>
>
>   Because the 5.10 rpm has a python2.6 dependency. But that might
>   be the case for 5.08 too (I am not sure).
>     ----- Original Message -----=20
>     From: Art Hunkins=20
>     To: Developer discussions=20
>     Sent: Tuesday, June 30, 2009 2:22 AM
>     Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
>
>
>     I just noticed that the current OLPC build includes Python 2.5, =
> whereas SoaS includes Python 2.6
>
>     Csound 5.08.91 is currently in both. Wouldn't this explain why =
> 5.08.91 doesn't work on SoaS? And why 5.10 should?
>
>     Art Hunkins
>       ----- Original Message -----=20
>       From: Victor.Lazzarini@...=20
>       To: Developer discussions=20
>       Sent: Monday, June 29, 2009 5:38 PM
>       Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
>
>
>       The message is strange, but it does not say there is a Python
>       version mismatch. However, having said that, the 5.08.91
>       rpm was built with 2.5 (unless what you have there is another
>       build that somehow uses 2.6).=20
>
>       What the message says is that the library module Python
>       tried to load does not have one of the API functions. The
>       reason for this I don't know.
>
>       Victor
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@... with body "unsubscribe
> csound"
>


--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Re: Re: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

by Felipe Sateler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There is always the option of building csound n times for n python
versions. A pain in the ass, I agree, but is the least work I think.

On 03/07/2009, Michael Gogins <michael.gogins@...> wrote:

> As I have mentioned several times on this list, making the Csound API
> independent of the Python version is not practical.
>
> We use SWIG to generate the Python wrapper, because it saves a simply
> enormous amount of work to do so. Using SWIG also makes it easy to
> generate two of the other wrappers: the Lua API and the Java API (the
> Lisp API is done with cffi, which is different).
>
> SWIG, however, makes the Python wrapper depend on the specific version
> of Python.
>
> The alternatives to using SWIG are basically boost::python, ctypes,
> and hand-coding the wrappers in C. My limited experience with
> boost::python is that it is not much less work than hand-coding, and
> harder to maintain. I have a reasonable amount of experience with both
> ctypes, and hand-coding Python wrappers in C. If I had to choose one
> of these three, it would be ctypes because it is completely done in
> the actual Python code and seems to work well.
>
> I know from experience that hand-coding C wrappers and using ctypes
> involves about the same amount of work to get the same sort of
> results.
>
> The code that SWIG generates is, naturally, very comparable to what a
> good programmer would do by hand. If you want to see how much work
> that would be, look at the sizes of the files generated by SWIG. They
> are the largest source code files in the entire system, by a large
> margin (they are not in CVS, you have to run SWIG to get them).
>
> There are two modules that get Python wrappers in Csound: csnd and
> CsoundAC. I estimate that hand-coding wrappers even for csnd would
> take a man-month at least. CsoundAC is several times as complex as
> csnd.
>
> I am simply not willing to do that amount of work when what we are
> currently doing works very well indeed except for this version
> independence thing, which I admit is an annoyance.
>
> If anyone has a better idea, some other wrapper system that is
> automatic but version-independent, I'd be glad to hear it.
>
> Hope this helps,
> Mike
>
> On 7/2/09, Art Hunkins <abhunkin@...> wrote:
> > 5.08 works with python2.5 but not with python2.6
> >
> > With SoaS, I imported 2.5 to sit alongside 2.6; 5.08 still didn't work =
> > (though I didn't really expect it to).
> >
> > I'm still waiting for 5.10 to be available to Soas; when it is, I'll =
> > report whether it works with 2.6 (as I *do* expect).
> >
> > If it does, I'm going to make a strong plea that future versions of =
> > Csound (I gather, the API) be made independent of python version.
> >
> > With Sugar, we'll have little or no control over what version of python =
> > is installed at any given time. If we want to write Csound Activities =
> > using python (as is usual), Csound will need to adapt to whatever python =
> > is present.
> >
> > Either that, or Sugar and Csound will continue to have compatibility =
> > issues (which will strictly limit its viability).
> >
> > Art Hunkins
> >   ----- Original Message -----=20
> >   From: victor=20
> >   To: Art Hunkins ; Developer discussions=20
> >   Sent: Wednesday, July 01, 2009 1:36 PM
> >   Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
> >
> >
> >   Because the 5.10 rpm has a python2.6 dependency. But that might
> >   be the case for 5.08 too (I am not sure).
> >     ----- Original Message -----=20
> >     From: Art Hunkins=20
> >     To: Developer discussions=20
> >     Sent: Tuesday, June 30, 2009 2:22 AM
> >     Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
> >
> >
> >     I just noticed that the current OLPC build includes Python 2.5, =
> > whereas SoaS includes Python 2.6
> >
> >     Csound 5.08.91 is currently in both. Wouldn't this explain why =
> > 5.08.91 doesn't work on SoaS? And why 5.10 should?
> >
> >     Art Hunkins
> >       ----- Original Message -----=20
> >       From: Victor.Lazzarini@...=20
> >       To: Developer discussions=20
> >       Sent: Monday, June 29, 2009 5:38 PM
> >       Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
> >
> >
> >       The message is strange, but it does not say there is a Python
> >       version mismatch. However, having said that, the 5.08.91
> >       rpm was built with 2.5 (unless what you have there is another
> >       build that somehow uses 2.6).=20
> >
> >       What the message says is that the library module Python
> >       tried to load does not have one of the API functions. The
> >       reason for this I don't know.
> >
> >       Victor
> >
> >
> >
> > Send bugs reports to this list.
> > To unsubscribe, send email sympa@... with body "unsubscribe
> > csound"
> >
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@... with body "unsubscribe csound"
>


--

Saludos,
Felipe Sateler


Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Re: Re: Re: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

by Art Hunkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Unfortunately, this still leaves the Sugar on a Stick folks (as well as
OLPC) with the challenge of making sure that the Python version they include
and *update/upgrade* always corresponds to the appropriate Csound version.

(Right now I'm having a difficult time getting Python2.6 and Csound5.10
working together in SoaS. I'm about to try a complete reinstall.)

Art Hunkins

----- Original Message -----
From: "Felipe Sateler" <fsateler@...>
To: <csound@...>
Sent: Thursday, July 02, 2009 11:22 PM
Subject: [Csnd] Re: Re: Re: [Cs-dev] Sugar on a Stick - and OLPCsound


> There is always the option of building csound n times for n python
> versions. A pain in the ass, I agree, but is the least work I think.
>
> On 03/07/2009, Michael Gogins <michael.gogins@...> wrote:
>> As I have mentioned several times on this list, making the Csound API
>> independent of the Python version is not practical.
>>
>> We use SWIG to generate the Python wrapper, because it saves a simply
>> enormous amount of work to do so. Using SWIG also makes it easy to
>> generate two of the other wrappers: the Lua API and the Java API (the
>> Lisp API is done with cffi, which is different).
>>
>> SWIG, however, makes the Python wrapper depend on the specific version
>> of Python.
>>
>> The alternatives to using SWIG are basically boost::python, ctypes,
>> and hand-coding the wrappers in C. My limited experience with
>> boost::python is that it is not much less work than hand-coding, and
>> harder to maintain. I have a reasonable amount of experience with both
>> ctypes, and hand-coding Python wrappers in C. If I had to choose one
>> of these three, it would be ctypes because it is completely done in
>> the actual Python code and seems to work well.
>>
>> I know from experience that hand-coding C wrappers and using ctypes
>> involves about the same amount of work to get the same sort of
>> results.
>>
>> The code that SWIG generates is, naturally, very comparable to what a
>> good programmer would do by hand. If you want to see how much work
>> that would be, look at the sizes of the files generated by SWIG. They
>> are the largest source code files in the entire system, by a large
>> margin (they are not in CVS, you have to run SWIG to get them).
>>
>> There are two modules that get Python wrappers in Csound: csnd and
>> CsoundAC. I estimate that hand-coding wrappers even for csnd would
>> take a man-month at least. CsoundAC is several times as complex as
>> csnd.
>>
>> I am simply not willing to do that amount of work when what we are
>> currently doing works very well indeed except for this version
>> independence thing, which I admit is an annoyance.
>>
>> If anyone has a better idea, some other wrapper system that is
>> automatic but version-independent, I'd be glad to hear it.
>>
>> Hope this helps,
>> Mike
>>
>> On 7/2/09, Art Hunkins <abhunkin@...> wrote:
>> > 5.08 works with python2.5 but not with python2.6
>> >
>> > With SoaS, I imported 2.5 to sit alongside 2.6; 5.08 still didn't work
>> > =
>> > (though I didn't really expect it to).
>> >
>> > I'm still waiting for 5.10 to be available to Soas; when it is, I'll =
>> > report whether it works with 2.6 (as I *do* expect).
>> >
>> > If it does, I'm going to make a strong plea that future versions of =
>> > Csound (I gather, the API) be made independent of python version.
>> >
>> > With Sugar, we'll have little or no control over what version of python
>> > =
>> > is installed at any given time. If we want to write Csound Activities =
>> > using python (as is usual), Csound will need to adapt to whatever
>> > python =
>> > is present.
>> >
>> > Either that, or Sugar and Csound will continue to have compatibility =
>> > issues (which will strictly limit its viability).
>> >
>> > Art Hunkins
>> >   ----- Original Message -----=20
>> >   From: victor=20
>> >   To: Art Hunkins ; Developer discussions=20
>> >   Sent: Wednesday, July 01, 2009 1:36 PM
>> >   Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
>> >
>> >
>> >   Because the 5.10 rpm has a python2.6 dependency. But that might
>> >   be the case for 5.08 too (I am not sure).
>> >     ----- Original Message -----=20
>> >     From: Art Hunkins=20
>> >     To: Developer discussions=20
>> >     Sent: Tuesday, June 30, 2009 2:22 AM
>> >     Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
>> >
>> >
>> >     I just noticed that the current OLPC build includes Python 2.5, =
>> > whereas SoaS includes Python 2.6
>> >
>> >     Csound 5.08.91 is currently in both. Wouldn't this explain why =
>> > 5.08.91 doesn't work on SoaS? And why 5.10 should?
>> >
>> >     Art Hunkins
>> >       ----- Original Message -----=20
>> >       From: Victor.Lazzarini@...=20
>> >       To: Developer discussions=20
>> >       Sent: Monday, June 29, 2009 5:38 PM
>> >       Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
>> >
>> >
>> >       The message is strange, but it does not say there is a Python
>> >       version mismatch. However, having said that, the 5.08.91
>> >       rpm was built with 2.5 (unless what you have there is another
>> >       build that somehow uses 2.6).=20
>> >
>> >       What the message says is that the library module Python
>> >       tried to load does not have one of the API functions. The
>> >       reason for this I don't know.
>> >
>> >       Victor
>> >
>> >
>> >
>> > Send bugs reports to this list.
>> > To unsubscribe, send email sympa@... with body
>> > "unsubscribe
>> > csound"
>> >
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@... with body "unsubscribe
>> csound"
>>
>
>
> --
>
> Saludos,
> Felipe Sateler
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@... with body "unsubscribe
> csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Parent Message unknown Re: [Cs-dev] Sugar on a Stick - and OLPCsound

by Art Hunkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Here's the *next* chapter in the saga. Please note that this is not the *Windows* installation saga; it's the *Linux/Sugar* installation saga.
 
In our last episode, we noted that Csound5.08 was (apparently?) incompatible with python2.6. At least this seemed a plausible explanation from the error log we saw.
 
So, now Csound5.10 is available on Fedora(11) for download to SoaS.
 
First, I try update csound; "can't find any csound".
Second, install csound; it tries, but then says, "can't because it interferes with olpcsound" (OK, different name!)
Third, erase olpcsound; good
Fourth, install csound; good
 
Then I run my Activity; it now crashes with the similar, but not exact, error log below.
 
I thought perhaps I'd better start from scratch and did (reformat USB drive, etc). Thought probably the new SoaS iso incorporated Csound5.10. But no, I needed to essentially repeat the above steps, and ended with the same crash.
 
The log: (any new ideas please?)
 

/usr/lib/python2.6/site-packages/sugar/util.py:25: DeprecationWarning: the sha module is deprecated; use the hashlib module instead

import sha

Traceback (most recent call last):

File "/usr/bin/sugar-activity", line 21, in <module>

main.main()

File "/usr/lib/python2.6/site-packages/sugar/activity/main.py", line 105, in main

module = __import__(module_name)

File "/home/liveuser/Activities/OurMusic.activity/ourmusic.py", line 41, in <module>

import csndsugui

File "/home/liveuser/Activities/OurMusic.activity/csndsugui.py", line 36, in <module>

import csnd

ImportError: No module named csnd

 

Art Hunkins

----- Original Message -----
Sent: Wednesday, July 01, 2009 1:36 PM
Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

Because the 5.10 rpm has a python2.6 dependency. But that might
be the case for 5.08 too (I am not sure).
----- Original Message -----
Sent: Tuesday, June 30, 2009 2:22 AM
Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

I just noticed that the current OLPC build includes Python 2.5, whereas SoaS includes Python 2.6
 
Csound 5.08.91 is currently in both. Wouldn't this explain why 5.08.91 doesn't work on SoaS? And why 5.10 should?
 
Art Hunkins
----- Original Message -----
Sent: Monday, June 29, 2009 5:38 PM
Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

The message is strange, but it does not say there is a Python
version mismatch. However, having said that, the 5.08.91
rpm was built with 2.5 (unless what you have there is another
build that somehow uses 2.6).

What the message says is that the library module Python
tried to load does not have one of the API functions. The
reason for this I don't know.

Victor

----- Original Message -----
From: Art Hunkins <abhunkin@...>
Date: Monday, June 29, 2009 10:19 pm
Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
To: csound-devel@...

> Victor, Brian and Mike G. -
>
> I'd like to ask again regarding this SoaS log, and what it
> suggests about
> the crash of my OurMusic activity.
>
> The version of Csound is 5.08.91, libsndfile is 1.0.17. And as
> you can see
> Python 2.6 and libcsnd.so.5.1 are referenced in the log.
>
> Is the difficulty incompatible versions of Python and/or
> libsndfile/libcsnd.so.5.1?
>
> A member of the sugar-devel list suggested that the problem
> might well be
> solved with Csound5.10 (Fedora 11) which will be available
> through yum
> update later this week. (It's apparently ready to go.) What do
> you imagine?
>
> The log:
>
> /usr/lib/python2.6/site-packages/sugar/util.py:25:
> DeprecationWarning: the
> sha module is deprecated; use the hashlib module instead
>
> import sha
>
> Traceback (most recent call last):
>
> File "/usr/bin/sugar-activity", line 21, in <module>
>
> main.main()
>
> File "/usr/lib/python2.6/site-packages/sugar/activity/main.py",
> line 105, in
> main
>
> module = __import__(module_name)
>
> File "/home/liveuser/Activities/OurMusic.activity/ourmusic.py",
> line 41, in
> <module>
>
> import csndsugui
>
> File "/home/liveuser/Activities/OurMusic.activity/csndsugui.py",
> line 36, in
> <module>
>
> import csnd
>
> File "/usr/lib/python2.6/site-packages/csnd.py", line 7, in
> <module>
> import _csnd
>
> ImportError: /usr/lib/libcsnd.so.5.1: undefined symbol:
> csoundGetInputBuffer
>
>
> Thanks -
>
> Art Hunkins
>
>
> -----------------------------------------------------------------
> -------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
National University of Ireland, Maynooth


------------------------------------------------------------------------------


_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------


_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------


_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Parent Message unknown Re: [Cs-dev] Sugar on a Stick - and OLPCsound

by Art Hunkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I've just noted that the /usr/lib/python2.6/site-packages folder does not include csnd.py. That folder also contains many fewer files that the corresponding one in python2.5.
 
As a matter of fact, python2.5 seems about a third the size of 2.6. Is all this correct?
 
Art Hunkins
----- Original Message -----
Sent: Friday, July 03, 2009 6:13 PM
Subject: Fw: [Cs-dev] Sugar on a Stick - and OLPCsound

Hello, Peter,
 
Do you know what may be happening here? (Please see error log below.)
 
I've no idea why the module referenced (csd.py) is not found. Please also compare the log at the very bottom of this mail; this latter log was generated when running Csound*5.08*, also with python2.6.
 
Thanks for any insights.
 
Art Hunkins
 
----- Original Message -----
Sent: Friday, July 03, 2009 5:36 PM
Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

Here's the *next* chapter in the saga. Please note that this is not the *Windows* installation saga; it's the *Linux/Sugar* installation saga.
 
In our last episode, we noted that Csound5.08 was (apparently?) incompatible with python2.6. At least this seemed a plausible explanation from the error log we saw.
 
So, now Csound5.10 is available on Fedora(11) for download to SoaS.
 
First, I try update csound; "can't find any csound".
Second, install csound; it tries, but then says, "can't because it interferes with olpcsound" (OK, different name!)
Third, erase olpcsound; good
Fourth, install csound; good
 
Then I run my Activity; it now crashes with the similar, but not exact, error log below.
 
I thought perhaps I'd better start from scratch and did (reformat USB drive, etc). Thought probably the new SoaS iso incorporated Csound5.10. But no, I needed to essentially repeat the above steps, and ended with the same crash.
 
The log: (any new ideas please?)
 

/usr/lib/python2.6/site-packages/sugar/util.py:25: DeprecationWarning: the sha module is deprecated; use the hashlib module instead

import sha

Traceback (most recent call last):

File "/usr/bin/sugar-activity", line 21, in <module>

main.main()

File "/usr/lib/python2.6/site-packages/sugar/activity/main.py", line 105, in main

module = __import__(module_name)

File "/home/liveuser/Activities/OurMusic.activity/ourmusic.py", line 41, in <module>

import csndsugui

File "/home/liveuser/Activities/OurMusic.activity/csndsugui.py", line 36, in <module>

import csnd

ImportError: No module named csnd

 

Art Hunkins

----- Original Message -----
Sent: Wednesday, July 01, 2009 1:36 PM
Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

Because the 5.10 rpm has a python2.6 dependency. But that might
be the case for 5.08 too (I am not sure).
----- Original Message -----
Sent: Tuesday, June 30, 2009 2:22 AM
Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

I just noticed that the current OLPC build includes Python 2.5, whereas SoaS includes Python 2.6
 
Csound 5.08.91 is currently in both. Wouldn't this explain why 5.08.91 doesn't work on SoaS? And why 5.10 should?
 
Art Hunkins
----- Original Message -----
Sent: Monday, June 29, 2009 5:38 PM
Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

The message is strange, but it does not say there is a Python
version mismatch. However, having said that, the 5.08.91
rpm was built with 2.5 (unless what you have there is another
build that somehow uses 2.6).

What the message says is that the library module Python
tried to load does not have one of the API functions. The
reason for this I don't know.

Victor

----- Original Message -----
From: Art Hunkins <abhunkin@...>
Date: Monday, June 29, 2009 10:19 pm
Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
To: csound-devel@...

> Victor, Brian and Mike G. -
>
> I'd like to ask again regarding this SoaS log, and what it
> suggests about
> the crash of my OurMusic activity.
>
> The version of Csound is 5.08.91, libsndfile is 1.0.17. And as
> you can see
> Python 2.6 and libcsnd.so.5.1 are referenced in the log.
>
> Is the difficulty incompatible versions of Python and/or
> libsndfile/libcsnd.so.5.1?
>
> A member of the sugar-devel list suggested that the problem
> might well be
> solved with Csound5.10 (Fedora 11) which will be available
> through yum
> update later this week. (It's apparently ready to go.) What do
> you imagine?
>
> The log:
>
> /usr/lib/python2.6/site-packages/sugar/util.py:25:
> DeprecationWarning: the
> sha module is deprecated; use the hashlib module instead
>
> import sha
>
> Traceback (most recent call last):
>
> File "/usr/bin/sugar-activity", line 21, in <module>
>
> main.main()
>
> File "/usr/lib/python2.6/site-packages/sugar/activity/main.py",
> line 105, in
> main
>
> module = __import__(module_name)
>
> File "/home/liveuser/Activities/OurMusic.activity/ourmusic.py",
> line 41, in
> <module>
>
> import csndsugui
>
> File "/home/liveuser/Activities/OurMusic.activity/csndsugui.py",
> line 36, in
> <module>
>
> import csnd
>
> File "/usr/lib/python2.6/site-packages/csnd.py", line 7, in
> <module>
> import _csnd
>
> ImportError: /usr/lib/libcsnd.so.5.1: undefined symbol:
> csoundGetInputBuffer
>
>
> Thanks -
>
> Art Hunkins
>
>
> -----------------------------------------------------------------
> -------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
National University of Ireland, Maynooth


------------------------------------------------------------------------------


_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------


_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------


_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------


_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Re: Re: Re: Re: [Cs-dev] Sugar on a Stick - and OLPCsound

by Felipe Sateler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It should be possible (and I intend to do this for the debian packages
of csound, when I get enough time), to build csound for each version
of python *and ship them all* in the installer. This way, the
installed python version will get loaded and the other ones will fail
to, thus providing python "version independence".

Saludos,
Felipe Sateler



On Fri, Jul 3, 2009 at 23:44, Art Hunkins<abhunkin@...> wrote:

> Unfortunately, this still leaves the Sugar on a Stick folks (as well as
> OLPC) with the challenge of making sure that the Python version they include
> and *update/upgrade* always corresponds to the appropriate Csound version.
>
> (Right now I'm having a difficult time getting Python2.6 and Csound5.10
> working together in SoaS. I'm about to try a complete reinstall.)
>
> Art Hunkins
>
> ----- Original Message ----- From: "Felipe Sateler" <fsateler@...>
> To: <csound@...>
> Sent: Thursday, July 02, 2009 11:22 PM
> Subject: [Csnd] Re: Re: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
>
>
>> There is always the option of building csound n times for n python
>> versions. A pain in the ass, I agree, but is the least work I think.
>>
>> On 03/07/2009, Michael Gogins <michael.gogins@...> wrote:
>>>
>>> As I have mentioned several times on this list, making the Csound API
>>> independent of the Python version is not practical.
>>>
>>> We use SWIG to generate the Python wrapper, because it saves a simply
>>> enormous amount of work to do so. Using SWIG also makes it easy to
>>> generate two of the other wrappers: the Lua API and the Java API (the
>>> Lisp API is done with cffi, which is different).
>>>
>>> SWIG, however, makes the Python wrapper depend on the specific version
>>> of Python.
>>>
>>> The alternatives to using SWIG are basically boost::python, ctypes,
>>> and hand-coding the wrappers in C. My limited experience with
>>> boost::python is that it is not much less work than hand-coding, and
>>> harder to maintain. I have a reasonable amount of experience with both
>>> ctypes, and hand-coding Python wrappers in C. If I had to choose one
>>> of these three, it would be ctypes because it is completely done in
>>> the actual Python code and seems to work well.
>>>
>>> I know from experience that hand-coding C wrappers and using ctypes
>>> involves about the same amount of work to get the same sort of
>>> results.
>>>
>>> The code that SWIG generates is, naturally, very comparable to what a
>>> good programmer would do by hand. If you want to see how much work
>>> that would be, look at the sizes of the files generated by SWIG. They
>>> are the largest source code files in the entire system, by a large
>>> margin (they are not in CVS, you have to run SWIG to get them).
>>>
>>> There are two modules that get Python wrappers in Csound: csnd and
>>> CsoundAC. I estimate that hand-coding wrappers even for csnd would
>>> take a man-month at least. CsoundAC is several times as complex as
>>> csnd.
>>>
>>> I am simply not willing to do that amount of work when what we are
>>> currently doing works very well indeed except for this version
>>> independence thing, which I admit is an annoyance.
>>>
>>> If anyone has a better idea, some other wrapper system that is
>>> automatic but version-independent, I'd be glad to hear it.
>>>
>>> Hope this helps,
>>> Mike
>>>
>>> On 7/2/09, Art Hunkins <abhunkin@...> wrote:
>>> > 5.08 works with python2.5 but not with python2.6
>>> >
>>> > With SoaS, I imported 2.5 to sit alongside 2.6; 5.08 still didn't work
>>> > > =
>>> > (though I didn't really expect it to).
>>> >
>>> > I'm still waiting for 5.10 to be available to Soas; when it is, I'll =
>>> > report whether it works with 2.6 (as I *do* expect).
>>> >
>>> > If it does, I'm going to make a strong plea that future versions of =
>>> > Csound (I gather, the API) be made independent of python version.
>>> >
>>> > With Sugar, we'll have little or no control over what version of python
>>> > > =
>>> > is installed at any given time. If we want to write Csound Activities =
>>> > using python (as is usual), Csound will need to adapt to whatever >
>>> > python =
>>> > is present.
>>> >
>>> > Either that, or Sugar and Csound will continue to have compatibility =
>>> > issues (which will strictly limit its viability).
>>> >
>>> > Art Hunkins
>>> >   ----- Original Message -----=20
>>> >   From: victor=20
>>> >   To: Art Hunkins ; Developer discussions=20
>>> >   Sent: Wednesday, July 01, 2009 1:36 PM
>>> >   Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
>>> >
>>> >
>>> >   Because the 5.10 rpm has a python2.6 dependency. But that might
>>> >   be the case for 5.08 too (I am not sure).
>>> >     ----- Original Message -----=20
>>> >     From: Art Hunkins=20
>>> >     To: Developer discussions=20
>>> >     Sent: Tuesday, June 30, 2009 2:22 AM
>>> >     Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
>>> >
>>> >
>>> >     I just noticed that the current OLPC build includes Python 2.5, =
>>> > whereas SoaS includes Python 2.6
>>> >
>>> >     Csound 5.08.91 is currently in both. Wouldn't this explain why =
>>> > 5.08.91 doesn't work on SoaS? And why 5.10 should?
>>> >
>>> >     Art Hunkins
>>> >       ----- Original Message -----=20
>>> >       From: Victor.Lazzarini@...=20
>>> >       To: Developer discussions=20
>>> >       Sent: Monday, June 29, 2009 5:38 PM
>>> >       Subject: Re: [Cs-dev] Sugar on a Stick - and OLPCsound
>>> >
>>> >
>>> >       The message is strange, but it does not say there is a Python
>>> >       version mismatch. However, having said that, the 5.08.91
>>> >       rpm was built with 2.5 (unless what you have there is another
>>> >       build that somehow uses 2.6).=20
>>> >
>>> >       What the message says is that the library module Python
>>> >       tried to load does not have one of the API functions. The
>>> >       reason for this I don't know.
>>> >
>>> >       Victor
>>> >
>>> >
>>> >
>>> > Send bugs reports to this list.
>>> > To unsubscribe, send email sympa@... with body >
>>> > "unsubscribe
>>> > csound"
>>> >
>>>
>>>
>>> --
>>> Michael Gogins
>>> Irreducible Productions
>>> http://www.michael-gogins.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@... with body "unsubscribe
>>> csound"
>>>
>>
>>
>> --
>>
>> Saludos,
>> Felipe Sateler
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@... with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@... with body "unsubscribe
> csound"
>


Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Parent Message unknown Re: [Sugar-devel] [Cs-dev] Sugar on a Stick - and OLPCsound

by Art Hunkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That seems to make sense.

My problem was that I had to erase olpcsound before it was possible to
install csound - as csound "conflicted" with olpcsound. Perhaps the name
change was the real issue; if both had been named csound, I could simply
have done a csound update.

At least that's an idea. The *original* situation found csnd.py, but then
failed with _csnd - not finding a requested variable.

Art Hunkins

----- Original Message -----
From: "Martin Dengler" <martin@...>
To: "Art Hunkins" <abhunkin@...>
Cc: <pbrobinson@...>; <csound@...>;
<sugar-devel@...>
Sent: Friday, July 03, 2009 8:46 PM
Subject: Re: [Sugar-devel] [Cs-dev] Sugar on a Stick - and OLPCsound




Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"