ENIGMA Forums

General fluff => General ENIGMA => Topic started by: TheExDeus on August 23, 2013, 04:02:47 PM

Title: Compiling from source
Post by: TheExDeus on August 23, 2013, 04:02:47 PM
All the changes to support installations have it made very hard to make it work from source on Windows. What I want to do:
1) Clone git (via GIT or just download master from github) and extract to folder C:/enigma-dev.
2) Compile compileEGMf.dll via the C::B project. It still doesn't work flawlessly as the textfile.cpp needs to removed from it (as it doesn't exist) and the paths need to be changed (right now it's in some documents), but after these changes it works. So I now have compiled compileEGMf.dll.
3) Compile ENIGMA.exe via C::B project (or makefile, whatever). This can be done via the stupidity-buffer (should rename that as I don't know what exactly it is referring to) and then I get ENIGMA.exe.
4) Extract newest LGM with ENIGMA plugin and put it in C:/enigma-dev.
5) Extract /additional needed (should be a separate downloadable .zip without LGM or anything else added).

The problem now is that ENIGMA.exe is modified so it requires some "init" and "compiled" and such files. I copied the files from installer as they are not available elsewhere, but it still doesn't work because it thinks enigma-dev should be a subdirectory. After I do that it tries to compile the .dll and the .exe again even though I already did that. It fails, because it tries to use mingw32 that comes with the installer (I think) so it uses some bizarre path to mingw that doesn't exist (which I think it gets from gcc.ey).
To fix this I need to change the "make: mingw32-make.exe" to "make: C:/mingw/bin/mingw32-make.exe" inside the gcc.ey. After that it still tries to compile the .dll, but it cannot and errors out with this:
Quote
Java Version: 10700 (1.7.0_25)
Loading lib files in E:\enigma-dev\enigma-dev\lateralgm.jar
01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl
 05_score.lgl 06_extra.lgl 07_draw.lgl
Calling `C:/mingw/bin/mingw32-make.exe eTCpath="null"`
> C:/mingw/bin/mingw32-make -j 3 -C CompilerSource
> Access denied - .
> File not found - -NAME
> File not found - -AND
> File not found - !
> File not found - -NAME
> mingw32-make[1]: Entering directory `E:/enigma-dev/enigma-dev/CompilerSource'
> process_begin: CreateProcess(NULL, uname -s, ...) failed.
> mingw32-make[1]: Leaving directory `E:/enigma-dev/enigma-dev/CompilerSource'
> mingw32-make[1]: *** No rule to make target `.eobjs/----------', needed by `../compileEGMf.dll'.  Stop.
> mingw32-make: *** [ENIGMA] Error 2
2
Process terminated

So thoughts:
1) Allow ENIGMA.exe to run without all those files and with LGM being in the same directory as the .exe. This way it will just run LGM and won't make it update/compile everything + I won't have to use the installer just to get those files.
2) If the .dll is present, then don't make it compile it again. So to upgrade you would delete it, but if it is compiled another way (or just copied from another source), then it can be used without recompilation, as I clearly cannot do it via the plugin (the error above).
3) Put the windows/gcc.ey in git. I think previously it was generated and so it was even recommended to delete it. Right now it is not generated and LGM plugin fails if it is not found. So I again had to use the installer to get it. And I had to modify it to have the make: path just because it can't find mingw32-make.exe while it is in PATH (I can do cmd->mingw32-make.exe just fine, so it is weird that LGM cannot find it).

So in essence I cannot install ENIGMA on my desktop PC right now. That is why I haven't developed anything and why I cannot help another user (AsherOS) with his problems. So any ideas/suggestions? I think the 3 points I added should be done and if anyone can do it (I don't think it's hard, just some if checks mostly), then it would be great.
Title: Re: Compiling from source
Post by: Goombert on August 23, 2013, 06:20:12 PM
Harri, init is the script that runs that zip through initialization it downloads the binaries from github and then compiles JDI after which it launches LGM and the setup is complete. If it was successful it just creates a blank file called "compiled" so that it knows next time it is run not to reinflate the binaries. I do not know how you are having a problem with it all of the sudden as nothing changed with it other than it doesn't execute through git bash, and can now work from Program Files. Latera the blank filed called "compiled" will be replaced with a settings.ini file that contains stuff such as auto check for updates, etc. If anything Harri, it should have been harder for you to use before, all that executable does now is what git-bash and the run script did, except fundies (cheeseboy) and polygonz tortured me into converting it to C++

Update:

Harri, I have committed a few changes to the enigma.exe
https://github.com/enigma-dev/enigma-dev/pull/345

It now checks if MinGW is already in your path and if not adds it locally for the ZIP. This should resolve issues with people who already have MinGW installed. However it is important to note that ENIGMA no longer works with the TDM installer, unless you disable date and time functions, the instructions for obtaining the proper vanilla GCC are updated on the Wiki.
http://enigma-dev.org/docs/Wiki/Install_Source
Title: Re: Compiling from source
Post by: TheExDeus on August 24, 2013, 07:10:05 AM
Quote
If anything Harri, it should have been harder for you to use before, all that executable does now is what git-bash and the run script did, except fundies (cheeseboy) and polygonz tortured me into converting it to C++
But that is the problem. Previously you had the option of NOT doing that. I don't need ENIGMA to pull or check anything. I update it from git myself. I just want to run it and for it to not fail.

