test errors under Windows XP

12 views
Skip to first unread message

Brad

unread,
Aug 9, 2010, 10:40:36 AM8/9/10
to Fwrap Users
Hi,

I just installed the latest version of fwrap 0.1.1 under WindowsXP
(SP3) using python 2.6.5 (Enthought 6.2-1) without any apparent
problems.

When I attempt to run the tests via

D:\temp\fwrap-0.1.1\runtests.py> python runtests.py ,

I get the same error for every test case, one of which is detailed
below.

Any ideas how this issue can be fixed?

Thank you for your help.

-Brad

-----

======================================================================
ERROR: compiling and running old_decl.f90
----------------------------------------------------------------------
Traceback (most recent call last):
File "runtests.py", line 241, in run
self.runTest()
File "runtests.py", line 207, in runTest
build_ext=True)
File "D:\temp\fwrap-0.1.1\fwrap\main.py", line 600, in main
wrap(source_files, **parsed_options.__dict__)
File "D:\temp\fwrap-0.1.1\fwrap\main.py", line 240, in wrap
run_setup(file_name, script_args=make_scriptargs(kargs))
File "D:\Python26\lib\distutils\core.py", line 221, in run_setup
exec open(script_name, 'r').read() in g, l
File "<string>", line 6, in <module>
File "D:\temp\fwrap-0.1.1\fwrap\fwrap_setup.py", line 77, in setup
np_setup(*args, **kwargs)
File "D:\Python26\lib\site-packages\numpy\distutils\core.py", line
186, in setup
return old_setup(**new_attr)
File "D:\Python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "D:\Python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "D:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "D:\Python26\lib\site-packages\numpy\distutils\command
\build_src.py", line 152, in run
self.build_sources()
File "D:\Python26\lib\site-packages\numpy\distutils\command
\build_src.py", line 169, in build_sources
self.build_extension_sources(ext)
File "D:\Python26\lib\site-packages\numpy\distutils\command
\build_src.py", line 328, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "D:\Python26\lib\site-packages\numpy\distutils\command
\build_src.py", line 385, in generate_sources
source = func(extension, build_dir)
File "D:\temp\fwrap-0.1.1\fwrap\fwrap_setup.py", line 91, in
generate_type_config
return gen_type_map_files(config_cmd)
File "D:\temp\fwrap-0.1.1\fwrap\fwrap_setup.py", line 106, in
gen_type_map_files
find_types(ctps, config_cmd)
File "D:\temp\fwrap-0.1.1\fwrap\fwrap_setup.py", line 118, in
find_types
ctp.odecl, config_cmd)
File "D:\temp\fwrap-0.1.1\fwrap\fwrap_setup.py", line 158, in
find_fc_type
if config_cmd.try_compile(body=fsrc, lang='f90'):
File "D:\Python26\lib\distutils\command\config.py", line 239, in
try_compile
self._compile(body, headers, include_dirs, lang)
File "D:\Python26\lib\site-packages\numpy\distutils\command
\config.py", line 96, in _compile
(body, headers, include_dirs, lang))
File "D:\Python26\lib\site-packages\numpy\distutils\command
\config.py", line 87, in _wrap_method
ret = mth(*((self,)+args))
File "D:\Python26\lib\distutils\command\config.py", line 141, in
_compile
(obj,) = self.compiler.object_filenames([src])
AttributeError: 'NoneType' object has no attribute 'object_filenames'

----------------------------------------------------------------------
Ran 28 tests in 71.171s

FAILED (errors=28)


Kurt Smith

unread,
Aug 9, 2010, 11:45:05 AM8/9/10
to fwrap...@googlegroups.com
Hi Brad,

On Mon, Aug 9, 2010 at 9:40 AM, Brad <brad.r...@gmail.com> wrote:
> Hi,
>
> I just installed the latest version of fwrap 0.1.1 under WindowsXP
> (SP3) using python 2.6.5 (Enthought 6.2-1) without any apparent
> problems.

I fully intend for fwrap to work on Windows; unfortunately I do not
have access to XP or 7 to test it out. If you're willing to work with
me, I can troubleshoot things for you over email, etc.

>
> When I attempt to run the tests via
>
> D:\temp\fwrap-0.1.1\runtests.py> python runtests.py  ,
>
> I get the same error for every test case, one of which is detailed
> below.

The (unhelpful) error message--I hope to improve it--indicates that
fwrap can't find a Fortran compiler.

What is the output for 'python fwrapc.py --help-fcompiler'?

If fwrap is unable to find a fortran compiler you'll need to supply
the information explicitly. Let me know the output of the above and
then we can go from there.

Kurt

> --
> You received this message because you are subscribed to the Google Groups "Fwrap Users" group.
> To post to this group, send email to fwrap...@googlegroups.com.
> To unsubscribe from this group, send email to fwrap-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/fwrap-users?hl=en.
>
>

Kurt Smith

unread,
Aug 10, 2010, 11:16:10 AM8/10/10
to fwrap...@googlegroups.com
http://cython.org/release/Cython-0.13.beta0.tar.gz

