Discussion:
[hercules-390] The official hyperion version of hercules does not compile anymore under Windows VS2015
grispoil@live.ca [hercules-390]
2017-02-17 20:10:26 UTC
Permalink
The official hyperion version of hercules does not compile anymore under Windows VS2015 since this change was made (if my memory serves me right):


Updated Windows build process for commitinfo.h. https://github.com/hercules-390/hyperion/commit/a8af22fc1751832bb0a95eacb90549f4d252a8ec" class="message" title="Updated Windows build process for commitinfo.h. Also addressed issue where _dynamic_version was not run when building using nmake directly, moved _dynamic_version.h to new include directory instead of poluting the soure, and edited .gitignore to reduce VS noise. 

srorso https://github.com/hercules-390/hyperion/commits/master?author=srorso committed on 1 Jan


This is the messages I am getting:


version.c(772): error C2065: 'COMMIT_COUNT' : identificateur non déclaré
version.c(775): error C2065: 'COMMIT_COUNT' : identificateur non déclaré
version.c(778): error C2065: 'COMMIT_COUNT' : identificateur non déclaré
version.c(794): error C2065: 'COMMIT_HASH' : identificateur non déclaré
version.c(794): warning C4047: 'fonction' : les niveaux d'indirection de 'const char *' et de 'int' sont différents
version.c(794): warning C4024: 'strlen' : types différents pour le paramÚtre formel et réel 1
version.c(798): error C2146: erreur de syntaxe : absence de ')' avant l'identificateur 'COMMIT_HASH'
version.c(798): error C2059: erreur de syntaxe : ')'
version.c(800): error C2146: erreur de syntaxe : absence de ')' avant l'identificateur 'COMMIT_HASH'
version.c(800): error C2059: erreur de syntaxe : ')'
version.c(802): error C2146: erreur de syntaxe : absence de ')' avant l'identificateur 'COMMIT_HASH'
version.c(802): error C2059: erreur de syntaxe : ')'
version.c(807): error C2065: 'COMMIT_MODIFIED' : identificateur non déclaré
version.c(807): warning C4047: 'fonction' : les niveaux d'indirection de 'const char *' et de 'int' sont différents
version.c(807): warning C4024: 'strlen' : types différents pour le paramÚtre formel et réel 1
version.c(807): error C2146: erreur de syntaxe : absence de ')' avant l'identificateur 'COMMIT_UNTRACKED'
version.c(807): error C2059: erreur de syntaxe : ')'
version.c(812): error C2181: instruction else sans if correspondant non conforme
version.c(813): error C2146: erreur de syntaxe : absence de ')' avant l'identificateur 'COMMIT_MODIFIED'
version.c(813): error C2059: erreur de syntaxe : ')'
version.c(814): error C2181: instruction else sans if correspondant non conforme
version.c(815): error C2146: erreur de syntaxe : absence de ')' avant l'identificateur 'COMMIT_MODIFIED'
version.c(815): error C2059: erreur de syntaxe : ')'
version.c(822): error C2059: erreur de syntaxe : 'if'
version.c(825): error C2059: erreur de syntaxe : 'else'
version.c(827): error C2059: erreur de syntaxe : 'else'
version.c(830): error C2059: erreur de syntaxe : '}'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.EXE"' : code retour '0x2'

Stop.




GIT for Windows is installed:


D:\Hercules_Source\hyperion>git --version
git version 2.11.0.windows.1


cmake is not installed (I do not think I need it)


I did note this empty file: commitinfo.h - 0 byte
in: D:\Hercules_Source\hyperion\msvc.dllmod.inc


This file is build dynamically (I think) and is most likely related to the failure above.


Yvan
Harold Grovesteen h.grovsteen@tx.rr.com [hercules-390]
2017-02-17 21:48:50 UTC
Permalink
I can not comment on the Windows build process. You would not want to
trust anything I would say about it.

But, you definitely need cmake to build SoftFloat-3a. The library
constructed by the cmake build is required to build the hercules
executable. Whether there is any relationship to your actual error, I
have no idea.

Please read the related BuildXXXX.txt files for Windows.

