<div dir="ltr"><div>Hello CP2K depeloppers and users.</div><div><br></div><div>I show respect for the new CP2K release.</div><div><br></div><p>I tried to compile CP2K-3 on my Windows 10 laptop PC <br>in accordance with "How to Compile and Install CP2K on Windows with Cygwin"<br>(<a href="https://www.cp2k.org/howto:compile_on_windows_with_cygwin">https://www.cp2k.org/howto:compile_on_windows_with_cygwin</a>)</p><div>but failed with the following message:</div><div><br></div><p>   cp2k-3.0/tools/build_utils/makedep.py  in collect_include_deps</p><div>    RuntimeError: maximum recursion depth exceeded while calling a Python object</div><div><br></div><div>sys.setrecursionlimit(10000) on the top of makedep.py did not solve the problem.<br>A limit value more than 10000 caused segmentation fault on my system.</div><div><br></div><div>So then I rewrote the collect_include_deps and collect_use_depth functions in makedep.py<br> into some others without recursion:</div><div><br></div><p>#=============================================================================<br>def collect_include_deps(parsed_files, fn):<br>#    pf = parsed_files[fn]<br>#    incs = []</p><p>#    for i in pf['include']:<br>#        fn_inc = normpath(path.join(dirname(fn), i))<br>#        if(parsed_files.has_key(fn_inc)):<br>#            incs.append(fn_inc)<br>#            incs += collect_include_deps(parsed_files, fn_inc)</p><p> #   return(list(set(incs)))<br> <br>    pf = parsed_files[fn]<br>    incs = []</p><p>    for i in pf['include']:<br>        fn_inc = normpath(path.join(dirname(fn), i))<br>        if(parsed_files.has_key(fn_inc)):<br>            incs.append(fn_inc)<br>            incs += list(set(incs))</p><p>    return(list(set(incs)))</p><p><br>#=============================================================================<br>def collect_use_deps(parsed_files, fn):<br>#    pf = parsed_files[fn]<br>#    uses = pf['use']</p><p>#    for i in pf['include']:<br>#        fn_inc = normpath(path.join(dirname(fn), i))<br>#        if(parsed_files.has_key(fn_inc)):<br>#           uses += collect_use_deps(parsed_files, fn_inc)</p><p> #   return(list(set(uses)))<br> <br>    pf = parsed_files[fn]<br>    uses = pf['use']</p><p>    for i in pf['include']:<br>        fn_inc = normpath(path.join(dirname(fn), i))<br>        if(parsed_files.has_key(fn_inc)):<br>           uses += list(set(uses))</p><p>    return(list(set(uses)))</p><p><br>#=============================================================================</p><div><br>I have no experience of python, I 'm not sure whether the rewritten codes are equivalent to the original codes.</div><div><br></div><p>Any way the python error did not happen after the rewite, another error came to happen.</p><p>   Can't open module file "***.mod".</p><div>It seemed to that the automatic dependency generator did not work although all.dep had been generated in<br> obj/local/.</div><div><br></div><div>Any help would be greatly appreciated.</div><div><br></div><div>brhr<br></div></div>