[clam-devel] Network compilation problem

SAn gringotumadre at gmail.com
Fri Apr 23 11:11:00 PDT 2010

On Fri, Apr 23, 2010 at 09:47, David García Garzón
<david.garcia at barcelonamedia.org> wrote:
> Adding that to SHCXXFLAGS has sense, adding to CPPPATH would be even nicer,
> although, as you say, maybe there is a better way based on pkg-config, and/or
> patching qt4.py to work well without this.
> But QT4_MOC as defined in the patch has no sense at all. This option is used
> as moc command (tipical value is '/usr/bin/moc'). I cannot find an explanation
> for it working but that the statement has no effect in the place it is patched
> (so build will work without the statement) or that moc generated files were
> generated in previous executions, (so the patch wouldn't work with a clean
> build).

$ QTDIR=/usr/lib/qt scons install prefix=$pkgdir/usr clam_prefix=/usr
qt_plugins_install_path=/usr/lib/qt/plugins/designer release=0
moc -I/home/san/clam/clean/pkg/usr/include -I/usr/local/include
-I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include
-I/usr/include/libxml2 -I/usr/include/glibmm-2.4
-I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0
-I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/alsa -I/usr/include/QtCore
-I/usr/include/QtGui -I/usr/include/QtOpenGL -I/usr/include/QtXml
-I/usr/include/QtSvg -I/usr/include/QtUiTools
-I/usr/include/QtDesigner -I/usr/include/QtWebKit
-I/usr/include/QtNetwork -o
XTERM_SHELL, /bin/bash
PATH, /bin:/usr/bin:/sbin:/usr/sbin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin
TERM, xterm
QT_XFT, true
PKG_CONFIG_PATH, /usr/lib/pkgconfig:/opt/qt/lib/pkgconfig
_, /usr/bin/scons
PWD, /home/san/clam/Ms/src/NetworkEditor-1.4.0
QTDIR, /usr/lib/qt
Building src/clamWidgetsPlugin/generated/moc_KeySpacePlugin.cxx with action:
['moc', '-I/home/san/clam/clean/pkg/usr/include',
'-I/usr/local/include', '-I/usr/include/libxml++-2.6',
'-I/usr/lib/libxml++-2.6/include', '-I/usr/include/libxml2',
'-I/usr/include/glibmm-2.4', '-I/usr/lib/glibmm-2.4/include',
'-I/usr/include/sigc++-2.0', '-I/usr/lib/sigc++-2.0/include',
'-I/usr/include/glib-2.0', '-I/usr/lib/glib-2.0/include',
'-I/usr/include/alsa', '-I/usr/include/QtCore',
'-I/usr/include/QtGui', '-I/usr/include/QtOpenGL',
'-I/usr/include/QtXml', '-I/usr/include/QtSvg',
'-I/usr/include/QtUiTools', '-I/usr/include/QtDesigner',
'-I/usr/include/QtWebKit', '-I/usr/include/QtNetwork', '-o',
src/clamWidgetsPlugin/KeySpacePlugin.hxx:33: Error: Undefined interface
scons: *** [src/clamWidgetsPlugin/generated/moc_KeySpacePlugin.cxx] Error 1
scons: building terminated because of errors.

(i have patched scons *only* to print more stuff, and SConstruct to
use -O0, wishing to down the build time)

So, i changed
its okey now?

>> > I would also like that as most platforms could rely on pkg-config for qt.
>> > Did you have problems using it (by undefining QTDIR)?
>> Yes. Its not explicit in the dependences but the meta package
>> base-devel (with gcc, fakeroot,
>> pkg-config) its a must when you use the AUR repositories (its in the
>> AUR guide). So it should be
>> using pkg-config and it doesnt find QTDIR.
> Forgive the tool about the warning on no QTDIR defined. It shouldn't be needed
> if proper pkg-config files for Qt libs is available.
Take a look, without defining QTDIR

$ scons install prefix=../../pkg/usr clam_prefix=/usr
qt_plugins_install_path=/usr/lib/qt/plugins/designer release=0
scons: Reading SConscript files ...
Loading nsis tool...
Lodading dmg tool...
Version:  1.4.0
Package version:  1.4.0
scons: done reading SConscript files.
scons: Building targets ...
/opt/qt/bin/uic -o src/generated/ui_About.hxx src/About.ui
Building src/generated/ui_About.hxx with action:
['/opt/qt/bin/uic', '-o', '"src/generated/ui_About.hxx"', '"src/About.ui"']
uic: File generated with too recent version of Qt Designer (4.0 vs. 3.3.8)
scons: *** [src/generated/ui_About.hxx] Error 1
scons: building terminated because of errors.

but the pkgconfig looks good (well, thanks to the network editor now i
know that pkg-config exists):

[san at abulafia NetworkEditor-1.4.0]$ cat /usr/lib/pkgconfig/QtCore.pc
qt_config=lex yacc warn_on uic resources qt warn_on release
incremental link_prl exceptions no_mocdepend release stl
qt_no_framework silent system-sqlite release shared dll largefile stl
precompile_header mmx 3dnow sse sse2 dylib create_prl link_prl
depend_includepath QTDIR_build use_libmysqlclient_r qt_install_headers
qt warn_on depend_includepath qmake_cache target_qt hide_symbols
bsymbolic_functions create_libtool create_pc explicitlib moc thread
shared dll

Name: Qtcore
Description: Qtcore Library
Version: 4.6.2
Libs: -L${libdir} -lQtCore
Libs.private: -L/usr/lib  -lpthread -lz -lm -ldl -pthread
-lgthread-2.0 -lrt -lglib-2.0
Cflags: -DQT_SHARED -I/usr/include -I${includedir}

>> Withoud using pkg-config
>> CLAM doesnt build because
>> it cant find libxml++-2.6 (something like
>> /usr/include/libxml++/libxml++.h and not
>> /usr/include/libxml++-2.6/libxml++-2.6.h)
> I can't get the point on what you say. You can (must) use pkg-config for the
> rest of the packages (libxml++...).

Well i thougt that pkg-config wasnt a dependency.

I have a few more questions ;)

