Hello list! I try to build big enough project (~170 units) with --autobuild option. It was built successfully before but from some time it stopped to be built. It seems to me that the problem is in a branchy dependencies between units which goes more and more complicated. Build process stops with the message 'error: module/unit `mainvar.pas' could not be compiled'. I investigated GPC sources a bit (particularly, module.c unit). As far as I got, the problem is: when it try to build mainvar.pas, it stores file name (mainvar.pas) in temporary file with label #compiling. Then the compiler goes to compile units from mainvar.pas "uses" section, some of these units in their turn uses unit mainvar (indirectly, may be). So the compiler tries to compile mainvar.pas once again a bit later and add its name (mainvar.pas) to temporary file again with #compiling label. Before every attempt it checks that the file is mentioned in the temporary file less then 2 times (by call "find_automake_tempfile_entry ("#compiling: ", fn, 2)"). When it tries to add mainvar.pas to a temporary file in a third time, it find that this file name has been already added twice to temporary file and stops building process with error mentioned above. There are the comments in compile_module function in module.c file:
/* File is being compiled => avoid a cycle. This also avoids compiling one source file twice with `--autobuild'. */ /* @@@@@@ Kludge. Allow two simultaneous compilations of the same module (fjf40[57].pas), but not infinitely many (sven18[a-c].pas). The number 2 is arbitrary. */
Is it really true that number 2 is arbitrary? Should I review module dependencies or there is some other soluton (may be, change 2 to 3 :-))? May be I missed something? GPC version: "gpc version 20040516, based on gcc-3.3.2".
Regards, Igor Marnat mailto:marny@rambler.ru
Igor Marnat wrote:
Hello list! I try to build big enough project (~170 units) with --autobuild option. It was built successfully before but from some time it stopped to be built. It seems to me that the problem is in a branchy dependencies between units which goes more and more complicated.
<snip>
There are known problems with --autobuild and --automake. Anyway, since these options will be deprecated in the near future, try "gp" (http://fjf.gnu.de/) instead.
Regards,
Adriaan van Os