[clam-devel] I want to collaborate!

Roberto Chauderlot Marchamalo rchauderlot at gmail.com
Mon Jun 21 08:25:35 PDT 2010


Hi!

I'll try to write in english because I dont want give you more work. But, I
warn that my english is very very bad.

First of all, the way that I 'fixed' the id3lib to make it install was
change the configuration of mac ports, not really a patch. I changed the
configuration of the architectures to compile in the "universal" variant. It
was set to "x86_64 i386", and I seted temporally to "x86_64". It's not a
good solution, and probably, that library will not work on 32bit systems.
But, I didn't want to spend a lot of time on it. Anyway, I think that I'm
building the library for the x86_64 architecture because I'm not using any
kind of cross compiling directive, but I'm not sure what is the default
architecture of the compiler.

I think that a solution for the qt4-mac executables suffixes is add a line
in clam/CLAM/scons/sconstools/qt4.py after line 226:
219 def locateQt4Command(env, command, qtdir) :
220 suffixes = [
221 '-qt4',
222 '-qt4.exe',
223 '4',
224 '4.exe',
225 '',
226 '.exe',
 '-mac',
227 ]

I think it will work fine meanwhile the qt4 project fix the pkg-config bug,
and I think that it's better solution than the unsuffixed symbolic links.

Second, I've found why scons doesn't include the soname link while compiles
the bundle. It's because there is a bug in a scons script of the main lib,
and it doesn't create the soname link during the install. The bug is in file
clam/CLAM/scons/libs/clam_build_helpers.py at line 358 and in the file
scons/sconstools/clam.py at line 186 too:
 def generate_so_name( target, source, env ) :
 source_dir = os.path.dirname( str(source[0]) )
 cwd = os.getcwd()
 os.chdir( source_dir )
 if sys.platform == 'linux2' :
 os.system( "/sbin/ldconfig -n ." )
 os.chdir(cwd)
 return None
I've modified it to:
def generate_so_name( target, source, env ) :
 if sys.platform == 'linux2' :
 source_dir = os.path.dirname( str(source[0]) )
 cwd = os.getcwd()
 os.chdir( source_dir )
 os.system( "/sbin/ldconfig -n ." )
 os.chdir(cwd)
 elif sys.platform == 'darwin':
 source_file = os.path.basename( str(source[0]) )
 os.system( "ln -sf %s %s"%(source_file,str(target[0]) ))
 return None

With this changes, I could build the Annotator.app, NetworkEditor.app and
Chordata.app bundles, and all of them include their dependencies. But now,
they crashes when they init the qt lib. I'm attaching the log that the OS
throws. I didn't ever work with Qt, and I don't know why it crashes, maybe
some non-binary dependencies not included in the bundle.

The problem what I've experienced compiling Chordata was because I didn't
make the "scons install" of the networkeditor app :P

I don't have so much time, and I don't know if I could lead :S ......but I
still try to spend some time if I could.

Roberto.

On Fri, Jun 18, 2010 at 9:30 AM, David García Garzón <
david.garcia at barcelonamedia.org> wrote:

