I tried using scons to configure and build RG from today's CVS
and hit an error that stopped RG from compiling. It turned out that
liblo had not been detected at all during the scons configure.
Sorry if this is old news - I am still learning my way round scons...
Here is what happened:
I had a quite old liblo, so I downloaded a newer one version 0.16
and installed it in the default location /usr/local/lib:
$ cd liblo-0.16; make install
For some reason scons seems to call pkg-config in such a way that
it fails to detect liblo in /usr/local/lib:
$ cd rosegarden-cvs-20050619.pure
$ scons configure
scons: Reading SConscript files ...
Checking for kde-config : kde-config was found
Checking for kde version : 3.4.0
Checking for the qt library : qt is in /usr/lib/qt
Checking for uic : uic was found as /usr/lib/qt/bin/uic
Checking for moc : moc was found as /usr/lib/qt/bin/moc
Checking for the qt includes : ok /usr/lib/qt/include/
Checking for the kde includes : ok /opt/kde/include/
Checking for int lirc_init() in C library lirc_client... no
Checking for pkg-config ... yes
Checking for alsa >= 1.0 ... yes
Checking for jack >= 0.77 ... no
Checking for dssi >= 0.4 ... no
Checking for C header file ladspa.h... yes
Checking for lrdf_init() in C library lrdf... no
Checking for liblo >= 0.7 ... no
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Checking for mad >= 0.10 ... no
Checking for xft >= 2.1.0 ... yes
$ echo $?
0
scons has finished configuring RG with an exit status of 0.
It's not obvious that the failure to detect liblo is actually an error.
Unfortunately it causes the whole build to fail on sound/AlsaDriver.cpp:
g++ -I/usr/include/alsa -I/usr/X11R6/include -I/usr/include/freetype2
-I/usr/include/freetype2/config -DHAVE_ALSA -DHAVE_LADSPA -DHAVE_XFT
-DQT_THREAD_SUPPORT -DVERSION=\"4-1.1_cvs\" -I/opt/kde/include/
-I/usr/lib/qt/include/ -I/usr/include/alsa -I/usr/X11R6/include
-I/usr/include/freetype2 -I/usr/include/freetype2/config -DHAVE_ALSA
-DHAVE_LADSPA -DHAVE_XFT -O2 -DNDEBUG -DNO_DEBUG -Ibase -Igui -I. -Isound -c -o
sound/AlsaDriver.o sound/AlsaDriver.cpp
sound/AlsaDriver.cpp: In member function `virtual
Rosegarden::MappedComposition* Rosegarden::AlsaDriver::getMappedComposition()':
sound/AlsaDriver.cpp:2385: error: invalid use of undefined type `struct
Rosegarden::ExternalTransport'
sound/SoundDriver.h:135: error: forward declaration of `struct
Rosegarden::ExternalTransport'
sound/AlsaDriver.cpp:2385: error: incomplete type
`Rosegarden::ExternalTransport' used in nested name specifier
sound/AlsaDriver.cpp: In member function `void
Rosegarden::AlsaDriver::handleMTCQFrame(unsigned int, Rosegarden::RealTime)':
sound/AlsaDriver.cpp:2547: error: invalid use of undefined type `struct
Rosegarden::ExternalTransport'
sound/SoundDriver.h:135: error: forward declaration of `struct
Rosegarden::ExternalTransport'
sound/AlsaDriver.cpp:2548: error: incomplete type
`Rosegarden::ExternalTransport' used in nested name specifier
sound/AlsaDriver.cpp: In member function `bool
Rosegarden::AlsaDriver::testForMTCSysex(const snd_seq_event_t*)':
sound/AlsaDriver.cpp:2773: error: invalid use of undefined type `struct
Rosegarden::ExternalTransport'
sound/SoundDriver.h:135: error: forward declaration of `struct
Rosegarden::ExternalTransport'
sound/AlsaDriver.cpp:2774: error: incomplete type
`Rosegarden::ExternalTransport' used in nested name specifier
sound/AlsaDriver.cpp: In member function `bool
Rosegarden::AlsaDriver::testForMMCSysex(const snd_seq_event_t*)':
sound/AlsaDriver.cpp:2883: error: invalid use of undefined type `struct
Rosegarden::ExternalTransport'
sound/SoundDriver.h:135: error: forward declaration of `struct
Rosegarden::ExternalTransport'
sound/AlsaDriver.cpp:2883: error: incomplete type
`Rosegarden::ExternalTransport' used in nested name specifier
sound/AlsaDriver.cpp:2888: error: invalid use of undefined type `struct
Rosegarden::ExternalTransport'
sound/SoundDriver.h:135: error: forward declaration of `struct
Rosegarden::ExternalTransport'
sound/AlsaDriver.cpp:2888: error: incomplete type
`Rosegarden::ExternalTransport' used in nested name specifier
scons: *** [sound/AlsaDriver.o] Error 1
scons: building terminated because of errors.
liblo version 0.16 was already installed in /usr/local/lib:
$ cat /usr/local/lib/pkgconfig/liblo.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: liblo
Version: 0.16
Description: A lightweight OSC server/client library
Libs: -L${libdir} -llo -lpthread
Cflags: -I${includedir}
The problem according to strace and gdb is that scons blindly calls pkg-config
without adding /usr/local/lib to the environment variable PKG_CONFIG_PATH.
When this was done manually, scons detected liblo ok and the build completed ok:
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
$ scons configure
scons: Reading SConscript files ...
Checking for kde-config : kde-config was found
Checking for kde version : 3.4.0
Checking for the qt library : qt is in /usr/lib/qt
Checking for uic : uic was found as /usr/lib/qt/bin/uic
Checking for moc : moc was found as /usr/lib/qt/bin/moc
Checking for the qt includes : ok /usr/lib/qt/include/
Checking for the kde includes : ok /opt/kde/include/
Checking for int lirc_init() in C library lirc_client... no
Checking for pkg-config ... yes
Checking for alsa >= 1.0 ... yes
Checking for jack >= 0.77 ... no
Checking for dssi >= 0.4 ... no
Checking for C header file ladspa.h... yes
Checking for lrdf_init() in C library lrdf... no
Checking for liblo >= 0.7 ... yes
Checking for mad >= 0.10 ... no
Checking for xft >= 2.1.0 ... yes
$ scons
[...]
scons: done building targets.
For comparison, the configure and build steps still work ok
using the traditional GNU autoconf method, i.e. there is no need
for manually setting up PKG_CONFIG_PATH.
Can we get scons and/or SConstruct files working like that?
William
Incidentally, why is scons reporting "two different environments" below?
$ scons
scons: Reading SConscript files ...
scons: warning: Two different environments were specified for target
AlsaDriver.o,
but they appear to have the same action: $CXX $CXXFLAGS $CPPFLAGS
$_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
File "sound/SConscript", line 58, in ?
scons: warning: Two different environments were specified for target AlsaPort.o,
but they appear to have the same action: $CXX $CXXFLAGS $CPPFLAGS
$_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
File "sound/SConscript", line 58, in ?
scons: warning: Two different environments were specified for target
JackDriver.o,
but they appear to have the same action: $CXX $CXXFLAGS $CPPFLAGS
$_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
File "sound/SConscript", line 58, in ?
scons: warning: Two different environments were specified for target
PlayableAudioFile.o,
but they appear to have the same action: $CXX $CXXFLAGS $CPPFLAGS
$_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
File "sound/SConscript", line 58, in ?
scons: warning: Two different environments were specified for target
SoundDriver.o,
but they appear to have the same action: $CXX $CXXFLAGS $CPPFLAGS
$_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
File "sound/SConscript", line 58, in ?
scons: warning: Two different environments were specified for target
SoundDriverFactory.o,
but they appear to have the same action: $CXX $CXXFLAGS $CPPFLAGS
$_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES
File "sound/SConscript", line 58, in ?
scons: done reading SConscript files.
scons: Building targets ...
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel