/[escript]/branches/ROBW_XPLATFORM/bruce/src/SConscript
ViewVC logotype

Log of /branches/ROBW_XPLATFORM/bruce/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 668 - (view) (annotate) - [select for diffs]
Modified Sat Mar 25 13:27:27 2006 UTC (15 years, 4 months ago) by robwdcock
File length: 1897 byte(s)
Diff to previous 667
+ finally figured out why the tests failed when the python extension libs were
  no longer sym links. The original setup for python extension modules was to
  have sym links in the esys/* directories named, for example escriptcpp.so.
  These would link to the actual libraries libescriptcpp.so. The lib*.so would
  link to each other. When you replaced the symlink with a copy of the lib*.so
  but renamed without the lib you would then get problems. In particular,
  py_tests would suddenly start failing.

  The problem appears (I've not been able to find documentary evidence to this
  case) to be that when, for example, you import bruce, brucecpp.so imports
  lib/libescriptcpp.so (which intialises escript python bits), bruce then
  imports escriptcpp.so (which also initialised escript python bits).

  Whether that is exactly correct or not is of interest but the important bit
  is you appear to get two versions. After thinking about this for a bit and
  reviewing a bunch of other examples of working python modules I noticed a
  pattern. NONE of the other examples ever included more than the python
  wrapper code in the python extension library. Instead they just link to
  the pure C++ library. This would avoid the duplicate load.

  So, I've refactored the code. If you consider escript the pattern in now:
  lib/libescript.so - which has all of escript EXCEPT the python escriptcpp.cpp
  esys/escript/escriptcpp.so - which has ONLY the escriptcpp.cpp and links to
                               lib/libescript.so
  
  Run the tests and low and behold they all pass again.

  Q: Why doesn't this problem occur with sym links?
  A: My guess is that python and the dynamic linker take a look at the actual
     absolute python of libraries to determine if its a "different" library.
     I did fine some discussions that seem to suggest this.

  Q: Why can't you just set LD_LIBRARY_PATH==PYTHONPATH and stick all the
     libs in that directory?
  A: I (in fact we, Peter Hornby was there) tried. With the renaming of the
     python module so it doesn't have a lib prefix you get problems with
     getting the shared libraries to be looked up in LD_LIBRARY_PATH. Do
     the opposite and use lib on the python modules and you have problems
     with windows which doesn't prepend the lib. Various combination
     in between were also tried but you end up in a catch 22 situation so far
     as I could tell

  Please if you know more about the ins and outs of python and shared
  libraries let me know if this isn't true. I'd really like to know if my
  guesses are correct. In any event, the fix is more consistent with the
  patterns I've seen

  Phew! this was a long log message, glad it is on a branch!




Revision 667 - (view) (annotate) - [select for diffs]
Modified Fri Mar 24 13:25:00 2006 UTC (15 years, 4 months ago) by robwdcock
File length: 1168 byte(s)
Diff to previous 666
+ OUCH ARGHH
+ Okay the wizzy linkHack doesn't work. Not sure why but py_tests fail
when the shared library is on the link line directly (without a -l)

+ Unfortunately we can't figure out how to use -l without it prepending
a lib prefix. Hence all the shareable objects in python now need to be
called libblah.so (and lib will need to be prepended on windows!!!!).
This is not the python way and its very annoying. Why do we have this
problem? Because the C++ shared libraries link with each other.



Revision 666 - (view) (annotate) - [select for diffs]
Modified Fri Mar 24 11:29:40 2006 UTC (15 years, 4 months ago) by robwdcock
File length: 1264 byte(s)
Diff to previous 651
+ Fix up python esys area:
  + libraries are named without lib prefix on posix platforms (python standard)
  + libraries are now installed into the pyinstall area (python standard)
  + symlinks removed, no longer required
  + LD_LIBRARY_PATH is now optional for PYTHON programs (still required for c++)
+ lib PREFIX removal NOTES:
  + removing the lib prefix is non-standard for the linker. As such we've created a
    custom function sharedLinkHack to specify the .so on the link command line
    (as opposed to using -l<archive> which will prepend the lib). This has a
    a small slight of hand for scons which was being to "helpful". Scons
    verifies that when creating a shared libray all objects specified are
    created shareable (e.g. ensure objects are compiler with -fPIC). Since
    we are linking a .so out of the blue we had to wrap it up in a File note
    and flag it as shared.
    Easily done, once you know how. Thankfully this is all wrapped
    up in a simple function (sharedLinkHack) that looks like ordinary scons so
    you will never know!
    



Revision 651 - (view) (annotate) - [select for diffs]
Modified Fri Mar 24 06:44:23 2006 UTC (15 years, 4 months ago) by robwdcock
File length: 1168 byte(s)
Diff to previous 642
+Python file now compile and install into pyinstall directory


Revision 642 - (view) (annotate) - [select for diffs]
Modified Thu Mar 23 14:03:49 2006 UTC (15 years, 4 months ago) by robwdcock
File length: 1068 byte(s)
Diff to previous 623
+ Bruce unit tests consolidated and added to build system


Revision 623 - (view) (annotate) - [select for diffs]
Modified Wed Mar 22 14:11:03 2006 UTC (15 years, 4 months ago) by robwdcock
File length: 707 byte(s)
Diff to previous 622
Beginning of a fully cross-platform (win32+intelc, linux+g++, altix+intelc)
scons build system
WORK IN PROGRESS NOT COMPLETE
+Incorporates ideas from trunks scons build system and the RW_WIN32 branch
+New Header layout as include/<modulename>, hence the changes to the headers
+Not all modules or features from trunk build system are fully implemented
-Removes need for intermediary SConstruct files - the top SConstruct is more complex but handle cross-platform better AND the SConscript are a LOT simpler
and only differ slightly. It should be simpler to maintain
-Options are now handled via either a: config file supplied on command line, a config file in the scons/hostname_options.py, or as individual command line arguments
-Need help with options: scons -h will give you a list of options and their current settings



Revision 622 - (view) (annotate) - [select for diffs]
Modified Wed Mar 22 14:00:08 2006 UTC (15 years, 4 months ago) by robwdcock
File length: 1638 byte(s)
Diff to previous 481
Creating a private branch so I can test and verify cross-platform build

Revision 481 - (view) (annotate) - [select for diffs]
Modified Wed Feb 1 05:57:50 2006 UTC (15 years, 6 months ago) by jgs
Original Path: trunk/bruce/src/SConscript
File length: 1638 byte(s)
Diff to previous 474
add mechanism to install .h files to inc directories
(still need to specify full lists of .h files to install)


Revision 474 - (view) (annotate) - [select for diffs]
Modified Mon Jan 30 04:23:44 2006 UTC (15 years, 6 months ago) by jgs
Original Path: trunk/bruce/src/SConscript
File length: 1367 byte(s)
Diff to previous 468
restructure escript source tree
move src/Data/* -> src
remove inc
modify #includes and cpppath settings accordingly


Revision 468 - (view) (annotate) - [select for diffs]
Modified Wed Jan 25 06:50:39 2006 UTC (15 years, 6 months ago) by jgs
Original Path: trunk/bruce/src/SConscript
File length: 1367 byte(s)
Diff to previous 465
reorganised esysUtils to remove inc directory

Revision 465 - (view) (annotate) - [select for diffs]
Modified Wed Jan 25 01:08:17 2006 UTC (15 years, 6 months ago) by jgs
Original Path: trunk/bruce/src/SConscript
File length: 1367 byte(s)
Copied from: trunk/bruce/src/Bruce/SConscript revision 463
Diff to previous 352
reorganise bruce source tree:
move all from src/Bruce -> src
remove inc
adjust all #includes appropriately



Revision 352 - (view) (annotate) - [select for diffs]
Modified Wed Dec 14 02:21:37 2005 UTC (15 years, 7 months ago) by jgs
Original Path: trunk/bruce/src/Bruce/SConscript
File length: 1367 byte(s)
Diff to previous 288
turns out Install() targets should also be made Default()
targets if you want them to actually reliably work!


Revision 288 - (view) (annotate) - [select for diffs]
Modified Fri Dec 2 01:55:04 2005 UTC (15 years, 8 months ago) by jgs
Original Path: trunk/bruce/src/Bruce/SConscript
File length: 1340 byte(s)
Diff to previous 277
now automatically build unit tests as required based on dependencies
between unit tests and libraries


Revision 277 - (view) (annotate) - [select for diffs]
Modified Wed Nov 30 04:52:39 2005 UTC (15 years, 8 months ago) by jgs
Original Path: trunk/bruce/src/Bruce/SConscript
File length: 1302 byte(s)
Diff to previous 223
explicitly define dependencies between modules


Revision 223 - (view) (annotate) - [select for diffs]
Modified Thu Nov 24 23:12:13 2005 UTC (15 years, 8 months ago) by jgs
Original Path: trunk/bruce/src/Bruce/SConscript
File length: 768 byte(s)
Diff to previous 192
pass in cc/cxx settings from config file

Revision 192 - (view) (annotate) - [select for diffs]
Modified Mon Nov 21 04:52:14 2005 UTC (15 years, 8 months ago) by jgs
Original Path: trunk/bruce/src/Bruce/SConscript
File length: 770 byte(s)
Diff to previous 191
pass in top level install directory for finley/escript/bruce/paso
libraries when building via top level scons script


Revision 191 - (view) (annotate) - [select for diffs]
Modified Mon Nov 21 04:10:12 2005 UTC (15 years, 8 months ago) by jgs
Original Path: trunk/bruce/src/Bruce/SConscript
File length: 684 byte(s)
Diff to previous 190
push platform dependent compiler flags and include directories up to library level scons files - these will eventually be brought in from external config files

Revision 190 - (view) (annotate) - [select for diffs]
Modified Mon Nov 21 03:27:42 2005 UTC (15 years, 8 months ago) by jgs
Original Path: trunk/bruce/src/Bruce/SConscript
File length: 882 byte(s)
Diff to previous 188
pass in value for esysroot and use this to determine include file locations

Revision 188 - (view) (annotate) - [select for diffs]
Modified Mon Nov 21 01:20:26 2005 UTC (15 years, 8 months ago) by jgs
Original Path: trunk/bruce/src/Bruce/SConscript
File length: 682 byte(s)
Diff to previous 177
explicitly add -fpic option to all compiler options lists
to ensure relocatable code is generated


Revision 177 - (view) (annotate) - [select for diffs]
Modified Fri Nov 18 02:50:20 2005 UTC (15 years, 8 months ago) by jgs
Original Path: trunk/bruce/src/Bruce/SConscript
File length: 676 byte(s)
Diff to previous 176
reformatted list of source files


Revision 176 - (view) (annotate) - [select for diffs]
Added Fri Nov 18 01:49:12 2005 UTC (15 years, 8 months ago) by jgs
Original Path: trunk/bruce/src/Bruce/SConscript
File length: 616 byte(s)
first draft of scons config/construct files to build brucecpp.so library


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.26