mailRe: Development of the relax-disp branch.


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

Header


Content

Posted by Edward d'Auvergne on May 10, 2013 - 17:52:
Hi,

Any luck with this problem?  I've looked a bit more into it, and it
does seem like there is a problem with the Microsoft compiler finding
the IPython headers.  It could also be in the 'sconstruct' script for
relax used by scons to build the C module.  You can see this in the
relax_fit() method.  Maybe it would be worth trying the following
within IPython:

import sys
import path
print sys.prefix + path.sep + 'include'

The check that the Python.h file is present in the directory that this
prints out.  This is the logic used in the script to determine where
the header files are.  It could be that we have to come up with a
special hack for this relax_fit() method to handle IPython on Windows.
 I hope this info helps.

Regards,

Edward





On 9 May 2013 22:20, Edward d'Auvergne <edward@xxxxxxxxxxxxx> wrote:
Hi,

Sorry, I didn't get a chance to look at this problem today.  I have not seen
these exact messages before, but they do look a little bit familiar.  My
guess would be that the Ipython header files, specifically Python.h, cannot
be found by the Microsoft compiler.  The messages are hinting at this.  Can
you find this file on you system?  You may need to run:

$ scons clean_all

to remove all files compiled without Python.h.   A good way to test this,
assuming that the headers are the problem, is to note the compilation
commands generated by scons.  Then you can type these manually (or in a
script) and try to find which include command is needed for your setup.  I
will look into this in more detail tomorrow.

Regards,

Edward



On Wednesday, 8 May 2013, Troels Emtekær Linnet wrote:

Hi Edward.

So that helped, but just showed another problem:
---------------------------------------------
C:\Python27\github\relax_disp>scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
link /nologo /dll /out:target_functions\relax_fit.pyd
/implib:target_functions\r
elax_fit.lib /LIBPATH:C:\Python27\libs target_functions\c_chi2.obj
target_functi
ons\exponential.obj target_functions\relax_fit.obj
   Creating library target_functions\relax_fit.lib and object
target_functions\r
elax_fit.exp
relax_fit.obj : error LNK2019: unresolved external symbol
__imp__PyFloat_FromDou
ble referenced in function _func
relax_fit.obj : error LNK2019: unresolved external symbol
__imp__PyFloat_AsDoubl
e referenced in function _setup
relax_fit.obj : error LNK2019: unresolved external symbol
__imp__PyList_New refe
renced in function _back_calc_I
relax_fit.obj : error LNK2019: unresolved external symbol
__imp__PyList_SetItem
referenced in function _back_calc_I
relax_fit.obj : error LNK2019: unresolved external symbol
__imp__PyArg_ParseTupl
e referenced in function _func
relax_fit.obj : error LNK2019: unresolved external symbol
__imp__PyArg_ParseTupl
eAndKeywords referenced in function _setup
relax_fit.obj : error LNK2019: unresolved external symbol
__imp__Py_InitModule4
referenced in function _initrelax_fit
relax_fit.obj : error LNK2019: unresolved external symbol
__imp__PySequence_GetI
tem referenced in function _setup
relax_fit.obj : error LNK2019: unresolved external symbol
__imp___Py_NoneStruct
referenced in function _setup
target_functions\relax_fit.pyd : fatal error LNK1120: 9 unresolved
externals
scons: *** [target_functions\relax_fit.pyd] Error 1120
scons: building terminated because of errors.

C:\Python27\github\relax_disp>
-----------------------------------------------------------

Searching for the problem, seems that "many" run into the same problem.
But I don't know how to fix it?

Do you?

Troels Emtekær Linnet


2013/5/8 Edward d'Auvergne <edward@xxxxxxxxxxxxx>

Hi,

This "'cl' is not recognized as an internal or external command" error
is quite common.  For example one solution for older SCons and MSVC is
given at http://www.nmr-relax.com/windows_devel.html#MSVS_scons_issues.
 If you have 64-bit windows, then you have probably been bitten by an
SCons bug that I reported a long time ago and that the SCons
developers stubbornly refuse to fix:

http://scons.tigris.org/issues/show_bug.cgi?id=2849

It is a one line fix which you can see in the second comment.  Just
change those lines in your installed SCons code and it should run.  If
these two suggestions do not work, then we need to look for another
solution.

Regards,

Edward





On 7 May 2013 20:22, Troels Emtekær Linnet <tlinnet@xxxxxxxxx> wrote:
Hi Edward.

I use pyscripter and Ipython for coding, but def. not vim.
I am aware of Python PEP style guide, and the indention thing.
Trying to remember to comply to the rules of style. :-)

I would need to program at home, since I cannot spend effort when I am
the
lab.

Still having troubles with scons. Tried following this:
http://www.nmr-relax.com/windows_devel.html
I installed scons 2.3 for windows
And Visual Studio Express 2012

I don't understand this:
'cl' is not recognized as an internal or external command, operable
program
or batch file.
I can call cl from command line, so...

Have you seen this before?

-----------------------------------------
C:\Python27\github\relax_disp>"C:\Program Files (x86)\Microsoft Visual
Studio 11
.0\VC\vcvarsall"

C:\Python27\github\relax_disp>scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...

###########################
# Compiling the C modules #
###########################

Building the relaxation curve fitting module
'target_functions\\relax_fit.pyd'

cl /Fotarget_functions\c_chi2.obj /c target_functions\c_chi2.c /nologo
/I"C:\Pyt
hon27\Scripts\..\include"
'cl' is not recognized as an internal or external command,
operable program or batch file.
scons: *** [target_functions\c_chi2.obj] Error 1
scons: building terminated because of errors.

C:\Python27\github\relax_disp>cl
Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50727.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]



Troels Emtekær Linnet


2013/5/7 Edward d'Auvergne <edward@xxxxxxxxxxxxx>

Hi Troels,

I just noticed that you have a footer at the end of your messages.  It
might be better to turn this off for mailing list messages - it's best
that your work number and address is not archived permanently all over
the internet.

Regards,

Edward




On 7 May 2013 14:18, Troels Emtekær Linnet <tlinnet@xxxxxxxxx> wrote:
Hi Edward.

Thanks for the lengthy explanation, and I hope that I can honor your
effort
in explaining. :-)

I would be interested to get these things to work in relax, which we
most
often use in our lab:
-  off-resonance T1rho
- CPMG
-- Fast (Meiboom)
-- slow/intermediate (Richard-Carver)
-- very slow (Tollinger/K



Related Messages


Powered by MHonArc, Updated Sat May 11 13:00:09 2013