mailRe: relax on Mac with fink


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

Header


Content

Posted by Edward d'Auvergne on February 22, 2010 - 18:41:
Hi,

Do these changes fix the problem?  For the INSTALL_PATH, I think we
have to be careful here.  You have changed it to the default fink
installation path for its relax versions.  But this is not where relax
defaults to for non-fink installs.  I'm not even sure this is used at
all in this case?  The change to RELAX_PATH should not be made as this
breaks all relax installs and is not specific to Mac OS X - it changes
the path for all operating systems.  As for the -m32 C compiler flag,
this could be quite dangerous to add as then 64-bit systems will fail.
 Is this flag necessary?  I would guess that all these issues are due
to 2 python versions being present on the system anyway so that these
changes are not necessary.  See my post at
https://mail.gna.org/public/relax-users/2010-02/msg00009.html for more
details.

Cheers,

Edward


On 22 February 2010 16:28, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> 
wrote:
Hi,

I forgot to mention something...

It probably arises from fink, but there is a file called "sconstruct.orig".
The date goes back from my installation. This file is somewhat different
from the new "sconstruct" file:

====================
diff -u sconstruct.orig sconstruct
--- sconstruct.orig    2009-08-12 13:52:35.000000000 -0400
+++ sconstruct    2010-02-05 00:11:32.000000000 -0500
@@ -98,7 +98,7 @@
    SYS = SYSTEM

    # Mac OS X installation path.
-    INSTALL_PATH = sys.prefix + sep + 'local'
+    INSTALL_PATH = '/sw' + sep + 'lib'


 # All other operating systems.
@@ -115,16 +115,15 @@
 ###############

 # Relax installation directory.
-RELAX_PATH = INSTALL_PATH + sep + 'relax'
+RELAX_PATH = INSTALL_PATH + sep + 'relax-py26'

 # Installation path for binaries.
-BIN_PATH = INSTALL_PATH + sep + 'bin'
+BIN_PATH = '/sw' + sep + 'bin'

 # Symbolic link installation path.
 SYMLINK = BIN_PATH + sep + 'relax'


-
 # The distribution files.
 #########################

@@ -485,7 +484,7 @@
        if SYSTEM == 'Windows':
            cflags = '/nologo /I\"' + py_include_minpath + '\" /I\"' +
numpy_path + '\"'
        else:
-            cflags = '-I' + py_include_fullpath + ' -I' + numpy_path
+            cflags = '-m32 -I' + py_include_fullpath + ' -I' + numpy_path

        # Relaxation curve fitting build environment.
        env = Environment()
@@ -500,7 +499,7 @@

        # Catch Mac OS X and send the correct command line options to the
linker (these may become redundant as SCons improves).
        if env['PLATFORM'] == 'darwin':
-            env.Append(LINKFLAGS = ['-bundle', '-bundle_loader', sys.prefix
+ path.sep + 'bin' + path.sep + 'python', '-dynamic'])
+            env.Append(LINKFLAGS = ['-m32', '-bundle', '-bundle_loader',
sys.prefix + path.sep + 'bin' + path.sep + 'python2.6', '-dynamic',
'-undefined', 'dynamic_lookup'])
            env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS')

        # Shared library prefix and suffix.
====================

This (especially the "cflags" and "env" lines) might explain the compilation
problem..?


Séb



On 10-02-22 10:23 AM, Sébastien Morin wrote:

Hi Ed,

Please see below...


On 10-02-22 2:49 AM, Edward d'Auvergne wrote:


Hi,

See below:


On 21 February 2010 20:59, Sébastien Morin<sebastien.morin.1@xxxxxxxxx>
wrote:



Hi,

I just installed relax on a Mac using fink.
     relax-py26    1.3.4-2    Protein dynamics by NMR relax. data
analysis

I also installed the dependencies using fink.
     minfx-py26    1.0.2-1    The minfx optimisation library
     numpy-py26    [virtual package]
     python26    1:2.6.4-101    Interpreted, object-oriented language
     scientificpython-py26    2.8-1    Python modules for scientific
computing
     scons    0.98.3-1    Python-based build tool

I created a link in the relax directory pointing to the minfx directory:
     minfx@ ->   /sw/lib/python2.6/site-packages/minfx/



This should not be necessary.  If there are any strange optimisation
issues, this should be the first place to look.




In fact, if the link is not present, relax complains about minfx not
being installed...




I compiled the relaxation curve fitting modules using scons but got the
following deprecation warnings:

========
scons: Reading SConscript files ...
/sw/lib/scons-0.98.3/SCons/Platform/posix.py:38: DeprecationWarning: The
popen2 module is deprecated.  Use the subprocess module.
   import popen2
/sw/lib/scons-0.98.3/SCons/Tool/msvs.py:37: DeprecationWarning: the md5
module is deprecated; use hashlib instead
========



These are ok.  Like most mac software ported for other Unix systems,
the versions are ancient and from the dark ages.  Scons released
version 1.2 in december, not of last year, but 2 years ago!  See
http://www.scons.org/.  Hence the warnings.  This is no problem
though.





Ok...


After, I launched relax but got the following warning:

========
ImportError: dlopen(/sw/lib/relax-py26/maths_fns/relax_fit.so, 2): no
suitable image found.  Did find:
     /sw/lib/relax-py26/maths_fns/relax_fit.so: mach-o, but wrong
architecture
Relaxation curve fitting is unavailable, try compiling the C modules.
========



Try "scons clean_all" followed by "scons".  Does the file
/sw/lib/relax-py26/maths_fns/relax_fit.so exist?  This will be a
problem for curve-fitting!



"scons clean_all" works fine and then, "scons" creates the
"relax_fit.so" executable. The file type (obtained from the command
"file") is as follows: "Mach-O bundle i386".

Is it what it's supposed to be ?
(I am really new to Mac...)




Concerning the test-suite, there were nultiple errors:
     System tests
         4 failures + 20 errors
     Unit tests
         12 errors

The unit tests errors were all the same:

======
Traceback (most recent call last):
   File

"/sw/lib/relax-py26/test_suite/unit_tests/_generic_fns/_structure/test_scientific.py",
line 54, in setUp
     self.data = Scientific_data()
   File "/sw/lib/relax-py26/generic_fns/structure/scientific.py", line
60, in __init__
     raise RelaxError, "The Scientific python PDB module
Scientific.IO.PDB could not be imported."
RelaxError: RelaxError: The Scientific python PDB module
Scientific.IO.PDB could not be imported.
======

...


I guess all these errors are not normal...

Any idea to help me debug this issue ?

Thank you !!!



This is normal as Scientific python is not installed.  Maybe it would
be good to add a new section to the test suite listing the installed
and missing modules, and then disabling the relevant system and unit
tests (scientific-python, relax curve-fitting C modules, etc.) if
missing.  This will be a bit of work though, hence why I haven't done
it yet!  I would guess that all the failures are due to these 2
missing pieces, but it's hard to tell.



Scientific Python is installed...
     scientificpython-py26    2.8-1    Python modules for scientific
computing

Maybe, yes, it would be good to simply give a warning for missing
dependencies and avoid the tests to be performed...

Thanks for your insights !


Séb




Regards,

Edward





--
Sébastien Morin
PhD Student
S. Gagné NMR Laboratory
Université Laval&  PROTEO
Québec, Canada





Related Messages


Powered by MHonArc, Updated Mon Feb 22 19:00:15 2010