Hi, This code was absent from the repository, but I just added it. However, to reproduce the error, you must first use the command 'scons clean_all' to remove the compiled and temporary files. Then, when you use the command 'scons', you get the following message: ========== scons: Reading SConscript files ... scons: warning: Two different environments were specified for target maths_fns/c_chi2.os, but they appear to have the same action: $SHCC -o $TARGET -c $SHCFLAGS $SHCCFLAGS $_CCCOMCOM $SOURCES File "/home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp/sconstruct", line 517, in relax_disp scons: done reading SConscript files. scons: Building targets ... ########################### # Compiling the C modules # ########################### Building the relaxation dispersion curve fitting module 'maths_fns/relax_disp.so' gcc -o maths_fns/c_chi2.os -c -I/usr/include/python2.5 -I/usr/lib/python2.5/site-packages/numpy/core/include -fPIC maths_fns/c_chi2.c gcc -o maths_fns/exponential.os -c -I/usr/include/python2.5 -I/usr/lib/python2.5/site-packages/numpy/core/include -fPIC maths_fns/exponential.c gcc -o maths_fns/relax_fit.os -c -I/usr/include/python2.5 -I/usr/lib/python2.5/site-packages/numpy/core/include -fPIC maths_fns/relax_fit.c gcc -o maths_fns/relax_fit.so -shared maths_fns/c_chi2.os maths_fns/exponential.os maths_fns/relax_fit.os gcc -o maths_fns/dispersion.os -c -I/usr/include/python2.5 -I/usr/lib/python2.5/site-packages/numpy/core/include -fPIC maths_fns/dispersion.c gcc -o maths_fns/relax_disp.os -c -I/usr/include/python2.5 -I/usr/lib/python2.5/site-packages/numpy/core/include -fPIC maths_fns/relax_disp.c gcc -o maths_fns/relax_disp.so -shared maths_fns/c_chi2.os maths_fns/dispersion.os maths_fns/relax_disp.os scons: done building targets. ========== After this, both 'relax_disp.so' and 'relax_fit.so' are created. The 'relax_fit' code works fine, but it is difficult to tell whether the 'relax_disp' code works as it is still in development and very incomplete... If the command 'scons' is used again, the message still includes a warning: ========== scons: Reading SConscript files ... scons: warning: Two different environments were specified for target maths_fns/c_chi2.os, but they appear to have the same action: $SHCC -o $TARGET -c $SHCFLAGS $SHCCFLAGS $_CCCOMCOM $SOURCES File "/home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp/sconstruct", line 517, in relax_disp scons: done reading SConscript files. scons: Building targets ... scons: `maths_fns/relax_fit.so' is up to date. scons: `maths_fns/relax_disp.so' is up to date. scons: done building targets. ========== Should this warning matter ? Regards, Séb :) Edward d'Auvergne wrote:
Hi, Is this code in the repository? For some reason I cannot reproduce this error and the code compiles fine on my machine. Regards, Edward On Wed, Feb 4, 2009 at 6:26 PM, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:Hi again (!), Well, this change does work, but only partially... It creates a problem, which I had seen before, concerning the duplication for building of 'math_fns/c_chi2.os'... ========= scons scons: Reading SConscript files ... scons: warning: Two different environments were specified for target maths_fns/c_chi2.os, but they appear to have the same action: $SHCC -o $TARGET -c $SHCFLAGS $SHCCFLAGS $_CCCOMCOM $SOURCES File "/home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp_3/sconstruct", line 517, in relax_disp scons: done reading SConscript files. ========= Hence, only the 'math_fns/relax_disp.*' code is build, and not the 'math_fns/relax_fit.*' code... So, what would be the best way to avoid all these problems ??? Build all together as proposed in the first message of this thread ? Regards, Séb Sébastien Morin wrote:Hi again, Ok... I think this was easier to solve than I thought... Just adding, in 'sconstruct', the 'math_fns/c_chi2.*' code to be compiled with 'math_fns/relax_disp.so' works... Regards, Séb Sébastien Morin wrote:Hi, I went into a problem related to the 'chi2' symbol being undefined in the C module for relaxation dispersion. This is not very surprising since the 'math_fns/c_chi2.*' code is not compiled with the 'math_fns/relax_disp.*' and 'math_fns/dispersion.*' codes, as it is also used for the 'math_fns/relax_fit.*' and 'math_fns/exponential.*' codes... I am not sure how to handle this to avoid duplicating the 'math_fns/c_chi2.*' code... Should I put all C modules together and compile them as one, that is modifying 'sconstruct.relax_fit()' to compile all C modules : 'c_chi2', 'exponential', 'dispersion', 'relax_fit' and 'relax_disp', and rename the function something like 'sconstruct.relax_curves(), or anything else more general ? Or am I completely wrong ??? Thanks ! Séb :) ==================== The actual error... ==================== ./relax Traceback (most recent call last): File "./relax", line 53, in <module> from prompt import interpreter File "/home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp_3/prompt/interpreter.py", line 50, in <module> from dx import OpenDX File "/home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp_3/prompt/dx.py", line 35, in <module> import opendx.main File "/home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp_3/opendx/main.py", line 32, in <module> import isosurface_3D File "/home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp_3/opendx/isosurface_3D.py", line 31, in <module> from base_map import Base_Map File "/home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp_3/opendx/base_map.py", line 36, in <module> from specific_fns.setup import get_specific_fn File "/home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp_3/specific_fns/setup.py", line 30, in <module> from specific_fns.relax_disp import Relax_disp File "/home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp_3/specific_fns/relax_disp.py", line 42, in <module> from maths_fns.relax_disp import setup, func, dfunc, d2func, back_calc_I ImportError: /home/semor/pse-4/collaborations/relax/relax-1.3--relax_disp_3/maths_fns/relax_disp.so: undefined symbol: chi2 _______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list relax-devel@xxxxxxx To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel_______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list relax-devel@xxxxxxx To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel_______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list relax-devel@xxxxxxx To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel
-- Sébastien Morin PhD Student S. Gagné NMR Laboratory Université Laval & PROTEO Québec, Canada