From: Axel R. <Axe...@ir...> - 2006-10-19 10:26:16
|
On Thursday 19 October 2006 03:47, Eduardo Moguillansky wrote: > dear Axel, > > ok, now I think I got it correct!!!!! The building step, after getting > the .o file should read > > g++ -Wl,-bind_at_load -flat_namespace -undefined suppress -o > your_nice_library.so -bundle your_wrapped_file.o > your_original_library.dylib > > it works indeeeeeeeed!!!!!!! > > the final line, in this case, reads: > > g++ -Wl,-bind_at_load -flat_namespace -undefined suppress -o _eaSDIF.so > -bundle eaSDIF_wrap.o ../../easdif/.libs/libEasdif-1.2.7.dylib > > a next step would be to include the documentation in the wrappers > (through %feature), but it's good enough as it is. > > I spent some hours looking at the output of the build of the loris > wrappers and tried almost all combinations of flags... I never compiled these wrappers on macosx. Thanks to your=20 results I may update the makefiles for mac.=20 Currently I don't have time for that though, so I cc these=20 infos to the sdif-devel mailing list to take care of it later. Note, that I tried the most recent 1.3.29. It works for python, but not for=20 perl and java! Good luck for the next steps of your project, Axel > I hope you did not spend time reading the previous mail... > > cheers, > > Eduardo > > On Oct 18, 2006, at 12:59 AM, Axel Roebel wrote: > > On Tuesday 17 October 2006 23:21, you wrote: > >>> dear Axel, > >>> > >>> Now I can confirm that the problems with the wrappers in OSX are no= t > >>> due to g++ or gcc. I have tryed and installed 4.1 and it does not > >>> change anything. > >>> > >>> Here are the errors: > >>> > >>> g++ : unrecognized option '-shared' > >>> g++: ../../easdif/.libs/libEasdif.so: No such file or directory > > > > That means that this swig version does not support > > mac os x. -shared would then be something else > > > > you may look here > > http://www.dabeaz.com/cgi-bin/wiki.pl?SwigFaqMaxOSXSharedLibraries > > > > TRy using the latest macosx version . > > Either it works with easif or you may simply > > copy the g++ commandlines to compile the > > wrapper sourec file that you geenrate with swif 1.3.21. > > > > A bit hacky, but it may work. > > > > > > Cheers, > > > > Axel > > > >>> in fact, -shared is not an option in OSX. > >>> > >>> The furthest I got was to be able to compile the wrapper > >>> eaSDIF_wrap.cxx into eaSDIF_wrap.o > >>> But then I don't know how to link it so that it generates the .so > >>> files needed. > >>> > >>> I don't want to give up on OSX since it compiled so cleanly in Linu= x! > >>> > >>> bets regards, > >>> > >>> Eduardo > >>> > >>> Begin forwarded message: > >>>> From: Eduardo Moguillansky <mog...@gm...> > >>>> Date: October 17, 2006 7:24:08 PM CEST > >>>> To: Axel Roebel <Axe...@ir...> > >>>> Subject: Re: [Sdif-devel] eaSDIF - SWIG Python Bindings > >>>> > >>>>> Why do you do disable shared. > >>>>> The swig modules are shared libraries > >>>>> you need to do > >>>>> > >>>>> ./configure > >>>>> > >>>>> only. > >>>> > >>>> I was trying to compile it in OSX 10.3.9, and it said in the readm= e > >>>> to disable sharing > >>>> > >>>> I just compiled it succesfully in Linux. I had to install SWIG > >>>> 1.3.21. > >>>> It gave many warnings but produced the .so files. One step is > >>>> missing > >>>> in the make install which would put the files where python can see > >>>> them, but it can be done manually. Also when doing "make" on the > >>>> swig > >>>> directory in did not finish because the java modules throwed > >>>> mistakes. so one must cd to python and then make. > >>>> > >>>> On OSX I have the following problem, which is the same as before. = I > >>>> did NOT use the --disable-shared flag for the first ./configure: > >>>> > >>>> g++ -shared ../../easdif/.libs/libEasdif.so eaSDIF_wrap.o -o > >>>> _eaSDIF.so > >>>> g++: ../../easdif/.libs/libEasdif.so: No such file or directory > >>>> g++: unrecognized option `-shared' > >>>> > >>>> I supposed it coulb be a problem with the gcc compiler so I > >>>> installed the gcc 4.1 > >>>> thanks anyway. > >>>> > >>>> best regards, Eduardo > >>>> > >>>>>> works ok > >>>>>> make > >>>>>> works ok > >>>>>> make install > >>>>>> works ok > >>>>>> > >>>>>> then I do cd swig > >>>>>> ./autogen.sh > >>>>>> works fine > >>>>>> ./configure > >>>>>> works fine > >>>>>> make > >>>>>> attempts to build perl wrapper, many errors, stops > >>>>>> > >>>>>> then I did: cd python > >>>>>> to build only python > >>>>>> make > >>>>>> > >>>>>> it has following error: > >>>>>> > >>>>>> g++ -shared ../../easdif/.libs/libEasdif.so eaSDIF_wrap.o -o > >>>>>> _eaSDIF.so > >>>>>> g++: ../../easdif/.libs/libEasdif.so: No such file or directory > >>>>>> g++: unrecognized option `-shared' > >>>>>> make: *** [_eaSDIF.so] Error 1 > >>>>> > >>>>> There are two errors here: > >>>>> > >>>>> First ../../easdif/.libs/libEasdif.so: No such file or directory > >>>>> this one is easy. You did configure with disable-shared so you > >>>>> don't get the shared library! > >>>>> > >>>>>> g++: unrecognized option `-shared' > >>>>> > >>>>> This one I don't understand, shared is a valid compiler option > >>>>> on all linux systems that I know. It should work on macosx as wel= l. > >>>>> If your compiler is not able to compile shared > >>>>> then you need to replace your compiler. > >>>>> > >>>>> What OS are you using and which compiler? > >>>>> > >>>>>> I'm terribly sorry to bother you with such a stupid question, > >>>>>> since > >>>>>> it's probably swig who is messing things up. should I give up? > >>>>> > >>>>> No you shouldn't! > >>>>> This is not swig here. > >>>>> > >>>>> regards, > >>>>> > >>>>> Axel. > >>>>> > >>>>>> best regards, Eduardo > >>>>>> > >>>>>> On Oct 17, 2006, at 12:49 PM, Axel Roebel wrote: > >>>>>>> On Tuesday 17 October 2006 11:46, Eduardo Moguillansky wrote: > >>>>>>>> hi! > >>>>>>>> > >>>>>>>> I tried to compile the python bindings of eaSDIF but swig keep= s > >>>>>>>> reporting some errors. I tried it both in Linux (swig 1.3.24) > >>>>>>>> and > >>>>>>>> OSX > >>>>>>>> (1.3.28). I was told that new versions of swig sometimes mess > >>>>>>>> with c++ > >>>>>>>> but since I found two naming differences between the interface > >>>>>>>> and the > >>>>>>>> source files I thought that maybe the interface files are not > >>>>>>>> completely updated. > >>>>>>> > >>>>>>> I fixed the names in the swig interface files. > >>>>>>> For me it now compiles cleanly with swig version 1.3.21, > >>>>>>> I've tested all wrappers : perl, python and java. > >>>>>>> > >>>>>>> Let me know if you have success with a more recent > >>>>>>> version of swig. > >>>>>>> > >>>>>>>> Only to try if swig was working fine I compiled the perl > >>>>>>>> bindings > >>>>>>>> and > >>>>>>>> they work perfectly in both versions of swig. > >>>>>>>> > >>>>>>>> As told, sdif 1TRC can be read in python through the Loris > >>>>>>>> wrappers, > >>>>>>>> but > >>>>>>>> it would be great to have access to all the other formats used > >>>>>>>> by > >>>>>>>> supervp without having to convert to text first. > >>>>>>>> > >>>>>>>> thanks! > >>>>>>>> > >>>>>>>> Eduardo Moguillansky > >>>>>>>> > >>>>>>>> On Tue, 2006-10-17 at 10:05 +0200, Diemo Schwarz wrote: > >>>>>>>>> Dear Eduardo, > >>>>>>>>> > >>>>>>>>> I'm also forwarding this mail to the sdif-devel@sourceforge.n= et > >>>>>>>>> list > >>>>>>>>> (subscribe at > >>>>>>>> > >>>>>>>> https://lists.sourceforge.net/lists/listinfo/sdif-devel), > >>>>>>>> > >>>>>>>>> where interesting development topics like these should go and > >>>>>>>>> where > >>>>>>>> > >>>>>>>> Axel > >>>>>>>> > >>>>>>>>> can read them who wrote eaSDIF and the swig python bindings. = I > >>>>>>>> > >>>>>>>> started > >>>>>>>> > >>>>>>>>> all this swig thing, but only took care of the perl bindings. > >>>>>>>>> > >>>>>>>>> What version of swig are you using? > >>>>>>>>> > >>>>>>>>> Eduardo Moguillansky wrote: > >>>>>>>>>> dear Diemo, > >>>>>>>>>> > >>>>>>>>>> thank you very much for the information. I did get the CVS > >>>>>>>>>> files and > >>>>>>>>>> found the python wrappers. They refuse to compile however. > >>>>>>>>>> First 2 > >>>>>>>> > >>>>>>>> files > >>>>>>>> > >>>>>>>>>> have changed name: sdifframe.hpp and sdifmatrix.hpp appear a= s > >>>>>>>>>> sdif_frame.hpp and sdif_matrix.hpp. That changed, it starts > >>>>>>>> > >>>>>>>> compiling > >>>>>>>> > >>>>>>>>>> but throws an error when trying to compile the wrapped file.= I > >>>>>>>> > >>>>>>>> wonder if > >>>>>>>> > >>>>>>>>>> some renaming has taken place since the interface files were > >>>>>>>>>> done. > >>>>>>>>>> > >>>>>>>>>> I first compiled and installed easdif (and sdif) with no > >>>>>>>>>> problems > >>>>>>>> > >>>>>>>> and > >>>>>>>> > >>>>>>>>>> they work fine. > >>>>>>>>>> > >>>>>>>>>> I did actually write a parser for 1TRC files from scratch ju= st > >>>>>>>>>> by > >>>>>>>>>> following the specifications and reading the hex dumps. > >>>>>>>>>> But for all the other formats, it seems at the moment more > >>>>>>>>>> efficient > >>>>>>>> > >>>>>>>> to > >>>>>>>> > >>>>>>>>>> convert to text and write a small parser. > >>>>>>>>>> > >>>>>>>>>> The whole idea is to be able to provide a scripting layer > >>>>>>>>>> which > >>>>>>>>>> is > >>>>>>>>>> common to some of the softwares working with spectral data > >>>>>>>>>> -supervp > >>>>>>>> > >>>>>>>> and > >>>>>>>> > >>>>>>>>>> loris at the moment (I'm trying to make it work both for mac > >>>>>>>>>> and > >>>>>>>> > >>>>>>>> linux, > >>>>>>>> > >>>>>>>>>> so it is a pity that Pm2 does not seem to have a Linux > >>>>>>>>>> version), > >>>>>>>> > >>>>>>>> spear > >>>>>>>> > >>>>>>>>>> for fast visualization of partial tracking with loris and Pm= 2. > >>>>>>>>>> In > >>>>>>>> > >>>>>>>> this > >>>>>>>> > >>>>>>>>>> way it is possible to choose the best tool for each task -to > >>>>>>>>>> do > >>>>>>>>>> morphing, for instance, it is very useful to resort to Loris= , > >>>>>>>>>> for > >>>>>>>>>> cross-synthesis supervp is much better -also because it is s= o > >>>>>>>>>> fast. > >>>>>>>> > >>>>>>>> Also > >>>>>>>> > >>>>>>>>>> it is useful to do peak analysis in supervp and use the > >>>>>>>>>> information > >>>>>>>> > >>>>>>>> to > >>>>>>>> > >>>>>>>>>> control the morphing envelope in Loris, and things of the > >>>>>>>>>> sort. > >>>>>>>>>> > >>>>>>>>>> Thanks! > >>>>>>>>>> > >>>>>>>>>> Eduardo > >>>>>>>>> > >>>>>>>>> That sounds great! Your work would make for an interesting > >>>>>>>> > >>>>>>>> presentation > >>>>>>>> > >>>>>>>>> at the Ircam Forum Workshops. > >>>>>>>>> > >>>>>>>>> Cheers... > >>>>>>>>> > >>>>>>>>> ...Diemo > >>>>>>>>> > >>>>>>>>>> I forgot, here is the compilation error: > >>>>>>>>>> > >>>>>>>>>> eaSDIF_wrap.cxx:1760: error: no type named =91category=92 in > >>>>>>>>>> =91struct swig::traits<std::pair<std::basic_string<char, > >>>>>>>>>> std::char_traits<char>, std::allocator<char> >, > >>>>>>>>>> std::basic_string<char, std::char_traits<char>, std::alloca > >>>>>>>>>> > >>>>>>>>>> On Tue, 2006-10-10 at 15:49 +0200, Diemo Schwarz wrote: > >>>>>>>>>>> Hi Eduardo, > >>>>>>>>>>> > >>>>>>>>>>> look in the CVS sources of easdif. (Now on > >>>>>>>>>>> http://sourceforge.net/projects/sdif/!) I think the java, > >>>>>>>>>>> perl > >>>>>>>> > >>>>>>>> and > >>>>>>>> > >>>>>>>>>>> python bindings are not part of the distribution, yet, > >>>>>>>>>>> because > >>>>>>>> > >>>>>>>> nobody > >>>>>>>> > >>>>>>>>>>> asked for them up to now. > >>>>>>>>>>> > >>>>>>>>>>> I'm forwarding this question to the sdif mailing list for > >>>>>>>>>>> more > >>>>>>>> > >>>>>>>> details... > >>>>>>>> > >>>>>>>>>>> ...Diemo > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> email message attachment (eaSDIF - Python bindings) > >>>>>>>>>>> > >>>>>>>>>>>> -------- Forwarded Message -------- > >>>>>>>>>>>> From: Eduardo Moguillansky <mog...@gm...> > >>>>>>>>>>>> To: Die...@ir... > >>>>>>>>>>>> Subject: eaSDIF - Python bindings > >>>>>>>>>>>> Date: Tue, 10 Oct 2006 14:36:49 +0200 > >>>>>>> > >>>>>>> -- > >>>>>>> Axel Roebel > >>>>>>> IRCAM Analysis/Synthesis Team > >>>>>>> Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540 > >>>>>>> > >>>>>>> ---------------------------------------------------------------= -- > >>>>>>> -- > >>>>>>> ---- > >>>>>>> -- > >>>>>>> Using Tomcat but need to do more? Need to support web services, > >>>>>>> security? > >>>>>>> Get stuff done quickly with pre-integrated technology to make > >>>>>>> your > >>>>>>> job > >>>>>>> easier > >>>>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apac= he > >>>>>>> Geronimo > >>>>>>> http://sel.as-us.falkag.net/sel? > >>>>>>> cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642 > >>>>>>> _______________________________________________ > >>>>>>> Sdif-devel mailing list > >>>>>>> Sdi...@li... > >>>>>>> https://lists.sourceforge.net/lists/listinfo/sdif-devel > >>>>> > >>>>> -- > >>>>> Axel Roebel > >>>>> IRCAM Analysis/Synthesis Team > >>>>> Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540 > >>> > >>> Eduardo Moguillansky > >>> Str=FCmpfelbacherstrasse 52 > >>> 70329 Stuttgart > >>> +49-711-8829907 > >> > >> Eduardo Moguillansky > >> Str=FCmpfelbacherstrasse 52 > >> 70329 Stuttgart > >> +49-711-8829907 > > > > -- > > Axel Roebel > > IRCAM Analysis/Synthesis Team > > Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540 > > Eduardo Moguillansky > Str=FCmpfelbacherstrasse 52 > 70329 Stuttgart > +49-711-8829907 --=20 Axel Roebel =20 IRCAM Analysis/Synthesis Team Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540 |