Quote
Harri, I have committed a few changes to the enigma.exe
Now at least LGM runs fine. Can't yet compile thought. The error was this:
Quote
process_begin: CreateProcess(NULL, mkdir.exe -p .eobjs/Windows/Windows/Run/, ...) failed.
make (e=2): The system cannot find the file specified.
I am sure it just relates to the fact windows doesn't have mkdir. To fix that I had to download and install CoreUtils from here: http://gnuwin32.sourceforge.net/packages/coreutils.htm
After that I get this error with the resource file (which I thought you wrote out when compiling?):
Quote
echo "// GENERATED RESOURCE FILE FRONTEND" > .eobjs/Windows/Windows/Run/resources.rc
for res in Preprocessor_Environment_Editable/Resources.rc ../Additional/Windows/al/oal32.rc Widget_Systems/Win32/res.rc; do echo "#include \"$res\"" >> .eobjs/Windows/Windows/Run/resources.rc; done
res was unexpected at this time.
mingw32-make.exe[1]: *** [.eobjs/Windows/Windows/Run/resources.res] Error 255
mingw32-make.exe[1]: Leaving directory `E:/enigma-dev/enigma-dev/ENIGMAsystem/SHELL'
mingw32-make.exe: *** [Game] Error 2
The file just has the "// GENERATED RESOURCE FILE FRONTEND" inside of it. I compiled both the .dll and .exe from newest GIT so it should be up to date. If the java plugin wrote the file though, then it might be not up to date (downloaded from the LGM 1.8 topic yesterday).

The mingw I am using is the one from installer. I think I will download from http://mingw-w64.sourceforge.net/. The problem is always getting a working version as they stupidly have like 100592 packages available.

P.s. the link given in the wiki is just for mingw32, you cannot download 64bit there as they are separate projects.
Title: Re: Compiling from source
Post by: Goombert on August 24, 2013, 03:08:16 PM
Quote
But that is the problem. Previously you had the option of NOT doing that. I don't need ENIGMA to pull or check anything. I update it from git myself. I just want to run it and for it to not fail.
No, I agreed with them otherwise I wouldn't have rewritten it, I am going to give it a settings file to turn that stuff off, but having it bouncing from the exe to the git bash script to LGM is way to steps to have to double check and I can at least get it working with MinGW installed already, to fix that bug. I'm going to add settings for that in a settings.ini file anyway, people don't want to have to recode bash scripts, etc.

Quote
I am sure it just relates to the fact windows doesn't have mkdir. To fix that I had to download and install CoreUtils from here: http://gnuwin32.sourceforge.net/packages/coreutils.htm
After that I get this error with the resource file (which I thought you wrote out when compiling?):
Dafux, Harri, I am on Windows now, I quit Linux cause it's crap, but no, where the fuck did you install MinGW from?

Quote
The file just has the "// GENERATED RESOURCE FILE FRONTEND" inside of it. I compiled both the .dll and .exe from newest GIT so it should be up to date. If the java plugin wrote the file though, then it might be not up to date (downloaded from the LGM 1.8 topic yesterday).
No, that resource file is different .res is something Josh outputs, I output Preprocessor_Environment_Editable/Resources.rc and then link it from SHELL/Makefile

Quote
P.s. the link given in the wiki is just for mingw32, you cannot download 64bit there as they are separate projects.
Son of a bitch, I hate them, don't bother with that TDM installer either, then you can't use Date/Time extension cause it fails to static link the standard C runtime, you can just use TDM installer though if you don't want Date/Time functions.

Edit: Harri, this was the result of MinGW no longer including Mysys, working it out now with Josh.

Edit 2: I just committed the temporary fix Harri, try again.
Title: Re: Compiling from source
Post by: polygone on August 24, 2013, 05:13:53 PM
More specifically these apps are required:

https://app.box.com/files/0/f/72770310/1/f_9958374962

That res error your getting is from not having sh.exe

So we're going to include those file in our mingw folder, and robert has also added the git path to make doubly sure.
Title: Re: Compiling from source
Post by: Goombert on August 24, 2013, 05:28:59 PM
Fuck MinGW

Edit: Harri, I just committed the new exe it uses an ini file now, settings.ini for which the code should be...

Code: [Select]
[MAIN]
setupcompleted=1
checkforjava=0
redirectoutput=1

Delete the file called compiled, and you can set that to 1 there if you already set up ENIGMA. I've uploaded the new zip already.
Title: Re: Compiling from source
Post by: TheExDeus on August 25, 2013, 11:02:26 AM
This is just getting idiotic. Can someone suggest a working mingw64 installation? The TDM one doesn't work, the Yypkg one doesn't work, the Mingw-builds one doesn't work. They all work as in having G++ and being able to compile basic programs. But Mingw-builds bitches about "long long", TDM about linking, Yypkg about everything. Most of them don't have basic tools with them, so I need to install gnu tools sepratly and the find.exe seperatly and so on. It takes freaking hours. The ones I used previously were personal builds from here: http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/ but they are not that up-to-date. So while they would be working with ENIGMA, they wouldn't be working with my other projects. And I don't want several mingw's everywhere. Also, the in the ENIGMA installer is also not working (it also lacks a lot of programs).
Title: Re: Compiling from source
Post by: TheExDeus on August 25, 2013, 12:08:34 PM
Now when compiling the .dll via the C::B project I get these errors (which seem very related to the source itself and not the compiler, although I don' think there has been any changes to the code recently):
Quote
||=== compileEGMf, WinRelease ===|
E:\enigma-dev\CompilerSource\backend\JavaCallbacks.cpp||In function 'void javano_signal()':|
E:\enigma-dev\CompilerSource\backend\JavaCallbacks.cpp|33|warning: no previous declaration for 'void javano_signal()' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\backend\JavaCallbacks.cpp||In function 'void javano_signal_i(int)':|
E:\enigma-dev\CompilerSource\backend\JavaCallbacks.cpp|34|warning: no previous declaration for 'void javano_signal_i(int)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\backend\JavaCallbacks.cpp||In function 'void javano_signal_cstr(const char*)':|
E:\enigma-dev\CompilerSource\backend\JavaCallbacks.cpp|35|warning: no previous declaration for 'void javano_signal_cstr(const char*)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\backend\JavaCallbacks.cpp||In function 'int javano_signal_exec(const char*, const char**, int)':|
E:\enigma-dev\CompilerSource\backend\JavaCallbacks.cpp|36|warning: no previous declaration for 'int javano_signal_exec(const char*, const char**, int)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\backend\JavaCallbacks.cpp||In function 'Image* javano_signal_buffer(char*, int)':|
E:\enigma-dev\CompilerSource\backend\JavaCallbacks.cpp|37|warning: no previous declaration for 'Image* javano_signal_buffer(char*, int)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile.cpp||In function 'std::string fc(const char*)':|
E:\enigma-dev\CompilerSource\compiler\compile.cpp|100|warning: declaration of 'pt' shadows a global declaration [-Wshadow]|
.\JDI\src\Storage\definition.h|86|warning: shadowed declaration is here [-Wshadow]|
E:\enigma-dev\CompilerSource\compiler\compile.cpp|107|warning: ISO C++ forbids variable length array 'a' [-Wvla]|
E:\enigma-dev\CompilerSource\compiler\compile.cpp||In function 'std::string toUpper(std::string)':|
E:\enigma-dev\CompilerSource\compiler\compile.cpp|115|warning: no previous declaration for 'std::string toUpper(std::string)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile.cpp||In function 'void clear_ide_editables()':|
E:\enigma-dev\CompilerSource\compiler\compile.cpp|116|warning: no previous declaration for 'void clear_ide_editables()' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile.cpp||In function 'int compileEGMf(EnigmaStruct*, const char*, int)':|
E:\enigma-dev\CompilerSource\compiler\compile.cpp|173|warning: no previous declaration for 'int compileEGMf(EnigmaStruct*, const char*, int)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile.cpp||In member function 'virtual int lang_CPP::compile(EnigmaStruct*, const char*, int)':|
E:\enigma-dev\CompilerSource\compiler\compile.cpp|306|warning: ISO C++ forbids variable length array 'parsed_scripts' [-Wvla]|
E:\enigma-dev\CompilerSource\compiler\compile.cpp|734|warning: extra ';' [-Wpedantic]|
E:\enigma-dev\CompilerSource\compiler\compile_common.cpp||In function 'void used_funcs::zero()':|
E:\enigma-dev\CompilerSource\compiler\compile_common.cpp|38|warning: no previous declaration for 'void used_funcs::zero()' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'std::string reads(int)':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|59|warning: no previous declaration for 'std::string reads(int)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'std::string readSTR()':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|65|warning: no previous declaration for 'std::string readSTR()' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'int readi()':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|92|warning: no previous declaration for 'int readi()' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'unsigned char readb()':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|99|warning: no previous declaration for 'unsigned char readb()' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'char* readv(int)':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|106|warning: no previous declaration for 'char* readv(int)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|109|warning: suggest braces around empty body in an 'if' statement [-Wempty-body]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'void writes(FILE*, std::string)':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|113|warning: no previous declaration for 'void writes(FILE*, std::string)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'void writeDefine(FILE*, std::string, int)':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|117|warning: no previous declaration for 'void writeDefine(FILE*, std::string, int)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'void transfer(int, FILE*, FILE*)':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|124|warning: no previous declaration for 'void transfer(int, FILE*, FILE*)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'int fileout(char*, char*, int)':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|139|warning: no previous declaration for 'int fileout(char*, char*, int)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'int transi(FILE*)':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|163|warning: no previous declaration for 'int transi(FILE*)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp||In function 'void transSTR(FILE*)':|
E:\enigma-dev\CompilerSource\compiler\compile_includes.cpp|170|warning: no previous declaration for 'void transSTR(FILE*)' [-Wmissing-declarations]|
E:\enigma-dev\CompilerSource\compiler\components\module_write_fonts.cpp||In member function 'virtual int lang_CPP::module_write_fonts(EnigmaStruct*, FILE*)':|
E:\enigma-dev\CompilerSource\compiler\components\module_write_fonts.cpp|74|warning: ISO C++ forbids variable length array 'boxes' [-Wvla]|
E:\enigma-dev\CompilerSource\compiler\components\module_write_fonts.cpp|123|warning: ISO C++ forbids variable length array 'bigtex' [-Wvla]|
E:\enigma-dev\CompilerSource\compiler\components\module_write_fonts.cpp|126|warning: ISO C++ forbids variable length array 'glyphtexc' [-Wvla]|
E:\enigma-dev\CompilerSource\compiler\components\parse_and_link.cpp|49|warning: redundant redeclaration of 'std::string tostring(int)' in same scope [-Wredundant-decls]|
.\compiler\compile_includes.h|33|warning: previous declaration of 'std::string tostring(int)' [-Wredundant-decls]|
E:\enigma-dev\CompilerSource\compiler\components\parse_and_link.cpp||In member function 'virtual int lang_CPP::compile_parseAndLink(EnigmaStruct*, parsed_script**)':|
E:\enigma-dev\CompilerSource\compiler\components\parse_and_link.cpp|64|error: ambiguous overload for 'operator<<' (operand types are 'ideprint' and 'std::map<std::basic_string<char>, dectrip>::size_type {aka long long unsigned int}')|
E:\enigma-dev\CompilerSource\compiler\components\parse_and_link.cpp|64|note: candidates are:|
.\backend\ideprint.h|37|note: ideprint& ideprint::operator<<(int)|
.\backend\ideprint.h|38|note: ideprint& ideprint::operator<<(long int)|
.\backend\ideprint.h|39|note: ideprint& ideprint::operator<<(unsigned int)|
.\backend\ideprint.h|40|note: ideprint& ideprint::operator<<(long unsigned int)|
.\backend\ideprint.h|45|note: ideprint& ideprint::operator<<(char)|
.\backend\ideprint.h|46|note: ideprint& ideprint::operator<<(unsigned char)|
.\backend\ideprint.h|47|note: ideprint& ideprint::operator<<(double)|
||=== Build finished: 1 errors, 31 warnings (0 minutes, 4 seconds) ===|
Josh, any ideas?
Title: Re: Compiling from source
Post by: polygone on August 25, 2013, 03:06:53 PM
Harri use the mingw from inside the windows zip.
Title: Re: Compiling from source
Post by: TheExDeus on August 25, 2013, 03:36:48 PM
As I said, it doesn't work either.

edit: This is what I get when I remove all mingw/msys/gnu tools from my PC, delete ENIGMA and install only from the ENIGMAPortable.exe. I launch it, it downloads from git, and then errors with this after launching LGM:
Quote
Java Version: 10700 (1.7.0_25)
Loading lib files in E:\ENIGMA\enigma-dev\lateralgm.jar
01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl
 05_score.lgl 06_extra.lgl 07_draw.lgl
Calling `mingw32-make.exe eTCpath="null"`
> mingw32-make.exe -j 3 -C CompilerSource
> Access denied - .
> File not found - -NAME
> File not found - -AND
> File not found - !
> File not found - -NAME
> mingw32-make.exe[1]: Entering directory `E:/ENIGMA/enigma-dev/CompilerSource'
> mingw32-make.exe[1]: *** No rule to make target `.eobjs/----------', needed by `../compileEGMf.dll'.  Stop.
> mingw32-make.exe[1]: Leaving directory `E:/ENIGMA/enigma-dev/CompilerSource'
> mingw32-make.exe: *** [ENIGMA] Error 2
2
Process terminated
So it doesn't work for me either from source or from the .zip.

Previously I could compile the .dll myself using the C::B project. Now it doesn't work as for some reason it finds some ambiguous overload.
Title: Re: Compiling from source
Post by: Goombert on August 25, 2013, 04:32:15 PM
Harri, no, that is not what he meant, he meant use the mingw from inside the zip folder and just copy it to C:\ and set environment variable.

But this again, is all fucking MinGW's fault for no longer distributing Mysys. Harri, can you give us the output of gcc --version?
Title: Re: Compiling from source
Post by: TheExDeus on August 25, 2013, 05:32:59 PM
Quote
Harri, no, that is not what he meant, he meant use the mingw from inside the zip folder and just copy it to C:\ and set environment variable.
And that is what I meant! It doesn't work when I copy out and set the PATH. This is what I get from gcc -v:
Quote
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/i686-w64-mingw32/4.7.2/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: /home/ruben/mingw-w64/src/gcc/configure --host=i686-w64-mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 --with-sysroot=/home/ruben/mingw-w64/mingw32mingw32/mingw32 --prefix
=/home/ruben/mingw-w64/mingw32mingw32/mingw32 --with-gmp=/home/ruben/mingw-w64/prereq/i686-w64-mingw32/install --with-mpfr=/home/ruben/mingw-w64/prereq/i686-w64-mingw32/install --with-mpc=/home/ruben/
mingw-w64/prereq/i686-w64-mingw32/install --with-ppl=/home/ruben/mingw-w64/prereq/i686-w64-mingw32/install --with-cloog=/home/ruben/mingw-w64/prereq/i686-w64-mingw32/install --disable-ppl-version-chec
k --disable-cloog-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static -lstdc++ -lm' --enable-shared --enable-static --enable-threads=win32 --enable-plugins --disable-multilib --ena
ble-languages=c,lto,c++,objc,obj-c++,fortran,java --enable-libgomp --disable-dw2-exceptions --enable-sjlj-exceptions --enable-fully-dynamic-string --enable-libstdcxx-time --disable-nls --disable-werro
r --enable-checking=release --with-gnu-as --with-gnu-ld --disable-win32-registry --disable-rpath --disable-werror --with-libiconv-prefix=/home/ruben/mingw-w64/prereq/i686-w64-mingw32/install --with-pk
gversion=rubenvb-4.7.2-release --with-bugurl=mingw-w64-public@lists.sourceforge.net CC= CFLAGS='-O2 -march=nocona -mtune=core2 -fomit-frame-pointer -momit-leaf-frame-pointer' LDFLAGS=' -Wl,--large-add
ress-aware'
Thread model: win32
gcc version 4.7.2 (rubenvb-4.7.2-release)
This is when using the mingw inside the zip. With the ones I tried previously I had 4.8.1.
Title: Re: Compiling from source
Post by: Goombert on August 25, 2013, 05:57:28 PM
Did you say you already have Msys installed Harri? Polygonz I am thinking it might be the same issue as with frogg. Give us your full environment path that is set Harri.
Title: Re: Compiling from source
Post by: polygone on August 25, 2013, 06:41:29 PM
As I said, it doesn't work either.

edit: This is what I get when I remove all mingw/msys/gnu tools from my PC, delete ENIGMA and install only from the ENIGMAPortable.exe. I launch it, it downloads from git, and then errors with this after launching LGM:
Quote
Java Version: 10700 (1.7.0_25)
Loading lib files in E:\ENIGMA\enigma-dev\lateralgm.jar
01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl
 05_score.lgl 06_extra.lgl 07_draw.lgl
Calling `mingw32-make.exe eTCpath="null"`
> mingw32-make.exe -j 3 -C CompilerSource
> Access denied - .
> File not found - -NAME
> File not found - -AND
> File not found - !
> File not found - -NAME
> mingw32-make.exe[1]: Entering directory `E:/ENIGMA/enigma-dev/CompilerSource'
> mingw32-make.exe[1]: *** No rule to make target `.eobjs/----------', needed by `../compileEGMf.dll'.  Stop.
> mingw32-make.exe[1]: Leaving directory `E:/ENIGMA/enigma-dev/CompilerSource'
> mingw32-make.exe: *** [ENIGMA] Error 2
2
Process terminated
So it doesn't work for me either from source or from the .zip.

Previously I could compile the .dll myself using the C::B project. Now it doesn't work as for some reason it finds some ambiguous overload.
That's the original error you had.
Title: Re: Compiling from source
Post by: Goombert on August 26, 2013, 04:37:40 AM
Hrm, after fixing that cubes demo, I decided to start implementing the shader resources...
Code: [Select]
Calling `mingw32-make.exe eTCpath="null"`
mingw32-make.exe -j 3 -C CompilerSource
Access denied - .
File not found - -NAME
File not found - -AND
File not found - !
File not found - -NAME
mingw32-make.exe[1]: *** No rule to make target `.eobjs/----------', needed by `../compileEGMf.dll'.  Stop.
mingw32-make.exe[1]: Entering directory `C:/Users/Owner/Desktop/ENIGMA/enigma-dev/CompilerSource'
mingw32-make.exe[1]: Leaving directory `C:/Users/Owner/Desktop/ENIGMA/enigma-dev/CompilerSource'
mingw32-make.exe: *** [ENIGMA] Error 2
Populating communication buffer. This may take a while on large files...
Now I am a getting the same exact error :P
Title: Re: Compiling from source
Post by: TheExDeus on August 26, 2013, 04:57:48 AM
Quote
That's the original error you had.
And that is the error I have no matter what implementation of Mingw I am using. The one you quoted was when I was using the MinGW you packed into the installer.

