mailRe: [bug #7670] scons compile issue


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Douglas Kojetin on November 08, 2006 - 17:28:
I worked out some settings so that I no longer receive the error. The steps I used are outlined below:

(1) grabbed a clean 1.3 source via svn

(2) changed the first in the 'relax' file to read:
#! /usr/bin/env python
which by default will use /sw/bin/python instead of /usr/bin/python on my system


(3) edited the gnulink.py in the scons distribution (line 49):
elif env['PLATFORM'] == 'darwin':
#env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS - dynamiclib')
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS')


(4) invoked 'scons' in the main directory

(5) moved 'maths_fns/relax_fit.dylib' to 'maths_fns/relax_fit.so' to match the file name that is present after linux complication


Would it be possible to change the #! /usr/bin/env python line in relax to #! /usr/bin/env python or would that break functionality?

Doug

On Nov 8, 2006, at 11:07 AM, Edward d'Auvergne wrote:

I wonder if it is the file 'maths_fns/relax_fit.dylib' which should
have a different extension?  As relax hides the importing error
messages and prints 'ImportError: relaxation curve fitting is
unavailable, try compiling the C modules.' instead, you can get the
true error message by typing the following at the relax prompt:

from maths_fns.relax_fit import setup, func, dfunc, d2func, back_calc_I

Does typing this give any useful messages?

Edward


On 11/9/06, Douglas Kojetin <douglas.kojetin@xxxxxxxxx> wrote:
Hi Edward-

The following worked without error:

gcc -bundle -bundle_loader /sw/bin/python -dynamic -o
maths_fns/relax_fit.dylib maths_fns/c_chi2.os maths_fns/ exponential.os
maths_fns/relax_fit.os


but invoking relax afterwards suggests the relaxation curve fitting
is still not available:

% ./relax --test

ImportError: relaxation curve fitting is unavailible, try compiling
the C modules.

Is there anything else I need to do or should try?

Thanks,
Doug


On Nov 8, 2006, at 9:30 AM, Edward d'Auvergne wrote:
> Hi,
>
> I have to warn you first that the 'tensor_pdb' branch is very unstable
> code at the moment and I'm constantly breaking things as the code
> shapes up. There may be times when it won't even run. These aren't
> related to this bug though.
>
> I've had a look at the 'sconstruct' script in the base relax directory
> and one thing which is apparent is the '-dynamiclib' flag being passed
> into 'gcc'. The script has been specifically modified for OS X to
> compile the shared objects to be loaded by python, hence the
> '-bundle', etc. flags. However '-dynamiclib' is not one of the
> options in the script so it must be SCons adding that. If you type
> the following gcc line at the prompt, do get the same
> 'powerpc-apple-darwin8-gcc-4.0.1' error message or does the code
> compile?
>
> gcc -bundle -bundle_loader /sw/bin/python -dynamic -o
> maths_fns/relax_fit.dylib maths_fns/c_chi2.os maths_fns/ exponential.os
> maths_fns/relax_fit.os
>
> If we can work out how to compile the C modules on the command line,
> then the SCons script can be subsequently updated to pass the correct
> options to gcc.
>
> Cheers,
>
> Edward
>
>
> On 11/8/06, anonymous <NO-REPLY.INVALID-ADDRESS@xxxxxxx> wrote:
>>
>> URL:
>> <http://gna.org/bugs/?7670>
>>
>> Summary: scons compile issue
>> Project: relax
>> Submitted by: None
>> Submitted on: Wednesday 11/08/2006 at 13:52 CET
>> Category: Scons build system
>> Priority: 5 - Normal
>> Severity: 4 - Important
>> Status: None
>> Privacy: Public
>> Assigned to: None
>> Originator Name: doug
>> Originator Email:
>> Open/Closed: Open
>> Release: 1.2.7
>> Operating System: Mac OS X
>>
>> _______________________________________________________
>>
>> Details:
>>
>> I'm using the tensor_pdb version (svn co
>> svn://svn.gna.org/svn/relax/branches/tensor_pdb) and running Mac
>> OS X 10.4.8
>> w/ gcc version 4.0.1 (PowerPC version).
>>
>> I tried to install relax using the directions in the relax.pdf
>> section 1.2.1
>> using the 'scons' program under OS X. I am seeing the following
>> error (even
>> after trying to execute 'scons' a few times, which is shown below):
>>
>> % scons clean
>> scons: Reading SConscript files ...
>> scons: done reading SConscript files.
>> scons: Building targets ...
>> clean_temp_files(["clean_temp"], [])
>>
>> ###############################
>> # Cleaning up temporary files #
>> ###############################
>>
>>
>>
>> Removing the files ending in ['pyc', 'bak', 'o', 'os', 'obj',
>> 'exp', 'lib'].
>>
>>
>>
>>
>>
>> clean_manual_files(["manual_clean"], [])
>>
>> ##########################################
>> # Cleaning up the temporary manual files #
>> ##########################################
>>
>>
>>
>>
>>
>>
>> clean_files(["clean"], [])
>>
>> ###############
>> # Cleaning up #
>> ###############
>>
>>
>>
>> Removing the files ending in ['so', 'sconsign', 'dll'].
>>
>>
>>
>>
>>
>> scons: done building targets.
>>
>>
>>
>> % scons
>> scons: Reading SConscript files ...
>> scons: done reading SConscript files.
>> scons: Building targets ...
>>
>>
>>
>>
>> ###########################
>> # Compiling the C modules #
>> ###########################
>>
>>
>> Building the relaxation curve fitting module 'maths_fns/
>> relax_fit.dylib'
>>
>> gcc -I/sw/include/python2.4 -fPIC -c -o maths_fns/c_chi2.os
>> maths_fns/c_chi2.c
>> gcc -I/sw/include/python2.4 -fPIC -c -o maths_fns/exponential.os
>> maths_fns/exponential.c
>> gcc -I/sw/include/python2.4 -fPIC -c -o maths_fns/relax_fit.os
>> maths_fns/relax_fit.c
>> gcc -bundle -bundle_loader /sw/bin/python -dynamic -dynamiclib -o
>> maths_fns/relax_fit.dylib maths_fns/c_chi2.os maths_fns/
>> exponential.os
>> maths_fns/relax_fit.os
>> powerpc-apple-darwin8-gcc-4.0.1: -bundle not allowed with - dynamiclib
>> scons: *** [maths_fns/relax_fit.dylib] Error 1
>> scons: building terminated because of errors.
>>
>>
>>
>>
>> I blindly tried removing the -bundle and -bundle_loader flags, but
>> that did
>> not help.
>>
>>
>>
>> _______________________________________________________
>>
>> Follow-up Comments:
>>
>>
>> -------------------------------------------------------
>> Date: Wednesday 11/08/2006 at 13:52 CETBy: Anonymous
>> I'm using the tensor_pdb version (svn co
>> svn://svn.gna.org/svn/relax/branches/tensor_pdb) and running Mac
>> OS X 10.4.8
>> w/ gcc version 4.0.1 (PowerPC version).
>>
>> I tried to install relax using the directions in the relax.pdf
>> section 1.2.1
>> using the 'scons' program under OS X. I am seeing the following
>> error (even
>> after trying to execute 'scons' a few times, which is shown below):
>>
>> % scons clean
>> scons: Reading SConscript files ...
>> scons: done reading SConscript files.
>> scons: Building targets ...
>> clean_temp_files(["clean_temp"], [])
>>
>> ###############################
>> # Cleaning up temporary files #
>> ###############################
>>
>>
>>
>> Removing the files ending in ['pyc', 'bak', 'o', 'os', 'obj',
>> 'exp', 'lib'].
>>
>>
>>
>>
>>
>> clean_manual_files(["manual_clean"], [])
>>
>> ##########################################
>> # Cleaning up the temporary manual files #
>> ##########################################
>>
>>
>>
>>
>>
>>
>> clean_files(["clean"], [])
>>
>> ###############
>> # Cleaning up #
>> ###############
>>
>>
>>
>> Removing the files ending in ['so', 'sconsign', 'dll'].
>>
>>
>>
>>
>>
>> scons: done building targets.
>>
>>
>>
>> % scons
>> scons: Reading SConscript files ...
>> scons: done reading SConscript files.
>> scons: Building targets ...
>>
>>
>>
>>
>> ###########################
>> # Compiling the C modules #
>> ###########################
>>
>>
>> Building the relaxation curve fitting module 'maths_fns/
>> relax_fit.dylib'
>>
>> gcc -I/sw/include/python2.4 -fPIC -c -o maths_fns/c_chi2.os
>> maths_fns/c_chi2.c
>> gcc -I/sw/include/python2.4 -fPIC -c -o maths_fns/exponential.os
>> maths_fns/exponential.c
>> gcc -I/sw/include/python2.4 -fPIC -c -o maths_fns/relax_fit.os
>> maths_fns/relax_fit.c
>> gcc -bundle -bundle_loader /sw/bin/python -dynamic -dynamiclib -o
>> maths_fns/relax_fit.dylib maths_fns/c_chi2.os maths_fns/
>> exponential.os
>> maths_fns/relax_fit.os
>> powerpc-apple-darwin8-gcc-4.0.1: -bundle not allowed with - dynamiclib
>> scons: *** [maths_fns/relax_fit.dylib] Error 1
>> scons: building terminated because of errors.
>>
>>
>>
>>
>> I blindly tried removing the -bundle and -bundle_loader flags, but
>> that did
>> not help.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________________
>>
>> Reply to this item at:
>>
>> <http://gna.org/bugs/?7670>
>>
>> _______________________________________________
>> Message sent via/by Gna!
>> http://gna.org/
>>
>>
>> _______________________________________________
>> 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
>>









Related Messages


Powered by MHonArc, Updated Thu Nov 09 05:00:35 2006