Compilation problem with Cygwin

brhr iwao.... at gmail.com
Sat Dec 26 23:16:44 CET 2015


Hello CP2K depeloppers and users.

I show respect for the new CP2K release.

I tried to compile CP2K-3 on my Windows 10 laptop PC 
in accordance with "How to Compile and Install CP2K on Windows with Cygwin"
(https://www.cp2k.org/howto:compile_on_windows_with_cygwin)
but failed with the following message:

   cp2k-3.0/tools/build_utils/makedep.py  in collect_include_deps
    RuntimeError: maximum recursion depth exceeded while calling a Python 
object

sys.setrecursionlimit(10000) on the top of makedep.py did not solve the 
problem.
A limit value more than 10000 caused segmentation fault on my system.

So then I rewrote the collect_include_deps and collect_use_depth functions 
in makedep.py
 into some others without recursion:

#=============================================================================
def collect_include_deps(parsed_files, fn):
#    pf = parsed_files[fn]
#    incs = []

#    for i in pf['include']:
#        fn_inc = normpath(path.join(dirname(fn), i))
#        if(parsed_files.has_key(fn_inc)):
#            incs.append(fn_inc)
#            incs += collect_include_deps(parsed_files, fn_inc)

 #   return(list(set(incs)))
 
    pf = parsed_files[fn]
    incs = []

    for i in pf['include']:
        fn_inc = normpath(path.join(dirname(fn), i))
        if(parsed_files.has_key(fn_inc)):
            incs.append(fn_inc)
            incs += list(set(incs))

    return(list(set(incs)))


#=============================================================================
def collect_use_deps(parsed_files, fn):
#    pf = parsed_files[fn]
#    uses = pf['use']

#    for i in pf['include']:
#        fn_inc = normpath(path.join(dirname(fn), i))
#        if(parsed_files.has_key(fn_inc)):
#           uses += collect_use_deps(parsed_files, fn_inc)

 #   return(list(set(uses)))
 
    pf = parsed_files[fn]
    uses = pf['use']

    for i in pf['include']:
        fn_inc = normpath(path.join(dirname(fn), i))
        if(parsed_files.has_key(fn_inc)):
           uses += list(set(uses))

    return(list(set(uses)))


#=============================================================================

I have no experience of python, I 'm not sure whether the rewritten codes 
are equivalent to the original codes.

Any way the python error did not happen after the rewite, another error 
came to happen.

   Can't open module file "***.mod".
It seemed to that the automatic dependency generator did not work although 
all.dep had been generated in
 obj/local/.

Any help would be greatly appreciated.

brhr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20151226/a1b2514c/attachment.html>


More information about the CP2K-user mailing list