May 2
Trying to figure out how to tell Scons to include *2* paths for "fw" includes, include/ and src/. If I have a look in config.log I see
file python/lsst/SConsUtils.py,line 351:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for C++ header file lsst/fw/Trace.h...
so go into SConsUtils.py, line 351
for lang in languages:
conf = self.Clone(CPPPATH = self['CPPPATH'] + [incdir]).Configure()
foundHeader = conf.CheckHeader(incfiles, language=lang)
conf.Finish()
So, I *could* edit self.CPPPATH since my change to fw/ups/fw.table's CPPPATH did not work. But this is the kind of hack that RHL yelled at me about. Lets try it to see what works. I want to add into SConstruct
env.Append(CPPPATH=os.path.join(os.environ["FW_DIR"], "src")) print 'DUH', env['CPPPATH']
but I don't even get past the .sconf_temp/conftest part. This must happen when I initialize env, so env = scons.makeEnv. I notice in SConsUtils.py MakeEnv? subroutine...
env['CPPPATH'] = []
so it starts off empty, it does not inherit from your environment like e.g. PATH
env = Environment(ENV = {'EUPS_DIR' : os.environ['EUPS_DIR'],
'EUPS_PATH' : os.environ['EUPS_PATH'],
'PATH' : os.environ['PATH'],
I guess I am the guinea pig for all this, I am certainly sending off some ignorant sounding emails... I suppose someone has to.
Anyways, a solution is not forthcoming. What to do in this situation? HACK IT!!!!
becker35: cd include/lsst/fw/ becker37: ln -s ../../../src/*cc . becker64: scons ... Checking for C++ header file lsst/fw/Trace.h... yes ...
At least it fails for my own ineptitude now! :)
Coding Oopses
Code:
satValue = satPtr.getValue();
Error:
error: 'class boost::shared_ptr<lsst::DataProperty>' has no member named 'getValue'
Solution:
satValue = satPtr->getValue();
Code:
satValue = satPtr->getValue();
Error:
error: cannot convert `boost::any' to `float' in assignment
Solution:
satValue = boost::any_cast<const float>(satPtr->getValue());
And, by the way, my code compiles! I have a lot of stuff commented out for now (e.g. Image needs a _metaData accessor like Mask->getMetaData, and all the Variance things). But it compiles! Success!
Uh, I should not have been so quick... I can build the .o file but not the executable, library issues...
g++ -o tests/lsstimageproc01 -Wl,-rpath-link -Wl,/local/becker/lsst_root/Linux/external/vw/1.0.1/lib:/usr/X11R6/lib:/usr/lib:/usr/local/lib:/home/becker/lib:/local/becker/lsst_root/Linux/external/boost/1.33.1/lib:/local/becker/lsst_root/Linux/external/cfitsio/3006/lib:/local/becker/lsst_root/Linux/external/xpa/2.1.7b2/lib:/local/becker/lsst_root/Linux/external/tcltk/8.5a4/lib:/local/becker/lsst_root/Linux/external/termcap/1.3.1/lib:/local/becker/lsst_root/Linux/external/readline/5.2/lib:/local/becker/lsst_devel/DC2/fw/lib tests/lsstimageproc01.o -L/local/becker/lsst_root/Linux/external/boost/1.33.1/lib -L/local/becker/lsst_root/Linux/external/vw/1.0.1/lib -L/local/becker/lsst_devel/DC2/fw/lib -L/local/becker/lsst_root/Linux/external/python/2.5/lib/python2.5/site-packages -L/local/becker/lsst_root/Linux/external/cfitsio/3006/lib -L/local/becker/lsst_root/Linux/external/wcstools/3.6.2/lib -L/local/becker/lsst_root/Linux/external/xpa/2.1.7b2/lib -Llib -lvw -lvwCore -lvwFileIO -lfw tests/lsstimageproc01.o(.gnu.linkonce.t._ZN4lsst16LSSTFitsResourceIfED1Ev+0x16): In function `lsst::LSSTFitsResource<float>::~LSSTFitsResource()': /local/becker/lsst_devel/DC2/fw/include/lsst/fw/Image.cc:39: undefined reference to `lsst::fw::DiskImageResourceFITS::~DiskImageResourceFITS()' ...
Note the problem
In function `lsst::LSSTFitsResource ... undefined reference to `lsst::fw::DiskImageResourceFITS
Namespace issues?
