Hi Bill,

As a complement to Daniel solution :
I've commented this part of the code so that scons ignore PYTHONPATH env variable.

(The code is available in branch u/fjammes/eupspkg. Please note that i've to upgrade it to eupspkg very last version so that it works again, whereas it is working fine with eupspkg previous version.)

Here's some details.

in core/site_scons/detect.py

    # Automagically steal PYTHONPATH from envvar
    ppDirs = getExt("PYTHONPATH")
    #existPp = os.getenv("PYTHONPATH", None)
    #print "DEBUG : %s %s" % (existPp, ppDirs)
    #if existPp: ppDirs.prepend(existPp)
    pp = env.get("PYTHONPATH", [])
    pp.extend(ppDirs)
    extraTgts["PYTHONPATH"] = ppDirs
    print "Looking for protoc in custom"
    # Import PROTOC
    if "PROTOC" in dir(custom): env['PROTOC'] = custom.PROTOC
    else: print "didn't find protoc in custom."
    return custom


And then i use next custom.py file, which relies on env variables (which are in my case setted up by eups) :

fjammes@clrlsst-dbmaster-vm:~/src/qserv (u/fjammes/eupspkg) $ cat core/custom.py
import os
import distutils.sysconfig as ds

# env var XROOTD_DIR points to xrootd install dir
XROOTD_DIR=os.getenv("XROOTD_DIR")
# env var MYSQL_DIR points to mysql install dir
MYSQL_DIR=os.getenv("MYSQL_DIR")
# idem
PROTOBUF_DIR=os.getenv("PROTOBUF_DIR")
# add to contains path to zopeinterface, twisted, protobuf and mysqlpython modules
PYTHONPATH=os.getenv("PYTHONPATH")

XROOTD_INC = os.path.join(XROOTD_DIR, "include","xrootd")
MYSQL_INC = os.path.join(MYSQL_DIR,"include")

MYSQL_LIB = os.path.join(MYSQL_DIR,"lib","mysql")
XROOTD_LIB = os.path.join(XROOTD_DIR,"lib64")
PROTOBUF_LIB = os.path.join(PROTOBUF_DIR,"lib")

PROTOC=os.path.join(PROTOBUF_DIR,"bin","protoc")

Hope this help,

Fabrice

On 02/20/2014 04:57 AM, Daniel L. Wang wrote:
[log in to unmask]" type="cite">
Hi Bill,

Sorry about that. You are indeed correct! It's a bug. If you haven't figured it out already, the right fix is probably to replace:
    if existPp: ppDirs.prepend(existPp)
with:
    if existPp: ppDirs = existPp.split(":") + existPp

...right? I haven't tested it, but it looks much more sensible than what it replaces.


Let me know if it does/doesn't work.

Hope this helps!
-Daniel

On 02/19/2014 04:01 PM, Bill Chickering wrote:
[log in to unmask]" type="cite"> Hi Daniel -

I've made progress with the new qserv, but I'm still running into problems. Queries are failing with:
ERROR 4110 (Proxy): Qserv error: error locking result, check qserv/db config.

In my effort to debug this, I'm having difficulty rebuilding qserv. I thought the following should work:
export PYTHONPATH=$QSERV_BASE/qserv/core/bld/dist
export LD_LIBRARY_PATH=$QSERV_BASE/lib/mysql:$QSERV_BASE/lib
pwd $QSERV_BASE/qserv/core
scons

but this yields:
scons: Reading SConscript files ...
Building into bld
using custom.py
AttributeError: 'list' object has no attribute 'prepend':
  File "/u1/bchick/src/qserv-modules/core/SConstruct", line 17:
    exports=['env', 'ARGUMENTS'])
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "/u1/bchick/src/qserv-modules/core/bld/SConscript", line 25:
    custom = detect.importCustom(env, extraTgts)
  File "/u1/bchick/src/qserv-modules/core/site_scons/detect.py", line 189:
    if existPp: ppDirs.prepend(existPp)

Am I using the correct procedure? Is this a bug?

Thanks for your help.
-- Bill



Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1




Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1