Csound Csound-dev Csound-tekno Search About

User report for Cs5 RC2 on OS X

Date2006-01-04 06:32
FromAnthony Kozar
SubjectUser report for Cs5 RC2 on OS X
Csound5 rc2 OS X 10.2 Report

I installed rc2 package for 10.3 and earlier on a Dual G4 running 10.2.8.
It overwrote most of my Csound 4 binaries in /usr/local/bin, but that is
what I expected to happen :)

Big thanks and congratulations to Victor and everyone who made Csound 5 a
reality on MacOS X !!

Here are some notes and observations:

- Commandline csound works rendering to disk and in real-time with CoreAudio
or PortAudio modules.  Real-time audio was very smooth with the simple tests
that I tried.

- Running two simultaneous renders to disk works beautifully!!! (Trying it
in real-time though with PortAudio causes one of the processes to become a
zombie).

- Default output format now seems to be -W (Wave) ?  (AIFF makes more sense
on a Mac; is ircam still available?)

- FLTK graphs work (although they disappear at the end of rendering).

- New level output options (dBs and colors) look nice!

- PortMidi and Jack modules are loading but I am unable to test.

- I get this message on the commandline:
WARNING: could not open library
'/Library/Frameworks/CsoundLib.Framework/Versions/5.1/Resources/Opcodes/libp
y.dylib' (-1)