On Tue, Aug 10, 2010 at 6:54 AM, Brad Reisfeld <brad.r...@gmail.com> wrote:
> On 8/9/2010 1:03 PM, Kurt Smith wrote:
>> On Mon, Aug 9, 2010 at 1:46 PM, Brad Reisfeld <brad.r...@gmail.com> wrote:
>>
>> We're definitely getting somewhere.  For the runtests commandline, do
>> this instead:
>>
>> python runtests.py -vvvv --fcompiler=g95 --no-cleanup >runtests.out 2>&1
>>
>> (that's 4 v's, which causes it to spit out *everything* to the
>> console, and the rest of the stuff is to capture the output into
>> runtests.out.  This is how I'd do it on bash, I don't know if the
>> stderr redirection is the same on mingw...)
>>
>> Zip up runtests.out and send it to me.  That will tell me what's going on.
>>
>> Thanks,
>>
>> Kurt
>>
>
>
> Thanks, Kurt.
>
> Here's the requested output.
>
> -Brad
>

The issue is, I think, related to a recent fix in Cython for correct
newline handling. All the errors I can find are like these:

Error converting Pyrex file to C:
------------------------------------------------------------
...
cimport numpy as np^M
^
------------------------------------------------------------

D:\temp\fwrap-0.1.1\BUILD\compile\all_char_fwrap\all_char_fwrap.pxd:1:19:
Unrecognized character

Could you download the latest Cython 0.13 and let me know if that
fixes things? If not send me another runtests.out.

http://cython.org/release/Cython-0.13.beta0.tar.gz

Note: this is still a beta and there are some other issues being
worked out according to Cython's ML. I just want to know if the
errors I see are fixed in the latest Cython version.

Kurt

Kurt Smith

unread,
Aug 10, 2010, 3:39:44 PM8/10/10
to Brad Reisfeld, fwrap...@googlegroups.com
On Tue, Aug 10, 2010 at 2:19 PM, Brad Reisfeld <brad.r...@gmail.com> wrote:
> On 8/10/2010 12:51 PM, Kurt Smith wrote:
>> On Tue, Aug 10, 2010 at 1:21 PM, Brad Reisfeld <brad.r...@gmail.com> wrote:
>>> On 8/10/2010 9:16 AM, Kurt Smith wrote:
>>>> Hey, Brad, see my reply on fwrap-users.
>>>>
>>>> Kurt
>>>>
>>>
>>> Hi Kurt,
>>>
>>> I upgraded Cython, but still get test errors. Attached is the
>>> verbose output.
>>>
>>> Thanks for your help.
>>>
>>> -Brad
>>>
>>
>> This is actually really encouraging; we fixed the Cython error and 1/2
>> of the tests pass.  Now it's just a linking issue.
>>
>> Did you run with F90 and LDFLAGS set like in your previous post?
>> Because the compile command doesn't have these on it.
>>
>> What is the output of:
>>
>>   python fwrapc.py --help-fcompiler --fcompiler=g95
>>
>> and is it the same as before?
>>
>> If not, set F90 and LDFLAGS, and run the tests.  Set LDFLAGS like this:
>>
>> set LDFLAGS='-LD:\path\to\what\you\had\before -lf95 -lgcc'
>>
>> (try it with and without the quotes, with and without double \\'s, and
>> mind the spacing).
>>
>> Kurt
>
>
> Kurt,
>
> I still have the same session open as before, and the relevant
> section of the fwrapc output is as follows:
>
> -----
>
> G95FCompiler instance properties:
>  archiver        = None
>  compile_switch  = '-c'
>  compiler_f77    = None
>  compiler_f90    = ['D:\\MinGW\\bin\\g95.exe',
> '-fno-second-underscore', '-
>                    O']
>  compiler_fix    = ['D:\\MinGW\\bin\\g95.exe', '-ffixed-form',
> '-fno-second
>                    -underscore', '-O']
>  libraries       = []
>  library_dirs    = []
>  linker_exe      = None
>  linker_so       = ['D:\\MinGW\\bin\\g95.exe', '-shared', '-L',
>
> 'D:\\MinGW\\lib\\gcc-lib\\i686-pc-mingw32\\4.1.2', '-
>                    lf95', '-lgcc']
>  object_switch   = '-o '
>  ranlib          = None
>  version         = LooseVersion ('0.93')
>
> -----
>
> I tried with and without quotes and with \ and \\ and still get 16
> errors out of 35 tests.
>
> Although the linker flags are set, I am not sure that they are
> correct. I based the flags on the directory that g95 created upon
> installation (this directory contains libf95.a and libgcc.a).

Basically what needs to happen is on the g++ -mno-cygwin ... compile
line, the -LD:... and -lf95 arguments need to appear, along with the
other -L and -l arguments.

You could try using f2py and see what it outputs for its compilation
lines, maybe that will give a hint.

My apologies, but I have no experience on mingw. These build problems
are always the biggest PITA, thanks for your patience.

Maybe someone else on the list with mingw experience can help out.

>
> Do you know if the tests that are succeeding and failing indicate if
> libf95 and libgcc are being used at all?
>

I know for certain that they aren't: the errors are all linking errors
and the tests can't find the g95 runtime functions inside libf95.a.
Some tests don't depend on these functions at all so that's why they
succeed.

You'll see a number of 'undefined reference to ...', these are the
function calls that are defined in libg95. On bash you'd do 'nm
libf95.a' to get a listing of the defined functions.

> Could there be some other library that needs to be added?
>
> Thanks.
>
> -Brad
>

Reply all
Reply to author
Forward
0 new messages