[Csnd] Re: Plugins not loading on Solaris
Date | 2008-03-16 18:10 |
From | Anthony Kozar |
Subject | [Csnd] Re: Plugins not loading on Solaris |
I was looking through the plugin loading code in Csound today and remembered this problem that Sergio was having. The answer to why none of the plugins are loading is that there is no plugin support for Solaris! Csound only has code for loading plugins on Windows, Linux, MacOS X, and MacOS 9. When compiled on any other platform, it uses a dummy function for csoundOpenLibrary() that always returns -1 -- thus the error message. (See line 1176 in Top/csmodule.c). The solution is to do one of the following: a) If Solaris uses the same methods for loading modules that Linux does, then change the #elif defined(LINUX) on line 899 of csmodule.c to include a test for Solaris too. (Might be prudent for us to add tests for BSD Unices as well if appropriate). Also, the #if defined(LINUX) tests on line 81 and in csoundLoadExternal() should probably be changed (?). b) Otherwise, a new #elif case needs to be added with Solaris-specific versions of the functions csoundOpenLibrary(), csoundCloseLibrary(), and csoundGetLibrarySymbol(). Other factors should also be checked, such as the assumptions in csoundLoadModules() about filename extensions for plugin libraries (line 673). There may be many other parts of Csound 5 that test for LINUX when what is really meant is "any non-MacOSX Unix". It may be expedient to simply define LINUX during the build process on Solaris or BSD but I do not know for sure that this will work. It would be nice if Csound 5 would gracefully build on these platforms, supporting the features that it can and ignoring those it cannot (like real-time audio?). Anthony Kozar mailing-lists-1001 AT anthonykozar DOT net http://anthonykozar.net/ > Re: Plugins > by cochedelaferte :: Rate this Message: > > Hi Steven, > >> What Linux are you using? > > - Solaris x86-64 : not Linux, but also not very different in this kind of > problems. > > [...] > > Best regards, > > Sergio On Sun, Mar 9, 2008 at 6:42 PM, cochedelaferte |
Date | 2008-03-22 00:14 |
From | cochedelaferte |
Subject | [Csnd] Re: Plugins not loading on Solaris |
Hi, I made this day a new try : in each source file from csound5/top where the keyword LINUX was used, i defined SOLARIS and replaced each LINUX occurrence with it. Build OK. Now trying to load a plugin, i get : time resolution is 1000.000 ns WARNING: could not open library '/usr/local/lib/csound/plugins/libbabo.so' (ld.so.1: csound: fatal : erreur de réadressage : R_AMD64_PC32 : fichier /usr/local/lib/csound/plugins/libbabo.so : symbole main : la valeur de 0x280015804b4 ne convient pas) Exactly the same issue i get if i build libcsound.so instead libcsound.a : readressage error for libcsound.so. But, of course, if builded all in position independant code. Now there is the right way to learn, but for the moment i have no idea... Cheers, Sergio -- View this message in context: http://www.nabble.com/Re%3A-Plugins-not-loading-on-Solaris-tp16082002p16212007.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2008-03-22 00:21 |
From | "Steven Yi" |
Subject | [Csnd] Re: Re: Plugins not loading on Solaris |
Attachments | None |
Date | 2008-03-22 01:07 |
From | cochedelaferte |
Subject | [Csnd] Re: Re: Plugins not loading on Solaris |
Steven Yi wrote: > > Hi Serge, > > What version of Solaris are you using? And are you on SPARC or x86? > I'm downloading OpenSolaris Developer Preview 2 > 9http://opensolaris.org/os/project/indiana/resources/getit/) now and > will install it in a VirtualBox to experiment to see if I can > reproduce your issues. > > Hi Steven, Oh, what for a lot of work ! Thank's greatly ! I'm actually on Solaris 10 x86-64 (06/2006). I builded Csound with the standard gcc3 (/usr/sfw), properly wrapped to 64 bits (that means essentially using the -m64 option and adapted spec files). Normally, this works as well, all my apps were builded with this installation. As i explained in my last post, now is my issue relatively circumscribed, that is also a (little) first thing. Cheers (and great thank's again), Sergio -- View this message in context: http://www.nabble.com/Re%3A-Plugins-not-loading-on-Solaris-tp16082002p16213077.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2008-03-22 23:40 |
From | cochedelaferte |
Subject | [Csnd] Re: Re: Plugins not loading on Solaris |
Hi Steven, Just some little things to make easier the Csoound build under Solaris : 1) my libCsoundLibs in Sconstruct (line 627), to avoid several undefined symbols : libCsoundLibs = [csoundLibraryName, 'sndfile', 'socket', 'nsl', 'resolv', 'posix4'] Also, remove the line 388 : the -mthreads option isn't recognized by our gcc. 2) what i added to my custom.py : else: platform = 'solaris' customCPPPATH.append('/usr/pkg/include') customCPPPATH.append('/usr/pkg/include/python2.4') customLIBPATH.append('/usr/pkg/lib') customLIBPATH.append('/usr/lib/amd64') customLIBPATH.append('/lib/amd64') customCXXFLAGS.append('-fpic') (The standard Python in Solaris is in 32 bits, i used for 64 bits this from pkgsrc) Hope you will find something useful in all that... Cheers, Sergio -- View this message in context: http://www.nabble.com/Re%3A-Plugins-not-loading-on-Solaris-tp16082002p16229045.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2008-03-23 04:11 |
From | "Steven Yi" |
Subject | [Csnd] Re: Re: Re: Plugins not loading on Solaris |
Attachments | None |
Date | 2008-03-24 00:16 |
From | cochedelaferte |
Subject | [Csnd] Re: Re: Re: Plugins not loading on Solaris |
Steven Yi wrote: > > I stopped an install of SUNWgcc and now am getting stuck trying to > install as it says file found. > pkgrm doesn't work ? Placing you in /var/sadm/pkg and typing at the prompt : # pkgrm SUNWgcc (I'm not sure about the exact syntax). After that, normally you can still reinstall it. Other hand i saw that my issue (erreur de réadressage : R_AMD64_PC32) is really Solaris related. A know workaround is to build with the -shared option. I made that, build OK, but launching Csound i get immediately a segfault. I think that i'm really on the node of the problem, but... Cheers, Sergio -- View this message in context: http://www.nabble.com/Re%3A-Plugins-not-loading-on-Solaris-tp16082002p16243120.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2008-03-24 03:18 |
From | "Steven Yi" |
Subject | [Csnd] Re: Re: Re: Re: Plugins not loading on Solaris |
Attachments | None |
Date | 2008-03-24 11:58 |
From | cochedelaferte |
Subject | [Csnd] Re: Re: Re: Re: Plugins not loading on Solaris |
Steven Yi wrote: > > Now I will have to work out libsndfile, scons, > cvs, etc. > - Scons compiles without problem using any compilator ; - there isn't libsndfile binaries on Blastwave (pkg-get). But there is in the pkgsrc distribution. That mean again some work to install pkgsrc. If you are interested, i can post where it's available. Or maybe build libsndfile from sources will be easier and faster, i can't remember. Cheers, Sergio -- View this message in context: http://www.nabble.com/Re%3A-Plugins-not-loading-on-Solaris-tp16082002p16249490.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2008-03-24 12:12 |
From | Alan Peter Fitch |
Subject | [Csnd] Re: Re: Re: Re: Re: Plugins not loading on Solaris |
cochedelaferte wrote: > > > Steven Yi wrote: >> Now I will have to work out libsndfile, scons, >> cvs, etc. >> > > - Scons compiles without problem using any compilator ; > > - there isn't libsndfile binaries on Blastwave (pkg-get). But there is in > the pkgsrc distribution. That mean again some work to install pkgsrc. If you > are interested, i can post where it's available. Or maybe build libsndfile > from sources will be easier and faster, i can't remember. > > Cheers, > > Sergio Also don't forget http://www.sunfreeware.com, Alan -- Alan Fitch |
Date | 2008-04-02 05:09 |
From | "Steven Yi" |
Subject | [Csnd] Re: Re: Re: Re: Re: Plugins not loading on Solaris |
Attachments | None |
Date | 2008-04-02 12:46 |
From | cochedelaferte |
Subject | [Csnd] Re: Re: Re: Re: Re: Plugins not loading on Solaris |
Steven Yi wrote: > > A bit of a late reply, but I've been trying to find out which package > to install that contains stdio.h, as this is not found now when > running Scons on OpenSolaris. Would you happen to know what the > package to install is, or how I might be able to query to find out? > Stdio.h ? Strange... No idea for the moment about the package it comes from. I have it in /usr/include as well. I will ask the french Solaris users group about that. Cheers, Sergio -- View this message in context: http://www.nabble.com/Re%3A-Plugins-not-loading-on-Solaris-tp16082002p16446884.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2008-04-02 12:55 |
From | David |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Plugins not loading on Solaris |
Attachments | None |
Date | 2008-04-02 14:32 |
From | cochedelaferte |
Subject | [Csnd] Re: Re: Re: Re: Re: Plugins not loading on Solaris |
Hi Steven, Stdio.h comes from SUNWhea. As other new, it seems that a workaround to avoid the R_AMD64_PC32 error (with gcc) is to build with the -shared option. I made that, but Csound crashes at the launch. Maybe this can mean that it will really work, but only i have in my prerequisites some C++ libraries which are'nt builded with the same compilator, here gcc. Cheers, Sergio -- View this message in context: http://www.nabble.com/Re%3A-Plugins-not-loading-on-Solaris-tp16082002p16447034.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2008-04-02 14:49 |
From | cochedelaferte |
Subject | [Csnd] Re: Re: Re: Re: Re: Plugins not loading on Solaris |
HI Steven, If you have another package to find, now i can make that easily, i have the exact command for that ("pkgchk -lp |
Date | 2008-04-02 19:18 |
From | "Steven Yi" |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Plugins not loading on Solaris |
Attachments | None |
Date | 2008-04-07 00:10 |
From | cochedelaferte |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Plugins not loading on Solaris |
Hi Steven, Now i rebuilded Csound in 32 bits (to avoid the R_AMD64_PC32 problem), and disabling all options : i get a core at the launch. That mean that the problem isn't 64 bit related : probably the -shared flag will be a good solution for the 64 bits build. But here (32 bits) why a core... Cheers, Sergio -- View this message in context: http://www.nabble.com/Re%3A-Plugins-not-loading-on-Solaris-tp16082002p16530457.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2008-04-08 01:42 |
From | cochedelaferte |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Plugins not loading on Solaris |
Hi Steven, OK : some progress :-D First i found where my cores cames from : just Solaris has no /proc/cpuinfo and, for this reason, undef HAVE_RDTSC must be conserved for it in csound.c. After that, i reinjected my Solaris modified csmodule.c : it seems that it works, now it looks like my plugins are loaded as well. That all was in 32 bits build. Now i'll see if some files i modified in /Top will not produce other problems. After that, i'll see what happens building all in 64 bits, or eventually rebuild my Coreaudio and Jack in 32. Cheers, Sergio -- View this message in context: http://www.nabble.com/Re%3A-Plugins-not-loading-on-Solaris-tp16082002p16544366.html Sent from the Csound - General mailing list archive at Nabble.com. |