Quote
Did you say you already have Msys installed Harri? Polygonz I am thinking it might be the same issue as with frogg. Give us your full environment path that is set Harri.
No, I don't have Msys installed right now. I had it when I was using Mingw-builds as it packs everything in it. I will install Msys from here now and see if it works: http://sourceforge.net/apps/trac/mingw-w64/wiki/MSYS

edit: It seems that I do need gnuwin tools anyway, as for example FIND.exe doesn't come with neither mingw or msys. When I removed the tools I started getting this:
Quote
Java Version: 10700 (1.7.0_25)
Loading lib files in E:\ENIGMA\enigma-dev\lateralgm.jar
01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl
 05_score.lgl 06_extra.lgl 07_draw.lgl
Calling `mingw32-make.exe eTCpath="null"`
> mingw32-make.exe -j 3 -C CompilerSource
> FIND: Parameter format not correct
> mingw32-make.exe[1]: Entering directory `E:/ENIGMA/enigma-dev/CompilerSource'
> g++ -static-libgcc -shared -o ../compileEGMf.dll 
> g++: fatal error: no input files
> compilation terminated.
> mingw32-make.exe[1]: Leaving directory `E:/ENIGMA/enigma-dev/CompilerSource'
> mingw32-make.exe[1]: *** [../compileEGMf.dll] Error 1
> mingw32-make.exe: *** [ENIGMA] Error 2
2
Process terminated
Title: Re: Compiling from source
Post by: Goombert on August 26, 2013, 05:22:50 AM
Motherf***er now I can't compile either, this appears to be related to Mysys according to Google...
http://marc.info/?l=mingw-msys&m=121647839108061

