Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Re: Re: [SOLVED]: please help with csound and python

Date2008-02-25 22:54
FromMichael Gogins
Subject[Csnd] Re: Re: Re: [SOLVED]: please help with csound and python
SCons is indeed not clean after -c. There are the .sconf_temp directory, config.log, .sconsign_dblite, and various .sconsign files in subdirectories.

 All of these need to be deleted to get a really clean build. There is a cleanup shell script in the csound root directory that attempts to do this. The script doesn't work for me on Windows, but it probably can be modified for you if it does not work on your system.

Hope this helps,
Mike

-----Original Message-----
>From: Hector Centeno 
>Sent: Feb 25, 2008 5:35 PM
>To: csound@lists.bath.ac.uk
>Subject: [Csnd] Re: Re: [SOLVED]: please help with csound and python
>
>Cesare,
>
>I've got that kind of error when rebuilding after doing a scons -c in
>a already built source direcotry. The way I solved it was by building
>using a clean checkout from cvs, it seems that scons -c leaves
>somethig behind that generates this error.
>
>Cheers,
>
>Hector
>
>
>
>On Mon, Feb 25, 2008 at 3:55 PM, Cesare Marilungo
> wrote:
>> Hector Centeno wrote:
>>  > Aah! Finally I found the solution to the linking problems! It's in this thread:
>>  >
>>  > http://permalink.gmane.org/gmane.comp.audio.csound.devel/12132
>>  >
>>  > The problem is the SONAME given to libcsnd and it appeared in Csound
>>  > 5.07 after a patch by Felipe Sateler. I just followed his solution and
>>  > now I can import csnd in python!
>>  >
>>  > Cheeers!
>>  >
>>  > Hector
>>  >
>>  >
>>  >
>>  I tried this solution and it works here too.
>>
>>  But, when compiling after having cleaned up (with scons -c) I had to
>>  invoke scons twice, because the first time it stopped with:
>>
>>  scons: *** Source `libcsound.so' not found, needed by target
>>  `_csnd.so'.  Stop.
>>  scons: building terminated because of errors.
>>
>>  It seems that there's some problem in the order these two are built. I'm
>>  no expert with scons.
>>
>>  Is this a problem introduced by this fix?
>>
>>  Anyway, it would be good to uninstall everything and clean the build
>>  every now and then to check for this kind of problems.
>>
>>  Cheers,
>>
>>  -c.
>>
>>
>>
>>  >
>>  >
>>  >
>>  > On Mon, Feb 25, 2008 at 2:54 PM, Hector Centeno  wrote:
>>  >
>>  >> Thank your Cesare, it helps! Was that ldd on _csnd.so inside the
>>  >>  Python site-packages directory?
>>  >>
>>  >>  Would you mind telling me what do you get if in a terminal you enter
>>  >>  "python" and then "import csnd"?
>>  >>
>>  >>  Did you build csound from cvs?
>>  >>
>>  >>  Thanks!
>>  >>
>>  >>  Hector
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>  On Mon, Feb 25, 2008 at 2:19 PM, Cesare Marilungo
>>  >>   wrote:
>>  >>  > If it can be of some help, here's mine (but I'm no Slackware):
>>  >>  >
>>  >>  >         linux-gate.so.1 =>  (0xffffe000)
>>  >>  >         libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0xb7dc3000)
>>  >>  >         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7cdf000)
>>  >>  >         libutil.so.1 => /lib/libutil.so.1 (0xb7cdb000)
>>  >>  >         libcsound.so.5.1 => /usr/local/lib/libcsound.so.5.1 (0xb7c2a000)
>>  >>  >         libsndfile.so.1 => /usr/local/lib/libsndfile.so.1 (0xb7bcf000)
>>  >>  >         libportaudio.so.2 => /usr/local/lib/libportaudio.so.2 (0xb7ba8000)
>>  >>  >         libfltk.so.1.1 => /usr/local/lib/libfltk.so.1.1 (0xb7b2d000)
>>  >>  >         libasound.so.2 => /usr/lib/libasound.so.2 (0xb7a6c000)
>>  >>  >         libjack.so.0 => /usr/local/lib/libjack.so.0 (0xb7a52000)
>>  >>  >         liblo.so.0 => /usr/local/lib/liblo.so.0 (0xb7a48000)
>>  >>  >         libdl.so.2 => /lib/libdl.so.2 (0xb7a43000)
>>  >>  >         libpthread.so.0 => /lib/libpthread.so.0 (0xb7a2c000)
>>  >>  >         libm.so.6 => /lib/libm.so.6 (0xb7a05000)
>>  >>  >         libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb79fa000)
>>  >>  >         libc.so.6 => /lib/libc.so.6 (0xb78b8000)
>>  >>  >
>>  >>  >         /lib/ld-linux.so.2 (0x80000000)
>>  >>  >         libFLAC.so.7 => /usr/lib/libFLAC.so.7 (0xb7876000)
>>  >>  >         librt.so.1 => /lib/librt.so.1 (0xb786e000)
>>  >>  >         libXext.so.6 => /usr/lib/libXext.so.6 (0xb7860000)
>>  >>  >         libX11.so.6 => /usr/lib/libX11.so.6 (0xb7778000)
>>  >>  >         libXau.so.6 => /usr/lib/libXau.so.6 (0xb7775000)
>>  >>  >         libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7772000)
>>  >>  >         libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb775b000)
>>  >>  >         libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7756000)
>>  >>  >
>>  >>  >  Cheers,
>>  >>  >
>>  >>  >  -c.
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >  Hector Centeno wrote:
>>  >>  >  > Hello Victor,
>>  >>  >  >
>>  >>  >  > Could you please send me the output of  "ldd _csound.so" of your build?
>>  >>  >  >
>>  >>  >  > Thanks,
>>  >>  >  >
>>  >>  >  > Hector
>>  >>  >  >
>>  >>  >  >
>>  >>  >  >
>>  >>  >  > On Mon, Feb 25, 2008 at 9:39 AM, Victor Lazzarini
>>  >>  >  >  wrote:
>>  >>  >  >
>>  >>  >  >> Just checked here (Fedora 7). The file _csnd.so is linked to
>>  >>  >  >>  libcsnd.so correctly. I am not sure why yours is not. I just
>>  >>  >  >>  built my system with scons and then checked the _csnd.so
>>  >>  >  >>  file in my build directory.
>>  >>  >  >>
>>  >>  >  >>  Perhaps the one in site-packages is an old version of _csnd.so
>>  >>  >  >>  which did not need the link. Did you check if the file is up-to-date?
>>  >>  >  >>
>>  >>  >  >>
>>  >>  >  >>
>>  >>  >  >>  At 14:19 25/02/2008, you wrote:
>>  >>  >  >>  >Thanks Victor for your response.
>>  >>  >  >>  >
>>  >>  >  >>  >Sorry, I forgot to mention I'm running Fedora 8 Linux (plus CCRMA). I
>>  >>  >  >>  >built with /usr prefix intentionally to see if that would help with
>>  >>  >  >>  >the linking. Before I did with the default /usr/local. ldd shows it is
>>  >>  >  >>  >linked to libcsound64.so but not to libcsnd.so.5.1 which is the one
>>  >>  >  >>  >that contains the symbol
>>  >>  >  >>  >
>>  >>  >  >>  >$ nm /usr/lib/libcsnd.so.5.1 | grep _ZN17CsoundUtilityList5CountEv
>>  >>  >  >>  >0001bae0 T _ZN17CsoundUtilityList5CountEv
>>  >>  >  >>  >
>>  >>  >  >>  >while:
>>  >>  >  >>  >
>>  >>  >  >>  >$ nm /usr/lib/libcsound64.so.5.1 | grep _ZN17CsoundUtilityList5CountEv
>>  >>  >  >>  >[nothing]
>>  >>  >  >>  >
>>  >>  >  >>  >
>>  >>  >  >>  >Am I understanding it wrong?
>>  >>  >  >>  >
>>  >>  >  >>  >
>>  >>  >  >>  >Thanks again,
>>  >>  >  >>  >
>>  >>  >  >>  >
>>  >>  >  >>  >Hector
>>  >>  >  >>  >
>>  >>  >  >>  >
>>  >>  >  >>  >
>>  >>  >  >>  >
>>  >>  >  >>  >
>>  >>  >  >>  >
>>  >>  >  >>  >On Mon, Feb 25, 2008 at 3:39 AM, victor  wrote:
>>  >>  >  >>  > > But it's linked alright, is it not?
>>  >>  >  >>  > >
>>  >>  >  >>  > >
>>  >>  >  >>  > >  libcsound64.so.5.1 => /usr/lib/libcsound64.so.5.1 (0xb7b41000)
>>  >>  >  >>  > >
>>  >>  >  >>  > >  I am surprised to see libcsound in /usr/lib. I would have
>>  >>  >  >>  > >  thought you had it in /usr/local/lib from a custom build.
>>  >>  >  >>  > >
>>  >>  >  >>  > >  Are you sure you don't have more than two versions knocking
>>  >>  >  >>  > >  around in your system?
>>  >>  >  >>  > >
>>  >>  >  >>  > >  Victor
>>  >>  >  >>  > >
>>  >>  >  >>  > >
>>  >>  >  >>  > >  ----- Original Message -----
>>  >>  >  >>  > >  From: "Hector Centeno" 
>>  >>  >  >>  > >  To: 
>>  >>  >  >>  > >  Sent: Monday, February 25, 2008 7:12 AM
>>  >>  >  >>  > >  Subject: [Csnd] please help with csound and python
>>  >>  >  >>  > >
>>  >>  >  >>  > >
>>  >>  >  >>  > >
>>  >>  >  >>  > >
>>  >>  >  >>  > > > Hi,
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  > Once more I'm dealing with an unresolved problem I've been
>>  >>  >  >>  > >  > experiencing since some time ago when building csound from CVS. I keep
>>  >>  >  >>  > >  > getting undefined symbols errors when Python tries to import csnd. Now
>>  >>  >  >>  > >  > i got it trying to run PartikkelExplorer:
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  > $ python '/home/hector/Desktop/PartikkelExplorer/PartikkelExplorer.py'
>>  >>  >  >>  > >  > Traceback (most recent call last):
>>  >>  >  >>  > >  >  File "/home/hector/Desktop/PartikkelExplorer/PartikkelExplorer.py",
>>  >>  >  >>  > >  > line 19, in 
>>  >>  >  >>  > >  >    from csnd import *
>>  >>  >  >>  > >  >  File "/usr/lib/python2.5/site-packages/csnd.py", line 7, in 
>>  >>  >  >>  > >  >    import _csnd
>>  >>  >  >>  > >  > ImportError: /usr/lib/python2.5/site-packages/_csnd.so: undefined
>>  >>  >  >>  > >  > symbol: _ZN17CsoundUtilityList5CountEv
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  > I'm building csound using doubles, dynamic libraries and interfaces
>>  >>  >  >>  > >  > and installing everything to /usr. The previous time I came to the
>>  >>  >  >>  > >  > list looking for help about this Michael Gogins tried very hard to
>>  >>  >  >>  > >  > help me but I just ran out of ideas since I'm not an expert in file
>>  >>  >  >>  > >  > linking or in C compilation in general. I made sure there is no
>>  >>  >  >>  > >  > previous installation of any older Csound file. I did a ldconfig, I
>>  >>  >  >>  > >  > did set LD_CONFIG_PATH and PYTHONPATH without success. Is there
>>  >>  >  >>  > >  > something in the building process that is failing to link csound.so
>>  >>  >  >>  > >  > with libcsnd? Some more information:
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  > $ nm /usr/lib/libcsnd.so.5.1 | grep _ZN17CsoundUtilityList5CountEv
>>  >>  >  >>  > >  > 0001bae0 T _ZN17CsoundUtilityList5CountEv
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  > $ nm /usr/lib/python2.5/site-packages/_csnd.so | grep
>>  >>  >  >>  > >  > _ZN17CsoundUtilityList5CountEv
>>  >>  >  >>  > >  >         U _ZN17CsoundUtilityList5CountEv
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  > ]$ ldd /usr/lib/python2.5/site-packages/_csnd.so
>>  >>  >  >>  > >  >        linux-gate.so.1 =>  (0xb7f07000)
>>  >>  >  >>  > >  >        libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0xb7cf1000)
>>  >>  >  >>  > >  >        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7c06000)
>>  >>  >  >>  > >  >        libutil.so.1 => /lib/libutil.so.1 (0xb7c02000)
>>  >>  >  >>  > >  >        libcsound64.so.5.1 => /usr/lib/libcsound64.so.5.1 (0xb7b41000)
>>  >>  >  >>  > >  >        libsndfile.so.1 => /usr/lib/libsndfile.so.1 (0xb7ae1000)
>>  >>  >  >>  > >  >        libfltk.so.1.1 => /usr/lib/libfltk.so.1.1 (0xb7a37000)
>>  >>  >  >>  > >  >        libasound.so.2 => /lib/libasound.so.2 (0xb7958000)
>>  >>  >  >>  > >  >        libjack.so.0 => /usr/lib/libjack.so.0 (0xb793d000)
>>  >>  >  >>  > >  >        liblo.so.0 => /usr/lib/liblo.so.0 (0xb7932000)
>>  >>  >  >>  > >  >        libdl.so.2 => /lib/libdl.so.2 (0xb792d000)
>>  >>  >  >>  > >  >        libpthread.so.0 => /lib/libpthread.so.0 (0xb7913000)
>>  >>  >  >>  > >  >        libm.so.6 => /lib/libm.so.6 (0xb78ea000)
>>  >>  >  >>  > >  >        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb78de000)
>>  >>  >  >>  > >  >        libc.so.6 => /lib/libc.so.6 (0xb7785000)
>>  >>  >  >>  > >  >        /lib/ld-linux.so.2 (0x80000000)
>>  >>  >  >>  > >  >        libXft.so.2 => /usr/lib/libXft.so.2 (0xb7772000)
>>  >>  >  >>  > >  >        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb776e000)
>>  >>  >  >>  > >  >        libXext.so.6 => /usr/lib/libXext.so.6 (0xb775e000)
>>  >>  >  >>  > >  >        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7662000)
>>  >>  >  >>  > >  >        librt.so.1 => /lib/librt.so.1 (0xb7659000)
>>  >>  >  >>  > >  >        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb762a000)
>>  >>  >  >>  > >  >        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb759d000)
>>  >>  >  >>  > >  >        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7594000)
>>  >>  >  >>  > >  >        libXau.so.6 => /usr/lib/libXau.so.6 (0xb7591000)
>>  >>  >  >>  > >  >        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb758f000)
>>  >>  >  >>  > >  >        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7573000)
>>  >>  >  >>  > >  >        libexpat.so.1 => /lib/libexpat.so.1 (0xb7551000)
>>  >>  >  >>  > >  >        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb754b000)
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  > Is there a way of manually creating this link after building with
>>  >>  >  >>  > >  > scons is finished? What would be the command for doing so? Using the
>>  >>  >  >>  > >  > Csound packages from the Fedora repository I don't get this kind of
>>  >>  >  >>  > >  > errors.
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  > I'll appreciate a lot any help since this problem has been an obstacle
>>  >>  >  >>  > >  > for me to start learning to program Csound GUIs using Python.
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  > Hector
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >  >
>>  >>  >  >>  > >
>>  >>  >  >>  > >
>>  >>  >  >>  > > > Send bugs reports to this list.
>>  >>  >  >>  > >  > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>  >>  >  >>  > >  > csound"
>>  >>  >  >>  > >
>>  >>  >  >>  > >
>>  >>  >  >>  > >
>>  >>  >  >>  > >  Send bugs reports to this list.
>>  >>  >  >>  > >  To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>  >>  >  >>  > "unsubscribe csound"
>>  >>  >  >>  > >
>>  >>  >  >>  >
>>  >>  >  >>  >
>>  >>  >  >>  >Send bugs reports to this list.
>>  >>  >  >>  >To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>  >>  >  >>  >csound"
>>  >>  >  >>
>>  >>  >  >>  Victor Lazzarini
>>  >>  >  >>  Music Technology Laboratory
>>  >>  >  >>  Music Department
>>  >>  >  >>  National University of Ireland, Maynooth
>>  >>  >  >>
>>  >>  >  >>
>>  >>  >  >>
>>  >>  >  >>
>>  >>  >  >>
>>  >>  >  >>  Send bugs reports to this list.
>>  >>  >  >>  To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>  >>  >  >>
>>  >>  >  >>
>>  >>  >  >
>>  >>  >  >
>>  >>  >  > Send bugs reports to this list.
>>  >>  >  > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>  >>  >  >
>>  >>  >  >
>>  >>  >  >
>>  >>  >
>>  >>  >
>>  >>  >  --
>>  >>  >  www.cesaremarilungo.com
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >  Send bugs reports to this list.
>>  >>  >  To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>  >>  >
>>  >>
>>  >>
>>  >
>>  >
>>  > Send bugs reports to this list.
>>  > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>  >
>>  >
>>  >
>>
>>
>>  --
>>  www.cesaremarilungo.com
>>
>>
>>
>>  Send bugs reports to this list.
>>  To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>
>
>Send bugs reports to this list.
>To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"