Harold Grovesteen
Post by ***@live.ca [hercules-390]
The official hyperion version of hercules does not compile anymore
under Windows VS2015 since this change was made (if my memory serves
Updated Windows build process for commitinfo.h. 

srorso committed on 1 Jan
version.c(772): error C2065: 'COMMIT_COUNT' : identificateur non déclaré
version.c(775): error C2065: 'COMMIT_COUNT' : identificateur non déclaré
version.c(778): error C2065: 'COMMIT_COUNT' : identificateur non déclaré
version.c(794): error C2065: 'COMMIT_HASH' : identificateur non déclaré
version.c(794): warning C4047: 'fonction' : les niveaux d'indirection
de 'const char *' et de 'int' sont différents
version.c(794): warning C4024: 'strlen' : types différents pour le
paramÚtre formel et réel 1
version.c(798): error C2146: erreur de syntaxe : absence de ')' avant
l'identificateur 'COMMIT_HASH'
version.c(798): error C2059: erreur de syntaxe : ')'
version.c(800): error C2146: erreur de syntaxe : absence de ')' avant
l'identificateur 'COMMIT_HASH'
version.c(800): error C2059: erreur de syntaxe : ')'
version.c(802): error C2146: erreur de syntaxe : absence de ')' avant
l'identificateur 'COMMIT_HASH'
version.c(802): error C2059: erreur de syntaxe : ')'
version.c(807): error C2065: 'COMMIT_MODIFIED' : identificateur non déclaré
version.c(807): warning C4047: 'fonction' : les niveaux d'indirection
de 'const char *' et de 'int' sont différents
version.c(807): warning C4024: 'strlen' : types différents pour le
paramÚtre formel et réel 1
version.c(807): error C2146: erreur de syntaxe : absence de ')' avant
l'identificateur 'COMMIT_UNTRACKED'
version.c(807): error C2059: erreur de syntaxe : ')'
version.c(812): error C2181: instruction else sans if correspondant non conforme
version.c(813): error C2146: erreur de syntaxe : absence de ')' avant
l'identificateur 'COMMIT_MODIFIED'
version.c(813): error C2059: erreur de syntaxe : ')'
version.c(814): error C2181: instruction else sans if correspondant non conforme
version.c(815): error C2146: erreur de syntaxe : absence de ')' avant
l'identificateur 'COMMIT_MODIFIED'
version.c(815): error C2059: erreur de syntaxe : ')'
version.c(822): error C2059: erreur de syntaxe : 'if'
version.c(825): error C2059: erreur de syntaxe : 'else'
version.c(827): error C2059: erreur de syntaxe : 'else'
version.c(830): error C2059: erreur de syntaxe : '}'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio 14.0\VC\BIN\cl.EXE"' : code retour '0x2'
Stop.
D:\Hercules_Source\hyperion>git --version
git version 2.11.0.windows.1
cmake is not installed (I do not think I need it)
I did note this empty file: commitinfo.h - 0 byte
in: D:\Hercules_Source\hyperion\msvc.dllmod.inc
This file is build dynamically (I think) and is most likely related to the failure above.
Yvan
grispoil@live.ca [hercules-390]
2017-02-25 14:21:28 UTC
Permalink
Hello,


I installed 'cmake', but it did not make any difference (I am not trying to compile SoftFloat-3a).


I bypassed the issue by adding this code back to version.c:


/* What follows is a relatively ugly kludge to let the Windows build */
/* catch up gracefully to the recent enhancements to the open source */
/* build. */
#ifdef _MSVC_
#define COMMIT_COUNT 0
#define COMMIT_MESSAGE ""
#define COMMIT_HASH ""
#define COMMIT_UNTRACKED ""
#define COMMIT_MODIFIED ""
#else
#include "commitinfo.h"
#endif /* _MSVC_ */



The code above was added on Dec 31st but removed on Jan 1st:



https://github.com/hercules-390/hyperion/commit/a8af22fc1751832bb0a95eacb90549f4d252a8ec https://github.com/hercules-390/hyperion/commit/a8af22fc1751832bb0a95eacb90549f4d252a8ec





Obviously, commitinfo.h is not being built properly on my Win10 system (it's empty).


After further investigation, it looks like commitinfo.h is built from GetGitHash.cmd. At the end of the GetGitHash.cmd file, the output from the windows 'comp' command is scanned for some specific ENGLISH text output:


:: Windows file comparison utilities have not quite reached a level that
:: could be termed "primitive". So we use comp and process its output
:: to see if there are differences on other than line one. comp reports
:: each byte of difference with a three line output. The first line is
:: "Compare error at LINE #' The for statement processes only the first
:: line of each mismatch and looks for mismatches on other than line 1.
:: And if the files are different sizes, COMP just reports this without
:: attempting any line-by-line comparison. Ugh...



Well, I am using the FRENCH version of Windows, so the comp command output is in FRENCH, not english, so, the ending 'copy' command never gets executed:


set /a "rv=0"
set "for_query=echo n|comp /l %outfile% %tempfile% 2>nul"


for /F "tokens=*" %%a in ('!for_query!') do (
if "%%a" == "Files are different sizes." ( ­­­<<< this assumes english output
set /a "rv=1"
) else (
for /F "tokens=4-5" %%b in ("%%a") do (
if "%%b" == "LINE" if not "%%c" == "1" set /a "rv=1"
)
)
)


if "%rv%" == "1" ( <<<< in my case this %rv% variable never get set to 1
copy /Y %tempfile% %outfile% >nul <<<< so, this command does not get executed
)




The following are examples of the output generated by the french version of the comp command:


1) Files are identical:


Comparaison de commitinfo.h et temp.commitinfo.h...
Comparaison des fichiers OK


Comparer d’autres fichiers (O/N) ?



2) Files are not the same sizes


Comparaison de commitinfo.h et temp.commitinfo.h...
Les fichiers sont de taille différente.


Comparer d’autres fichiers (O/N) ?



3) Files are the same sizes, but, there is a mismatch on line 1:


Comparaison de commitinfo.h et temp.commitinfo.h...
Erreur de comparaison à LINE 1
fichier1 = 78
fichier2 = 63
Comparer d’autres fichiers (O/N) ?




(Funny part, Microsoft 'forgot' to translate 'LINE' to 'LIGNE' when a compare error is reported.)


I removed the IF ( ) at the end:


rem if "%rv%" == "1" ( <<<< this %rv% variable never get set to 1
copy /Y %tempfile% %outfile% >nul <<<< this command does not get executed
rem )



Forcing the COPY and now hercules compiles properly.


Is this a 'bug' or do you now require the english version of Windows to compile the 'official' version of Hercules? (The 'other' version does not have this problem)


Yvan...
grispoil@live.ca [hercules-390]
2017-03-25 15:42:54 UTC
Permalink
Issue resolved with the Commits done on Mar 13, 2017.
Thank you.

Loading...