This is all I can find in the CompilerSource's makefile...
Code: [Select]
SOURCES := $(shell find . -name "*.cpp" -and ! -name "standalone_*")
Edit: Aha! Harri this might not be your fault at all, please pastebin me enigma-dev/output_log.txt something in the plugin might be failing on you.
Title: Re: Compiling from source
Post by: TheExDeus on August 26, 2013, 06:12:53 AM
All the errors I posted here are from output_log.txt.

Right now I have that "FIND: Parameter format not correct" error even though I reinstalled GnuWin tools which has proper FIND and added it properly in PATH (just like before when it worked). Now it doesn't. And it really sucks that I need to install 4 dependencies now while previously (about a year ago) I could compile ENIGMA with just mingw. A lot has changed. mingw had msys before and msys had gnu tools before I guess. Plus the plugin changes and ENIGMA.exe changes have been made as well.

edit: I just did a clean install using the newest ENIGMAPortable.exe and got this error again:
Quote
Java Version: 10700 (1.7.0_25)
Loading lib files in E:\ENIGMA\enigma-dev\lateralgm.jar
01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl
 05_score.lgl 06_extra.lgl 07_draw.lgl
Calling `mingw32-make.exe eTCpath="null"`
> mingw32-make.exe -j 3 -C CompilerSource
> Access denied - .
> File not found - -NAME
> File not found - -AND
> File not found - !
> File not found - -NAME
> mingw32-make.exe[1]: Entering directory `E:/ENIGMA/enigma-dev/CompilerSource'
> mingw32-make.exe[1]: *** No rule to make target `.eobjs/----------', needed by `../compileEGMf.dll'.  Stop.
> mingw32-make.exe[1]: Leaving directory `E:/ENIGMA/enigma-dev/CompilerSource'
> mingw32-make.exe: *** [ENIGMA] Error 2
2
Process terminated
Title: Re: Compiling from source
Post by: polygone on August 26, 2013, 10:42:23 AM
Paste your env paths here, also try temporarily clearing them of everything that might conflict.

Also try moving ENIGMA into C:/ if you're not currently running it from there, see if that helps.
Title: Re: Compiling from source
Post by: TheExDeus on August 26, 2013, 03:52:38 PM
When I install using the newest ENIGMAPortable.exe it seems I can compile the .dll the first time (unless it is already precompiled) and run it. But when I delete the .dll and launch enigma.exe so it could recompile it, it errors with the previous error.

This is my PATH now: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;E:\OpenCV2.4.5\build\bin;C:\Program Files (x86)\Java\jre7\bin;C:\mingw\bin;C:\msys\bin;

When it compiled the .dll correctly, then I still cannot compile an empty game though. LGM just crashed with this: http://pastebin.com/mTGdAKwP
Title: Re: Compiling from source
Post by: polygone on August 26, 2013, 03:54:53 PM
Oh yeah that was changed, you now have to run git-bash and run rebuildcompiler.

What is the enigma_log output when you get that LGM error?
Title: Re: Compiling from source
Post by: TheExDeus on August 26, 2013, 04:21:04 PM
Hmm.. why does it work when done that way? It compiles... finally.

This is the output_log when LGM crashes: http://pastebin.com/juf1UBKL
Title: Re: Compiling from source
Post by: polygone on August 26, 2013, 04:37:56 PM
Hmm.. why does it work when done that way? It compiles... finally.

This is the output_log when LGM crashes: http://pastebin.com/juf1UBKL
I have no idea, it's changed somehow I ran into the same problem.

@the log I believe I saw that error somewhere else when it occurs after 'Writing executable information and resources'. I'm trying to remember what happened there.
Title: Re: Compiling from source
Post by: polygone on August 26, 2013, 04:59:42 PM
I think I remember Robert committed something to fix that last time. So maybe he has another error with it still.

You could try going into compile.cpp and outputting a load of debug messages from "Writing executable information and resources" upto "Writing modes and settings" in order to isolate the problem area. Remember to rebuild :p
Title: Re: Compiling from source
Post by: polygone on August 26, 2013, 10:02:04 PM
Also are you sure you used the newest ENIGMA zip and you're not moving MinGW right? Robert is saying that's an error he fixed before...

Anyway you might also want to try this ENIGMA.exe I made, it might help: https://app.box.com/s/5x5v6r40ckjgnhs6nahv

Also are you still trying to run it from E:/ I don't know if it makes a difference but I think testing in C:/ might be a good idea.
Title: Re: Compiling from source
Post by: Goombert on August 27, 2013, 04:08:56 AM
Shaders are now a built in resource...
https://www.dropbox.com/s/3ogjo87gzypirsk/perftester.egm

You can save and load them under EGM.

(http://oi43.tinypic.com/16b12xx.jpg)
Title: Re: Compiling from source
Post by: TheExDeus on August 27, 2013, 07:14:01 AM
Will that fix my problems?

Will try to update everything again later.
Title: Re: Compiling from source
Post by: polygone on August 27, 2013, 07:22:59 AM
That .exe I made isn't in the new zip yet. But if it doesn't fix it try isolated the problem with messages in the compiler like I said.
Title: Re: Compiling from source
Post by: TheExDeus on August 27, 2013, 04:02:46 PM
It works now. Some of the last changes in git might of fixed it as well as the fact that the .dll cannot be compiled from cmd and you must bash at all times.
So the ENIGMAPortable.exe works out of the box and installing from source works if calling "mingw32-make" from bash (git-bash in my case, but I think anything from Msys or Cygwin would do as well).

I also made changes described in the OP under "thoughts".

So it finally works again. Thank you all! Now we must make sure it doesn't break and update installation instructions.
Title: Re: Compiling from source
Post by: polygone on August 27, 2013, 04:22:14 PM
I think more likely my .exe change fixed it. I think it will fix a lot of the problems people have been having.
Title: Re: Compiling from source
Post by: Goombert on August 27, 2013, 04:32:19 PM
Quote
So it finally works again. Thank you all! Now we must make sure it doesn't break and update installation instructions.

Quote
I think more likely my .exe change fixed it. I think it will fix a lot of the problems people have been having.


Still needa fix why its not rebuilding compileEGMf
Title: Re: Compiling from source
Post by: polygone on August 27, 2013, 04:55:40 PM
I actually think it's better that it doesn't auto-rebuild, because I think it slowed down the LGM loading - I'm not sure if it's still checking though but just not doing it if so I think the check should be removed altogether. I also feel it's a lot neater and appealing to the user to have it rebuild outside the program instead of on load when they want to be immediately working.

A much better way of going about this I think is to automatically rebuild whenever the repo is updated - it only takes 2 seconds to run through it when it doesn't need to be updated and by doing that it always makes sure that and it's not like people update that much so it's not really a drag on time. Here is a zip with the files that have been changed: https://app.box.com/s/bm118pruzkcshoimr8w1  this includes a rebuild of ENIGMA.exe with Harri's changes and one of mine as well.
Title: Re: Compiling from source
Post by: Goombert on August 27, 2013, 04:56:47 PM
Quote
I actually think it's better that it doesn't auto-rebuild, because I think it slowed down the LGM loading
Ok but just because you think that doesn't mean it should be left broken I could very easily add an option to the settings ini file.

Quote
A much better way of going about this I think is to automatically rebuild whenever the repo is updated
It does exactly what it does at compile LIKE EVERY OTHER FUCKING COMPILER, it just checks if files were changed and if so recompiles them, sometimes just changing a header or a makefile doesn't do it though and you'll need to go to a source and add a space or something.
Title: Re: Compiling from source
Post by: polygone on August 27, 2013, 04:59:36 PM
Oh quick note make sure to change setupcompleted to 0 in the file I put up.

Quote
I actually think it's better that it doesn't auto-rebuild, because I think it slowed down the LGM loading
Ok but just because you think that doesn't mean it should be left broken I could very easily add an option to the settings ini file.
I don't think there's any need for it, if it rebuilds when enigma updates then the compiler will never get out of line.
Title: Re: Compiling from source
Post by: Goombert on August 27, 2013, 05:00:22 PM
What fuck file did you put up?
Title: Re: Compiling from source
Post by: polygone on August 27, 2013, 05:01:20 PM
Did you read my post?  https://app.box.com/s/bm118pruzkcshoimr8w1
Title: Re: Compiling from source
Post by: TheExDeus on August 28, 2013, 01:13:07 AM
If you will push for this auto-update/compile bull* that will break installing from source again then we might as well make two ENIGMA.exe's, because the changes I made basically just disabled all of it. It is great if it just a setting in the .ini, but when you run the first time the ini isn't even there yet. So what I basically did is ask in a promp if run anyway if the init script is not found (that is only the case when installing from source. If it is installed from the installer, then the file will be present) and if so, then write a setting in the .ini that will skip all of the git and compile thing at every start. The only other change was to make sure ENIGMA.exe can be in the same folder as the ENIGMA itself, as there is no logical reason to create 1 subdir just for the .exe (as when installing from source you have mingw and git installed elsewhere).

So Robert, if you can make the changes without breaking this then it would be great. The best way would be to still check if "skippedinit" is false and then do the upgrade check/upgrade itself. Otherwise skip it.
Title: Re: Compiling from source
Post by: Goombert on August 28, 2013, 01:32:46 AM
Yes, of course I can? Look at the source code is halfway done I just need to fix up the bash script to download binaries, init script will just download the latest update. I am still tryna think about where to put the damn binaries at, I might just have josh throw it all in a git repository so it can just be a bash script and the commit log will be the update feed.
Title: Re: Compiling from source
Post by: TheExDeus on August 28, 2013, 02:04:11 AM
I doubt Josh of any people will trow binaries in git. It's more likely there will be space on ENIGMA server.
Title: Re: Compiling from source
Post by: Goombert on August 28, 2013, 02:23:22 AM
Ya, but I don't like nagging him to update the shit cause I change stuff so frequently, especially lately because I have been on the ball.

@Polyfag I finally fixed that LGM bug with Game Settings and Info the proper way, the frame doesn't have to recreate itself now so it pops open instantly and fixes the issue you and frogg reported to me, you can get the new JAR from the LGM topic...
http://enigma-dev.org/forums/index.php?topic=1245.0
Title: Re: Compiling from source
Post by: polygone on August 29, 2013, 03:16:53 PM
Oh funnily enough I'm still getting that original error:

Code: [Select]
    Java Version: 10700 (1.7.0_17)
    Loading lib files in C:\Program Files\ENIGMA\enigma-dev\lateralgm.jar
    01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl
     05_score.lgl 06_extra.lgl 07_draw.lgl
    Calling `mingw32-make.exe eTCpath="null"`
    > mingw32-make.exe -j 3 -C CompilerSource
    > Access denied - .
    > File not found - -NAME
    > File not found - -AND
    > File not found - !
    > File not found - -NAME
    > mingw32-make.exe[1]: Entering directory `C:/Program Files/ENIGMA/enigma-dev/CompilerSource'
    > process_begin: CreateProcess(NULL, uname -s, ...) failed.
    > mingw32-make.exe[1]: *** No rule to make target `.eobjs/----------', needed by `../compileEGMf.dll'.  Stop.
    > mingw32-make.exe[1]: Leaving directory `C:/Program Files/ENIGMA/enigma-dev/CompilerSource'
    > mingw32-make.exe: *** [ENIGMA] Error 2
    2
    Process terminated
    Initializing Enigma:
    Linking up to IDE
    Implementing JDI basics
    UnimplementedUnimplemented
     
    Choosing language: C++
    Reading GCC builtins
    Read key `defines` as `cpp -dM -x c++ -E $blank`
    Parsed `cpp` `-dM -x c++ -E blank.txt`: redirect=yes
But it's just ignoring it and continuing as normal. I think this is what's stopping the compiler from automatically rebuilding.
Title: Re: Compiling from source
Post by: TheExDeus on August 29, 2013, 04:05:49 PM
It is. The reason it seems it that it can compile only from bash. At least this is the error I get when compiling from cmd (which ENIGMA.exe/LGM tries to do). It does seem to work when doing it the first time though. Only subsequent runs trows this error.

edit: From LGM side of things I get crashes once in a while. Dump shows something like this http://pastebin.com/c1FknHS2.
Title: Re: Compiling from source
Post by: Josh @ Dreamland on August 29, 2013, 04:25:11 PM
What? The default OS is supposed to be Windows, as it is the only operating system too incompetent to identify itself from the CLI. I don't know where it's getting that ---------- shit.
Title: Re: Compiling from source
Post by: polygone on August 29, 2013, 04:30:59 PM
edit: From LGM side of things I get crashes once in a while. Dump shows something like this http://pastebin.com/c1FknHS2.
That's the compiler segfaulting again. It used to happen to me all the time but it's stopped more or less for me now.

Josh do we really need to check every load of LGM for a change to the compiler? I still think it's better if it's done at update instead.

On another point what can we do to stop the output_log growing into a stupidly massive size. I just managed to get it up to 71MB compiling this game 4 times.
Title: Re: Compiling from source
Post by: Goombert on August 30, 2013, 02:40:48 AM
@polyass delete the file if it exists

and somebody fix that fucking compiler as Harri just fucking pointed out its causing random segfaults now, I am getting them too.
Title: Re: Compiling from source
Post by: polygone on August 30, 2013, 10:19:57 AM
somebody fix that fucking compiler as Harri just fucking pointed out its causing random segfaults now, I am getting them too.
You've made all the changes to the compiler recently.
https://github.com/enigma-dev/enigma-dev/commits/master/CompilerSource