Take a look to the prefix's on *.pc

[san at abulafia src]$ cat /usr/lib/pkgconfig/clam_core.pc
name = clam_core
prefix = /home/san/clam/clean/pkg/usr
libdir = ${prefix}/lib
includedir = ${prefix}/include

Name: ${name}
Description: C++ Framework for analysis, synthesis and transformation
of music audio signals
Url: http://clam-project.org
Version: 1.4.0
Libs: -L${libdir} -l${name}
Cflags: -I${includedir} -DCLAM_FLOAT -DUSE_XMLPP=1 -DCLAM_USE_XML
-DCLAM_USE_XML -DUSE_LADSPA=1 -I/usr/local/include
-I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include
-I/usr/include/libxml2 -I/usr/include/glibmm-2.4
-I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0
-I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0

[san at abulafia src]$ cat /usr/lib/pkgconfig/clam_qtmonitors.pc
name = clam_qtmonitors
prefix = /home/san/clam/Ne/pkg
libdir = ${prefix}/lib
includedir = ${prefix}/include

Name: ${name}
Description: C++ Framework for analysis, synthesis and transformation
of music audio signals
Url: http://clam-project.org
Version: 1.4.0
Requires: clam_core, clam_processing, clam_audioio
Libs: -L${libdir} -l${name}
Cflags: -I${includedir}

they are wrong? I think they should say prefix = /usr, and that value
is taken from the  scons install --prefix=DIR
but because i am "doing the package"  and not using the "final" prefix.
How should i change them? In post install or what?

How to tell NetworkEditor the correct path of example-data so when i
click in examples it opens directly that?
Now it is pointing to the pkgdir/usr/share instead of /usr/share/blah

I had read the sources of the debian packages, but still dont
understand! (well i dont have experience with debian)

thanks! and sory for the length

More information about the clam-devel mailing list