Csound Csound-dev Csound-tekno Search About

Re: User report for Cs5 RC2 on OS X

Date2006-01-04 22:58
FromVictor Lazzarini
SubjectRe: User report for Cs5 RC2 on OS X
The python lib _csnd seems to work OK on 10.3 and 10.4.  So
it looks like we need a special 10.2 distro.

I was originally thinking of placing lib_jcsnd.dylib (the
link) into
CurrentJDK, but the installer does not let you do that. What
it
does is create a new directory ovwerwriting the link and put
the file there. So it is only possible to place things on
'real' directories, not on links to directories (for
existing
frameworks). If you know a way round this, let me know.

In any case, the user can set a variable to point to
the Java directory in the CsoundLib.Framework, if there
is a problem. I will try perhaps to put code this into the
Java app for newer releases.

Victor

>
> 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/l
> ib/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/pyth
> on2.3/site-package s
>
> [fiona:2.3/lib/python2.3] anthony% sudo cp _csnd.so
> /Library/Frameworks/Python.framework/Versions/2.3/lib/pyth
> on2.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/Curre
> ntJDK/
>
> 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
>
>
> --
> Send bugs reports to this list.
> To unsubscribe, send email to
> csound-unsubscribe@lists.bath.ac.uk