Re: [Seed7-users] Seed7 installation problems
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
From: Thomas M. <tho...@gm...> - 2021-01-29 11:57:21
|
Hi Anders, Sorry for the delayed response. It really looks like a problem with your computer and not like a problem caused by Seed7. Great that you did not give up and wrote a new error report. You are the only one that reports this "+Access is denied." problem and up to now I am not able to reproduce it on my windows computer. The + in this error message tells me that it happens in chkccomp.c in the function doTest() (as doTest() writes a "+"). Chkccomp.c works like this: It writes tiny test programs with names like "ctest1.c". Then the C compiler is used to compile and link these test programs. On your windows computer this should result in an executable like: "ctest1.exe". This executable is executed by doTest(). In doTest() this is done in the following line: returncode = system(command); The call of system() triggers the "Access denied" error somehow. Afterwards returncode is tested and in case of -1 nothing is done. I changed the code in doTest() to write something if returncode is -1: if (returncode != -1) { sprintf(fileName, "ctest%d.out", testNumber); outFile = fopen(fileName, "r"); if (outFile != NULL) { fscanf(outFile, "%d", &result); fclose(outFile); } /* if */ } else { printf("\nsystem(\"%s\") failed with errno: %d.\n ", command, errno); } /* if */ Neither on Linux nor on Windows this "failed with errno" message ever pops up. On my computers this call of system() never fails. You might add an printf("\nsystem(\"%s\") succeeded.\n ", command); directly after if (returncode != -1) { to find out if system() succeeds here at all. Do not forget to do a mingw32-make clean before every new attempt to compile Seed7. If system() succeeded at all you might add an exit(0); after printf("\nsystem(\"%s\") failed with errno: %d.\n ", command, errno); to stop chkccomp in case system() fails and then examine the executable that system() tried to execute. It is probably either missing at all or it does not have execute permissions. But it can also be okay and some anti-virus software causes the "Access denied" error (see below). After the exit(0) the source of this test program should be there also (something like ctest1.c). You can try to compile and execute this test program manually. In the internet I found someone else where system() triggered an "Access denied" error: https://stackoverflow.com/questions/28789060/system-function-on-windows-7-failed-with-access-denied-error There it is mentioned that the %comspec% environment variable is used by system(). On my windows computer %ComSpec% has the value c:\windows\system32\cmd.exe It is also mentioned that some anti-virus software triggers the problem. In the past I also had problems with anti-virus software. Avira considered some of the test programs of chkccomp.c as "dangerous" and locked them up under quarantine. Needless to say: These test programs are NOT dangerous. I deactivated Avira because of this (this computer is only used for Seed7 tests). Anti-virus software usually tries to inspect every program that is started. So maybe your anti-virus software triggers the "Access denied" error. BTW: I am quite sure that not all calls of system() fail, since system() is also used to call the C compiler (and the compilation of test programs seems to succeed). This is also a hint towards anti-virus. That administrator rights do not help hints also towards anti-virus. The later error when wrdepend.c is compiled looks even more suspicious: gcc wrdepend.c -o wrdepend wrdepend.c:47:20: ÷desdigert fel: config.h: No such file or directory #include "config.h" ^ kompilering avslutad. The file config.h is part of the Seed7 release. This file is neither used in the makefile nor in chkccomp.c. If gcc cannot find it you might not have all files from the Seed7. Maybe your disk is full. Strange that the installation with seed7_05_20191117_win.exe works. This installer internally uses chkccomp.c also. The only difference is that it uses make.s7i (the Seed7 make library) instead of mingw32-make. But seed7_05_20191117_win.exe can also download the newest version of Seed7 from the internet and compile that. What happens if you choose that option? If seed7_05_20191117_win.exe cannot download the newest version it can also use a manually downloaded version. What happens if you do that? I assume that you used mk_mingw.mak as makefile. If not please tell me. In the future please add also your version.h file. This file contains information which values chccomp.c was able to determine. I hope this helps. Regards Thomas Mertes |