But Python is installed:
Python 2.2 (#1, 07/14/02, 23:25:09)
[GCC Apple cpp-precomp 6.14] on darwin


- What is the Reza executable that was installed to /usr/local/bin ?

- These executables used to be part of Csound 4 but were not in Cs5 package:
-rwxr-xr-x  1 root  staff   35180 Feb 20  2005 pv_export*
-rwxr-xr-x  1 root  staff   23944 Feb 20  2005 pv_import*
-rwxr-xr-x  1 root  staff   62908 Feb 20  2005 scot*
-rwxr-xr-x  1 root  staff   66780 Feb 20  2005 sdif2ad*

(I know that scot is no longer being built, but what about the others?)

- The installer put two copies of libsndfile into /usr/local/lib:
-rwxr-xr-x   1 root  wheel   982232 Dec 29 08:38 libsndfile.1.0.10.dylib*
-rwxr-xr-x   1 root  wheel  1132280 Dec 29 08:38 libsndfile.1.0.13.dylib*


- Regarding the apps put into /Applications:
  
  - Csound 5.app tries to launch but bounces in the dock for a long time and
eventually must use Force Quit.

  - Csound 5 CSDPlayer launches and transport window appears.  I can select
a .csd file but pressing Play causes it to quit with no error message.

  - Csound 5 Wish quits immediately (appears very briefly in dock - no
message).

Sorry that I cannot determine more accurately what is happening with the GUI
apps.  I would guess that is has something to do with my having older
versions of various OS components that they are dependent on but that is
just a guess.


Anthony Kozar
anthonykozar AT sbcglobal DOT net

Date2006-01-04 09:29
FromIstvan Varga
SubjectRe: User report for Cs5 RC2 on OS X
AttachmentsNone  

Date2006-01-04 10:16
FromVictor Lazzarini
SubjectRe: User report for Cs5 RC2 on OS X
Anthony,

thanks for the thorough report


>- Commandline csound works rendering to disk and in real-time with CoreAudio
>or PortAudio modules.  Real-time audio was very smooth with the simple tests
>that I tried.
>
>- Running two simultaneous renders to disk works beautifully!!! (Trying it
>in real-time though with PortAudio causes one of the processes to become a
>zombie).

That is because (I think), 10.2.8 Coreaudio framework only allows one app (or
instance) to use the soundcard. I might be wrong.

>- Default output format now seems to be -W (Wave) ?  (AIFF makes more sense
>on a Mac; is ircam still available?)

you are right. All the soundfile formats supported by libsndfile should be, 
in theory
available. I'm not sure whether they have been 'enabled'.

>- FLTK graphs work (although they disappear at the end of rendering).

That's good and that's how they should work.



>- I get this message on the commandline:
>WARNING: could not open library
>'/Library/Frameworks/CsoundLib.Framework/Versions/5.1/Resources/Opcodes/libp
>y.dylib' (-1)
You need python 2.3.


>But Python is installed:
>Python 2.2 (#1, 07/14/02, 23:25:09)
>[GCC Apple cpp-precomp 6.14] on darwin

ditto.

>- What is the Reza executable that was installed to /usr/local/bin ?
That's the resource fork application, which I need to install so I can use 
in the installation
script. I can't guarantee that users will have it. Without it, the FLTK 
widgets do not go
under the Acqua control. I can delete it after I use, but I thought to 
leave it there (no
reason really).


>- These executables used to be part of Csound 4 but were not in Cs5 package:
>-rwxr-xr-x  1 root  staff   35180 Feb 20  2005 pv_export*
>-rwxr-xr-x  1 root  staff   23944 Feb 20  2005 pv_import*
>-rwxr-xr-x  1 root  staff   62908 Feb 20  2005 scot*
>-rwxr-xr-x  1 root  staff   66780 Feb 20  2005 sdif2ad*
>
>(I know that scot is no longer being built, but what about the others?)
>
>- The installer put two copies of libsndfile into /usr/local/lib:
>-rwxr-xr-x   1 root  wheel   982232 Dec 29 08:38 libsndfile.1.0.10.dylib*
>-rwxr-xr-x   1 root  wheel  1132280 Dec 29 08:38 libsndfile.1.0.13.dylib*

Oh yes, just in case there was a problem with 1.0.13, since it's
pre-release, it would be easy to restore the link to the trusted 1.0.10.
Will change in future RCs.


>- Regarding the apps put into /Applications:
>
>   - Csound 5.app tries to launch but bounces in the dock for a long time and
>eventually must use Force Quit.
>
>   - Csound 5 CSDPlayer launches and transport window appears.  I can select
>a .csd file but pressing Play causes it to quit with no error message.
>
>   - Csound 5 Wish quits immediately (appears very briefly in dock - no
>message).

I am afraid this is probably because the GUI apps need at least 10.3. Possibly
CSDPlayer would work, if java 1.4.2 is installed. I think for the GUI, I 
would need
to try and build a package in a 10.2 machine. I think I still have one of 
these in
the lab. I'll try to do it for RC3.

>Sorry that I cannot determine more accurately what is happening with the GUI
>apps.  I would guess that is has something to do with my having older
>versions of various OS components that they are dependent on but that is
>just a guess.

and your guess is probably right. The reason I have two packages now is that
the Csound 5 GUI for 10.3 does not work perfectly on 10.4 and the 10.4 version
will not launch (just as you described) in 10.3.

I think there is something to say for the Windows OS that, for all its 
faults, has at
least a better backward-forward compatibility.

Thanks a lot, Anthony. I'm sorry about 10.1, it would have been nice to have
some compatibility with it.

Victor


>Anthony Kozar
>anthonykozar AT sbcglobal DOT net
>
>--
>Send bugs reports to this list.
>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 

Date2006-01-04 20:07
FromAnthony Kozar
SubjectRe: User report for Cs5 RC2 on OS X
Victor Lazzarini wrote on 1/4/06 5:16 AM:

> Anthony,
> 
> thanks for the thorough report

You're welcome.  I wish that I could test all of the fancy new features like
PD and OSC interoperability, along with a thorough workout of the real-time
capabilities but that is not really my area ...

>> - Running two simultaneous renders to disk works beautifully!!! (Trying it
>> in real-time though with PortAudio causes one of the processes to become a
>> zombie).
> 
> That is because (I think), 10.2.8 Coreaudio framework only allows one app (or
> instance) to use the soundcard. I might be wrong.

I think that I have had two copies of Csound 4.23 rendering to DAC
simultaneously before -- I would suspect Portaudio is at fault.  I will try
to investigate later.

>> - I get this message on the commandline:
>> WARNING: could not open library
>> '/Library/Frameworks/CsoundLib.Framework/Versions/5.1/Resources/Opcodes/libp
>> y.dylib' (-1)
> You need python 2.3.

Python 2.2 is the pre-installed version on 10.2.  I assume that the 2.3
requirement is being imposed by how libpy.dylib is being linked, not by an
actual need for 2.3?  (I have built the Python opcodes on OS 9 and
successfully used them with Python 2.2.1).

There is a 2.3.3 version of MacPython available for 10.2, so I will try that
for now.  But if future releases of Csound can be linked to a "generic"
Python library, that might be a better option.
 
>> - What is the Reza executable that was installed to /usr/local/bin ?
> That's the resource fork application, which I need to install so I can use
> in the installation
> script. I can't guarantee that users will have it. Without it, the FLTK
> widgets do not go
> under the Acqua control. I can delete it after I use, but I thought to
> leave it there (no
> reason really).

No problem.  I was just curious.  (BTW, it IS possible to create an OS X
package with files that contain resource forks.  I did it for my 4.23f12gbs8
release.  I remember it being a little bit tricky to get it all to work
correctly though).
 
> I am afraid this is probably because the GUI apps need at least 10.3. Possibly
> CSDPlayer would work, if java 1.4.2 is installed. I think for the GUI, I
> would need to try and build a package in a 10.2 machine. I think I still
> have one of these in the lab. I'll try to do it for RC3.

10.2 has Java 1.4.1.  I don't think that there is any way to upgrade that.

I would hate to make you build another package just for 10.2.  Building
three packages on three machines everytime there is a release would be a
real drag.  Have you looked at all into setting the compiler target??  I am
pretty sure there is a way to say "target 10.2" on newer systems and then it
will use older versions of available frameworks.  If you are lucky, you
could get one package that will run on both 10.2 and 10.3.

> and your guess is probably right. The reason I have two packages now is that
> the Csound 5 GUI for 10.3 does not work perfectly on 10.4 and the 10.4 version
> will not launch (just as you described) in 10.3.

I found some crash logs for Csound 5 GUI and Cs5 Wish that seem to confirm
they are failing to load dependencies.
 
> I think there is something to say for the Windows OS that, for all its
> faults, has at least a better backward-forward compatibility.

Yes.  Apple has done a horrendous job with compatibility between major
releases of OS X (System 7-9 did not have these problems).  I believe that
it is intentional -- to drive the sale of new machines and OS upgrades.  And
that is why I opted out of the Apple upgrade game several years ago ...

> Thanks a lot, Anthony. I'm sorry about 10.1, it would have been nice to have
> some compatibility with it.

No problem.  As I indicated, I do not even use the 10.1 installation on this
machine but I thought I would be "helpful" and test the new release on it.
I doubt at this point that there is much interest in running Csound on 10.1
but if there is some demand, I could try to build a partial package.

Anthony Kozar
anthonykozar AT sbcglobal DOT net

Date2006-01-04 21:40
FromAnthony Kozar
SubjectRe: User report for Cs5 RC2 on OS X
I'm doing some more checking here with the RC2 release on my 10.2.8 machine
and I have made some progress but discovered other problems with the
packaging scheme.

I installed Python 2.3.5 from the MacPython project


The good news is that immediately after installing, the error about loading
libpy.dylib went away.  I can now load and use the Python opcodes from
commandline csound successfully.

The bad news though is that import csnd did not work immediately:

[fiona:~/Projects/csound] anthony% python
Python 2.3.5 (#1, Feb 10 2005, 16:29:16)
[GCC 3.1 20020420 (prerelease)] on darwin

>>> import csnd
Traceback (most recent call last):
  File "", line 1, in ?
ImportError: No module named csnd

The problem is that the installer assumes a Python framework in
/System/Library but there is no Python framework by default in OS X 10.2 and
the framework installed with MacPython 2.3 is put into /Library instead.  So
I had to move the files installed by Csound into the appropriate places in
/Library instead:

[fiona:~/Projects/csound] anthony% cd
/System/Library/Frameworks/Python.Framework/Versions/2.3/lib/python2.3
[fiona:2.3/lib/python2.3] anthony% ls
_csnd.so* csnd.py   csnd.pyc
[fiona:2.3/lib/python2.3] anthony% ll
total 3256
-rwxr-xr-x  1 root  wheel  1381280 Jan  1 19:18 _csnd.so*
-rw-r--r--  1 root  wheel   115518 Jan  1 19:18 csnd.py
-rw-r--r--  1 root  wheel   162689 Jan  1 19:18 csnd.pyc
[fiona:2.3/lib/python2.3] anthony% sudo cp *.py*
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-package
s

[fiona:2.3/lib/python2.3] anthony% sudo cp _csnd.so
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload

Note that I did not put them directly into lib/python2.3 -- the
site-packages folder is for locally installed modules.  And the .so files
all seem to go in the directory lib-dynload.  After doing this, Python can
now find the csnd module but cannot load it because it was linked to 10.3
system libraries:

[fiona:2.3/lib/python2.3] anthony% python
Python 2.3.5 (#1, Feb 10 2005, 16:29:16)
[GCC 3.1 20020420 (prerelease)] on darwin
>>> import csnd
Traceback (most recent call last):
  File "", line 1, in ?
  File "csnd.py", line 4, in ?
    import _csnd
ImportError: Failure linking new module: : dyld: python Undefined symbols:
_csnd.so undefined reference to _btowc expected to be defined in
/usr/lib/libSystem.B.dylib
_csnd.so undefined reference to _iswctype expected to be defined in
/usr/lib/libSystem.B.dylib
_csnd.so undefined reference to _mbsrtowcs expected to be defined in
/usr/lib/libSystem.B.dylib
_csnd.so undefined reference to _towlower expected to be defined in
/usr/lib/libSystem.B.dylib
_csnd.so undefined reference to _towupper expected to be defined in /us
>>>

I should also note that installing these files directly to the 2.3 version
of the framework will be a problem for users that upgrade their Python
installations in the future.  Instead of installing to

/Library/Frameworks/Python.framework/Versions/2.3/

it would probably be better to use

/Library/Frameworks/Python.framework/Versions/Current/

although this doesn't completely solve the problem because the Python
directory layout includes the version number in the path ./lib/python2.3.
Maybe this problem has been solved with a newer version of OS X ??  (There
is a "fix" for a linking problem with MacPython on 10.3)

It occured to me that a similar mistake in the installer might be the reason
that the CSDPlayer Java app failed to work.  Investigating, I found that
lib_jcsound.jnilib was linked directly to the Java 1.4.2 location:

/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/

This location did not exist previously on my system since I only have Java
1.4.1.  However, looking at the following directory listing you can see that
CurrentJDK is linked to the 1.4.1 directory on my system:

[fiona:Frameworks/JavaVM.framework/Versions] anthony% ll
total 16
drwxr-xr-x  3 root  wheel  102 Jul 29  2002 1.2/
drwxr-xr-x  3 root  wheel  102 Jul 29  2002 1.3/
drwxr-xr-x  7 root  wheel  238 Nov  3  2003 1.3.1/
drwxr-xr-x  8 root  wheel  272 Sep 28  2004 1.4.1/
drwxr-xr-x  3 root  wheel  102 Jan  3 16:57 1.4.2/
drwxr-xr-x  5 root  wheel  170 Jun 29  2004 A/
lrwxr-xr-x  1 root  wheel    1 Nov  3  2003 Current@ -> A
lrwxr-xr-x  1 root  wheel    5 Nov  3  2003 CurrentJDK@ -> 1.4.1

Therefore, I think that if you install the csound link instead to

/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/

that this will work more consistently on more systems.

After moving the link on my system, the behavior of CSDPlayer.app did
change.  Before it would exit when I clicked 'Play'.  Now it does not exit
and I can click other buttons, choose a new file, etc.   However, I still
get no sound regardless of the .csd file that I try.

*shrug*

Anthony Kozar
anthonykozar AT sbcglobal DOT net