> Translated in short. Context: compiling in mac 'snow leopard'.
>
> On Friday 18 June 2010 01:08:42 Roberto Chauderlot Marchamalo wrote:
> > Hello again!
> >
> > Os escribo en español otra vez....sorry.
> >
> > He hecho avances intentando compilar la librería. De hecho, lo que es la
> > librería en sí, ya la he conseguido compilar.
> >
> > Primero quería comentaros que he tenido algún problemilla con las
> > dependencias que pone en la wiki que hay que instalar. Primero, las
> > librerías xercesc y id3lib, no compilan en mi snow leopard. Creo que es
> > debido a que en macports están teniendo algún problema con el snow
> leopard
> > y la arquitectura i386, y hay cosas que no compilan bien. Solucionar el
> > problema de la primera librería fue fácil, existe un paquete que se llama
> > xercesc3  (en vez de xercesc a secas, como pone en la wiki, que es para
> la
> > versión 2), y este compila bien. Para arreglar la librería id3lib, he
> > tenido que hacer un pequeño apaño y no compilarlo para la arquitectura
> > i386, y hacerlo sólo para la x86_64. Espero que esto no acarree
> > consecuencias después.
>
> Trans: problems with xercesc and id3lib; installed xercesc3, id3lib
> patched.
>
> Comment: we moved to xercesc3 recently so the option you took is the
> correct.
> Would be nice if you send the id3lib patch to the list and to the macport
> maintainers.
>
> > Por cierto, también os quería comentar que en la wiki sólo indica la
> manera
> > "deprecated" de instalar jack. Ahora mismo está paqueteado, y se puede
> > instalar fácilmente con un "sudo port install jack". Y tampoco se comenta
> > nada de instalar portmidi, que también está paqueteado y sería lo mismo
> > "sudo port install portmidi". Todo se puede instalar desde macports.
>
> Trans: jack and portmidi are available now as ports.
>
> Comment: Feel free to update the wiki yourself. If the old methods still
> have
> sense for old mac version you can move them to a chapter in the end. If the
> macports are available for all the versions, just remove those paragraphs.
>
> > Después compilé la librería en sí, y sin problemas. Pero el resto de
> > aplicaciones sí me ha dado problemas. Primero es que, el paquete de
> > qt4-mac que hay en macports llama a todos los ejecutables de qt con el
> > sufijo "-mac" (moc-mac, uic-mac, rcc-mac, lupdate-mac, lrelease-mac,
> etc),
> > y los scripts de compilación buscan los normales. Y como no tengo ni idea
> > de scons, lo solucioné creando enlaces simbólicos con los nombres 'linux'
> > apuntando a los de mac y añadiendo las siguientes variable de entorno:
> > export QTDIR=/opt/local/bin
> > export PKG_CONFIG_PATH=/opt/local/libexec/qt4-mac/lib/pkgconfig/
> > (supongo que habría que poner en la wiki lo de las variables y para lo de
> > los ejecutables supongo que habría que modificar los scripts :S)
>
> Trans: clam libs compiled with no problem, apps gave problems with qt,
> qt4-mac
> suffixes -mac all the binaries. He fixed it by adding unsuffixed links and
> defining QTDIR and PKG_CONFIG_PATH as above.
>
> Comment: The perfect solution would be using pkg-config to locate the qt
> binaries and just setting the PKG_CONFIG_PATH. The problem is that rcc,
> lupdate, lrelease can not be taken from the pkg-config by now. I want to
> file
> a bug in qt. Meanwhile your option should work.
>
> > Luego, el programa NetworkEditor, tiene como parámetro la aplicación
> > QtDesigner.app, pero en el paquete qt4-mac de macports ya no viene en
> > forma de bundle '.app' (pero sí que es invocable desde la consola). Así
> > que, aunque lo he compilado no me deja crear el paquete.
>
> Trans: QtDesigner is no more a bundle so the package build which ask for
> the
> builder fails.
>
> Comment: No idea of the implications of QtDesigner not being a bundle on
> how
> we should package it. Any other mac developer reading?
>
> > Después, el SMSTools no me deja compilarlo porque dice que no encuentra
> > unas cabeceras (de qt): Macario:SMSTools chauder$ scons prefix=/opt/local
> > clam_prefix=/opt/local release=1 scons: Reading SConscript files ...
> > Loading nsis tool...
> > Loading Bundle tool
> > Lodading dmg tool...
> > Version:  0.4.13
> > Package version:  0.4.13~svn14280
> > scons: done reading SConscript files.
> > scons: Building targets ...
> > == Compiling vmqt/CLAM/QtWaitMessageImpl.cxx
> > vmqt/CLAM/QtWaitMessageImpl.cxx:1:21: error: qlayout.h: No such file or
> > directory vmqt/CLAM/QtWaitMessageImpl.cxx:2:20: error: qlabel.h: No such
> > file or directory vmqt/CLAM/QtWaitMessageImpl.cxx:3:20: error: qtimer.h:
> > No such file or directory In file included from
> > vmqt/CLAM/QtWaitMessageImpl.cxx:4:
> > vmqt/CLAM/WaitMsgIndicator.hxx:4:20: error: qframe.h: No such file or
> > directory In file included from vmqt/CLAM/QtWaitMessageImpl.cxx:5:
> > vmqt/CLAM/QtWaitMessageImpl.hxx:5:21: error: qdialog.h: No such file or
> > directory In file included from vmqt/CLAM/QtWaitMessageImpl.cxx:4:
> > vmqt/CLAM/WaitMsgIndicator.hxx:11: error: expected class-name before ‘{’
> > token vmqt/CLAM/WaitMsgIndicator.hxx:12: error: ISO C++ forbids
> > declaration of ‘Q_OBJECT’ with no type vmqt/CLAM/WaitMsgIndicator.hxx:13:
> > error: expected ‘;’ before ‘public’ vmqt/CLAM/WaitMsgIndicator.hxx:17:
> > error: expected `:' before ‘slots’ vmqt/CLAM/WaitMsgIndicator.hxx:18:
> > error: expected primary-expression before ‘void’
> > vmqt/CLAM/WaitMsgIndicator.hxx:18: error: ISO C++ forbids declaration of
> > ‘slots’ with no type vmqt/CLAM/WaitMsgIndicator.hxx:18: error: expected
> > ‘;’ before ‘void’ vmqt/CLAM/WaitMsgIndicator.hxx:21: error: ‘QPaintEvent’
> > has not been declared In file included from
> > vmqt/CLAM/QtWaitMessageImpl.cxx:5:
> > vmqt/CLAM/QtWaitMessageImpl.hxx:16: error: expected class-name before ‘{’
> > token vmqt/CLAM/QtWaitMessageImpl.hxx:18: error: expected `)' before ‘*’
> > token vmqt/CLAM/QtWaitMessageImpl.hxx:24: error: ‘QCloseEvent’ has not
> > been declared vmqt/CLAM/QtWaitMessageImpl.cxx:11: error: expected `)'
> > before ‘*’ token vmqt/CLAM/QtWaitMessageImpl.cxx: In member function
> ‘void
> > CLAM::VM::QtWaitMessageImpl::LabelText(const std::string&)’:
> > vmqt/CLAM/QtWaitMessageImpl.cxx:32: error: invalid use of incomplete type
> > ‘struct QLabel’ vmqt/CLAM/QtWaitMessageImpl.hxx:7: error: forward
> > declaration of ‘struct QLabel’ vmqt/CLAM/QtWaitMessageImpl.cxx: At global
> > scope:
> > vmqt/CLAM/QtWaitMessageImpl.cxx:35: error: variable or field ‘closeEvent’
> > declared void vmqt/CLAM/QtWaitMessageImpl.cxx:35: error: ‘QCloseEvent’
> was
> > not declared in this scope vmqt/CLAM/QtWaitMessageImpl.cxx:35: error: ‘e’
> > was not declared in this scope scons: *** [vmqt/CLAM/QtWaitMessageImpl.o]
> > Error 1
> > scons: building terminated because of errors.
> >
> > Supongo que esto se arreglará instalando el qt4-mac-devel, que no lo
> > instalé porque en la wiki no lo decía y todavía no he tenido tiempo (el
> > qt4-mac me tardó unas 8 horas en instalarse, esto tardará.......).
>
> Trans: Problems compiling SMSTools with the output above, maybe a missing
> install for qt4-mac-devel?
>
> Comment: Maybe. They might have split the package but then no qt app should
> compile. A more likely reason is the way SMSTools includes Qt without the
> QtGui/ QtCore/... prefixes. That would highlight a bug in the qt4.py tool
> we
> provide when specifying the CPPPATH. If Qt includes are in
> /what/ever/include
> that directory and also /what/ever/include/{QtGui,QtCore,...} should be
> added.
> Try to compile with the verbose=1 option and send the command line to see
> which -I options appear.
>
> > Luego seguí con Annotator, que si que compiló, creo la aplicación ".app"
> y
> > un dmg para instalarlo, pero cuando intentas ejecutarlo dice que faltan 3
> > librerías que no están en el paquete: libclam_core.1.4.dylib
> > libclam_processing.1.4.dylib
> > libclam_audioio.1.4.dylib
> > Y por lo que he visto es el script de compilación el que no las copia :S
> Lo
> > he intentado hacer a mano de las que he encontrado en /opt/local/lib/
> > pero, primero sólo encuentro la versión 1.4.1, y que luego, incluir esas
> > versiones, la aplicación me empieza a pedir las librerías en /opt/local/
> y
> > no debería. Dyld Error Message:
> >   Library not loaded: /opt/local//lib/libclam_core.1.4.dylib
> >   Referenced from:
> >
> /Users/chauder/Documents/Proyectos/clam/clam/Annotator/Annotator.app/Conte
> > nts/MacOS/../Frameworks/libclam_audioio.1.4.dylib Igual, si vuelvo a
> > compilar la librería con la opción de sandbox, esto se soluciona.
>
> Trans: Annotator creates the dmg but when installed it complains about
> missing
> libraries.
>
> Comment: We changed the way to name libraries including mac but we didn't
> test
> mac. So sorry for the inconvenience. Maybe what is missing is a 'soname'
> link
> with that name pointing to the fully versioned library. If that solves the
> problem tell me and i will add the step in the scons.
>
> > Es script de compilación de chordata no deja tampoco, me da el siguiente
> > error: Macario:chordata chauder$
> >
> PKG_CONFIG_PATH=/opt/local/libexec/qt4-mac/lib/pkgconfig/:/Users/chauder/D
> > ocuments/Proyectos/clam/clam/NetworkEditor/ scons prefix=/opt/local
> > clam_prefix=/opt/local release=1 scons: Reading SConscript files ...
> > Loading nsis tool...
> > Loading Bundle tool
> > Lodading dmg tool...
> > Version:  1.1.0
> > Package version:  1.1.0~svn14280
> > Package clam_qtmonitors was not found in the pkg-config search path.
> > Perhaps you should add the directory containing `clam_qtmonitors.pc'
> > to the PKG_CONFIG_PATH environment variable
> > No package 'clam_qtmonitors' found
> > OSError: 'PKG_CONFIG_PATH=/opt/local/lib/pkgconfig pkg-config clam_core
> > clam_audioio clam_processing clam_qtmonitors --libs --cflags' exited 1:
> > File "/Users/chauder/Documents/Proyectos/clam/clam/chordata/SConstruct",
> > line 70: ], CLAMInstallDir)
> >   File
> >
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/scons-1.3
> > .0/SCons/Environment.py", line 224: return apply(self.method, nargs,
> > kwargs)
> >   File "/opt/local/share/clam/sconstools/clam.py", line 166:
> >     ' '.join(libs)))
> >   File
> >
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/scons-1.3
> > .0/SCons/Environment.py", line 1477: return function(self,
> > self.backtick(command))
> >   File
> >
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/scons-1.3
> > .0/SCons/Environment.py", line 596: raise OSError("'%s' exited %d" %
> > (command, status))
> > Yo le pongo la variable de entorno que pide, pero el script la
> > sobreescribe. Así que no funciona.
>
> Trans: chordata fails to locate
>
> Comment: it complains about a library qtmonitor that is installed with
> NetworkEditor. Maybe you should 'scons install' NetworkEditor and then try
> compile chordata. Anyway no guarantees that the chordata bundle will work
> at
> all. Some scons hacking could be needed to include such library in the
> bundle.
>
> > Y luego el programa Voice2Midi tiene las directivas de compilación para
> > crear el "distribuible" a medio hacer.
>
> Trans: Voice2Midi is work in progress.
>
> Comment: I guess we never really addressed Voice2Midi on mac.
>
> > Así que después de una larga sesión de compilacion, no he conseguido nada
> > útil. Pero espero que a vosotros si que os sea útil este feedback.
> >
> > Si tengo un poco de tiempo libre intento aprender scons y os ayudo con
> los
> > scripts, que están un poco desastrillos :P
>
> Trans: Nothing useful from compilation. He will help as he gets expertise
> with
> scons.
>
> Sorry, Roberto, for the inconveniences. Thanks for your effort. The mac
> platform needs some love. We would be very grateful if you take the lead on
> that. We will help you as most as we can with scons or any other problem it
> could jump.
>
> I hope that, by adding the soname links, you will be able to run dmg's that
> built. Are the binaries you built without dmg, at least, runnable?
>
> David.
>
>
>
> > On Mon, Jun 7, 2010 at 3:35 PM, David García Garzón
> > <david.garcia at barcelonamedia.org<mailto:david.garcia at barcelonamedia.org
> >>
> > wrote:
> >
> > On Monday 07 June 2010 14:33:03 Roberto Chauderlot Marchamalo wrote:
> > > Hello,
> > > Pau, I'll try it. I have windows and linux devel skills but no
> > > experience with the mac development enviroment. But, I'm interested in
> > > learning hat enviroment :D
> > > David, yes I've followed the link on the mac os x build page of the
> > > wiki: http://clam-project.org/wiki/Devel/Mac_OSX_build It has this
> > > text:
> > >
> > > "You can choose either download a source tarball from the clam website:
> > >
> > > http://clam.iua.upf.edu//download-source.html
> > >
> > > or get the latest version of subversion. In this case you'll also need
> > >
> > > to install subversion macport:
> > >   $ sudo port install subversion
> > >   $ svn co http://iua-share.upf.edu/svn/clam/trunk"
> > >
> > > thank you!
> >
> > I fixed it. Thanks.
> >
> > > 2010/6/7 David García Garzón
> > > <david.garcia at barcelonamedia.org<mailto:
> david.garcia at barcelonamedia.org>
> > > >
> > >
> > > > BTW, Roberto, did you take the wrong link from any clam related page
> we
> > > > could fix?
> > > >
> > > > David.
> > > >
> > > > On Monday 07 June 2010 10:43:49 Pau Arumí wrote:
> > > > > clam is not longer hosted at iua since long time ago. clam lives in
> > > > > http://clam-project.org
> > > > > we used to have a redirection to but it is no longer active.
> > > > >
> > > > > about generating mac binaries, you are welcomed. it is basically
> > > > > documented http://clam-project.org/wiki/Devel/Mac_OSX_build
> > > > > but requires some development experience.
> > > > >
> > > > > P
> > > > >
> > > > > El dl 07 de 06 de 2010 a les 05:49 +0200, en/na Roberto va
> escriure:
> > > > > > Hola!!
> > > > > >
> > > > > >
> > > > > > Perdonad que os escriba en español, pero es que no me manejo muy
> > > > > > bien con el ingles. Pero espero que esto no suponga un problema
> :P
> > > > > >
> > > > > >
> > > > > > He visto publicado el programa CHORDATA en varios blogs de
> guitarra
> > > > > > y me ha encantado. Llevaba años buscando una herramienta similar,
> > > > > > incluso, empecé a programar algo parecido en matlab años atrás.
> > > > > > Pero nunca llegué a hacer nada funcional (en otro lenguaje) por
> > > > > > falta de tiempo. Así que, os felicito por el proyecto!!!! Me
> > > > > > encanta.
> > > > > >
> > > > > >
> > > > > > He leido en un blog, que no habéis sacado versión para mac del
> > > > > > chordata porque no tenéis ninguna máquina mac a mano. Pues, si
> > > > > > queréis yo os hago el binario para mac. Tengo un macbook
> blanquito
> > > > > > aunque no he desarrollado nunca para mac. He intentado bajarme el
> > > > > > código de http://clam.iua.upf.edu/download-source.html pero me
> ha
> > > > > > dado un bonito error 500, así que no he podido probar a compilar
> > > > > > nada.
> > > > > >
> > > > > >
> > > > > > Entonces, si queréis que os ayude generando la versión para mac,
> yo
> > > > > > encantado, que le daré buen uso ;)
> > > > > >
> > > > > >
> > > > > > Un saludo!
> > > > > > Roberto
> > > > >
> > > > > _______________________________________________
> > > > > clam-devel mailing list
> > > > > clam-devel at lists.clam-project.org<mailto:
> clam-devel at lists.clam-projec
> > > > > t.org>
> > > > >
> http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.o
> > > > > rg
> > > >
> > > > _______________________________________________
> > > > clam-devel mailing list
> > > > clam-devel at lists.clam-project.org<mailto:
> clam-devel at lists.clam-project.
> > > > org>
> > > >
> http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org
> > >
> > > _______________________________________________
> > > clam-devel mailing list
> > > clam-devel at lists.clam-project.org<mailto:
> clam-devel at lists.clam-project.or
> > > g>
> http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org
> >
> > _______________________________________________
> > clam-devel mailing list
> > clam-devel at lists.clam-project.org<mailto:
> clam-devel at lists.clam-project.org>
> > http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org
> _______________________________________________
> clam-devel mailing list
> clam-devel at lists.clam-project.org
> http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20100621/93a0aea3/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: annotator crash.log
Type: application/octet-stream
Size: 31268 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20100621/93a0aea3/attachment-0003.obj>


More information about the clam-devel mailing list