Am Samstag, 16. Dezember 2006 17:37 schrieb Bo Peng:

> Your request is heard, and implemented. It turns out to be easy to get
> the location of SConstruct from within scons so you can start scons
> >from any directory now.

Thanks. I want to build like this because I can then use multiple build 
directories with different options (debug/release/profile/stdlib-debug 
etc.) In order to do so the build system must not write anything into the 
source directory.

> scons will build in build if you give build_dir=. and build/debug
> otherwise. It will install to build/install with the DESTDIR option.

OK, I tried that and here comes the next error: It does not find qt if I 
don't give the qt dir on the command line:


~/lyx-1.5/build-tree-scons$ scons -f ../development/scons/SConstruct 
build_dir=.
scons: Reading SConscript files ...
Qt library directory is not found. Please specify it using qt_lib_path


Since pkg-config finds qt just fine I should not be forced to give any qt 
commandline option (and even if I would not have pkg-config it should just 
work because qt is installed in /usr/include, /usr/lib and /usr/bin). Next 
try:

~/lyx-1.5/build-tree-scons$ scons -f ../development/scons/SConstruct 
build_dir=. qt_lib_path=/usr/lib

Now it finds QtCore and QtGui, but then wants a QtCore_debug and 
QtGui_debug:


Processing files in src/frontends/qt4...
Loading qt4 tool...

scons: warning: QTDIR variable is not defined, using moc executable as a 
hint (QTDIR=None)
File "/home/georg/lyx-1.5/development/scons/qt4.py", line 162, in _detect
Package QtCore_debug was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtCore_debug.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtCore_debug' found
Package QtGui_debug was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtGui_debug.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtGui_debug' found
OSError: 'PKG_CONFIG_PATH=/usr/lib pkg-config QtCore_debug 
QtGui_debug --libs --cflags' exited 1:
  File "/home/georg/lyx-1.5/development/scons/SConstruct", line 1714:
    qt4env.EnableQt4Modules(qt_libs, debug = (mode == 'debug'))
  File "/home/georg/lyx-1.5/development/scons/qt4.py", line 355:
    self.ParseConfig('PKG_CONFIG_PATH=%s/lib 
pkg-config %s --libs --cflags'%
  File "/usr/lib/scons/SCons/Environment.py", line 1103:
    return function(self, self.backtick(command))
  File "/usr/lib/scons/SCons/Environment.py", line 468:
    raise OSError("'%s' exited %s" % (command, status))


I don't know any Linux distro that has QtCore_debug and QtGui_debug 
packages. Why does it search for these? If I want to debug qt I can load 
the debug symbols from an extra file that comes with the qt debug package. 
Apart from that building LyX in debug mode does not automatically mean 
that I also want to debug qt. Commenting out line 348 in qt4.py seems to 
fix this problem, at least it starts to compile.

BTW1 the error message above is misleading: QTDIR cannot be given on the 
scons command line, it is qt_dir.

BTW2 I get bogus boost messages:

Checking for boost library signals, regex, filesystem, iostreams... 
Warning: Can not find an appropriate boost library in /usr/lib.
Warning: Can not find an appropriate boost library in /usr/lib.
Warning: Can not find an appropriate boost library in /usr/lib.
Warning: Can not find an appropriate boost library in /usr/lib.
Warning: Can not find an appropriate boost library in /usr/lib.
Warning: Can not find an appropriate boost library in /usr/lib.

This is double wrong. I do have the boost libraries installed in /usr/lib, 
so they should be found. And it wants to build with the included boost, so 
they should not be searched in the first place.


Georg


PS: I am deliberately not looking at any scons documentation. If scons 
should replace the autotools one day it needs to be as simple to use as a 
configure; make; make install; sequence.

Reply via email to