ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: sorlok_reaves on August 11, 2014, 09:02:12 pm

Title: Trouble compiling ENIGMA on Windows
Post by: sorlok_reaves on August 11, 2014, 09:02:12 pm
I know, I know, everyone has trouble compiling ENIGMA on Windows. I actually had it working before, but I foolishly upgraded to Windows 8 and couldn't get it working on the new install. So now I'm trying to re-install from scratch in a Win7 virtual machine.

My question is, after following these steps:
http://enigma-dev.org/docs/Wiki/Install:Windows

...I use Git bash, cd to the source directory, and do:
Code: [Select]
mingw32-make
java -jar lateralgm.jar

...and it opens. But then, when I compile an empty project, I get the following verbose error.

Does anyone have any idea what I'm running into here?

Code: [Select]
Creating room creation code scope and parsing
"Linking" scripts into the objects...
"Linking" timelines into the objects...
"Link" complete.
Tabulating maximum argument passes to each script
Finished
Writing executable information and resources.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x625836c6, pid=1852, tid=1884
#
# JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build 1.7.0_67-b01)

# Java VM: Java HotSpot(TM) Client VM (24.65-b04 mixed mode, sharing windows-x86
 )
# Problematic frame:
# C  [compileEGMf.dll+0x36c6]
#
# Failed to write core dump. Minidumps are not enabled by default on client vers
ions of Windows
#
# An error report file with more information is saved as:
# c:\Users\Administrator\source\enigma-dev\hs_err_pid1852.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Title: Re: Trouble compiling ENIGMA on Windows
Post by: sorlok_reaves on August 11, 2014, 09:27:39 pm
Excuse the double-post; I was able to get to the next step by running "python install.py". Now, I get this:
Code: [Select]
C:/ProgramData/ENIGMA/.eobjs/Windows/Windows/Run/resources.res -lffi -lcomdlg32 -lgdi32 -lwinmm -lwininet -lopengl32 -lglu32 -lALURE32-static -lOpenAL32 -lvorbisfile -lvorbis -logg -lFLAC -lsndfile -lmodplug -lmpg123 -lole32 -lwinmm -lz
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lALURE32-static
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lFLAC
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lsndfile
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lmodplug
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lmpg123
collect2.exe: error: ld returned 1 exit status
Makefile:113: recipe for target 'compile_game' failed

I have the "additional dependencies" in the enigma-dev folder, just like the instructions mentioned. Is this because I am running LGM as "java -jar lateralgm.jar", rather than running the EXE? I tried recompiling the EXE, but I can't find the folder "enigma-dev\CompilerSource\stupidity-buffer".
Title: Re: Trouble compiling ENIGMA on Windows
Post by: Goombert on August 11, 2014, 11:29:51 pm
What you are looking for is the OpenAL libs, that additional folder under ENIGMAsystem, there should be a download link for it somewhere?

From what I gather you want the Windows dependencies zip.
http://enigma-dev.org/docs/Wiki/Install:Windows
Title: Re: Trouble compiling ENIGMA on Windows
Post by: sorlok_reaves on August 12, 2014, 12:18:51 am
What you are looking for is the OpenAL libs, that additional folder under ENIGMAsystem, there should be a download link for it somewhere?

From what I gather you want the Windows dependencies zip.
http://enigma-dev.org/docs/Wiki/Install:Windows

I've already got that in the right place; ENIGMA can find libffi, libvorbis, libdumb, etc. just fine. I did a file search, and the "Additional" folder does not contain anything named ALURE32-STATIC or FLACor sndfile (or the other two).

Is it possible that the Windows dependencies zip is missing these libs?
Title: Re: Trouble compiling ENIGMA on Windows
Post by: daz on August 12, 2014, 01:29:56 pm
In ENIGMAsystem\Additional\i686-w64-mingw32\lib I have all of those libraries.

I think the directory structure changed between when the Windows patch was created and now.

In the zip file there is ENIGMAsystem\Additional\Windows. Copy the contents of that Windows folder to ENIGMAsystem\Additional\YOURCOMPILER\ and see if it works.
Title: Re: Trouble compiling ENIGMA on Windows
Post by: sorlok_reaves on August 12, 2014, 02:11:43 pm
Ah, thanks I think I understand the problem now. The Portable EXE (https://dl.dropboxusercontent.com/u/1215621/ENIGMA%20Portable.exe) contains these libs. The zip of additional dependencies (https://dl.dropboxusercontent.com/u/21117924/WinPatch_28_08_2013.zip) does not. I will try this out after work, but I think your solution (copy from the portable) will work. Thanks!
Title: Re: Trouble compiling ENIGMA on Windows
Post by: sorlok_reaves on August 13, 2014, 10:40:44 am
All right, I finally got it working. Turns out that the easiest solution is to just install the portable EXE, then change the git repository and force-update. After that, everything works. Some gotchyas:

So building from source does not work as described on the wiki; additional steps are needed. Shall I update that page on the wiki, or would you prefer if I made a new page describing my method?
Title: Re: Trouble compiling ENIGMA on Windows
Post by: sorlok_reaves on August 13, 2014, 11:00:45 pm
Ugh, spoke too soon. It turns out that if I add a single, empty room (or a room with objects), I get the following:
(http://i.imgur.com/JupvjYn.png)

Do the ENIGMA devs on Windows have any good strategies for, e.g., getting a backtrace for this?

FYI, the main reason I'm doing this now is so that I can test out my ini branch before filing a pull request.
Title: Re: Trouble compiling ENIGMA on Windows
Post by: Goombert on August 13, 2014, 11:10:35 pm
Fudgeknuckle I am sorry about all of that I will get that dependencies ZIP updated if I can, so little time anymore. I generally use gdb sorlok, but I would like to ask whether you have successfully built for Windows before? It could help to clear eobjs as well, and it would also be cool to know whether the Portable ZIP does in fact work or not. Also if you want to just do your best with the Windows version of the ini extension and commit I can pull it this weekend or Friday when classes are done and test it out for you.
Title: Re: Trouble compiling ENIGMA on Windows
Post by: sorlok_reaves on August 13, 2014, 11:54:17 pm
Well, it's possible that this is related to me running in a virtual machine. I'll try it on my Windows partition towards the weekend.

Most of this is just related to Windows being a pain when it comes to dependencies.

In the worst case, I'll just make the ini pull request ---but I feel that I should be testing these things on Windows, too. So I'll give it a few more tries.
Title: Re: Trouble compiling ENIGMA on Windows
Post by: daz on August 14, 2014, 05:18:14 pm
You're most likely right about it being the fault of the VM. My guess would be you don't have hardware acceleration in there, and Enigma compiled games don't know how to deal with that. Just a guess, of course. You could upload the .exe produced and I can tell you if it runs on my machine, so you'd not have to wait until you can boot up a Windows partition.
Title: Re: Trouble compiling ENIGMA on Windows
Post by: sorlok_reaves on August 14, 2014, 06:26:00 pm
You're most likely right about it being the fault of the VM. My guess would be you don't have hardware acceleration in there, and Enigma compiled games don't know how to deal with that. Just a guess, of course. You could upload the .exe produced and I can tell you if it runs on my machine, so you'd not have to wait until you can boot up a Windows partition.

Yeah, it's definitely the VM. I tried it on my Windows partition and it works fine.

The cryptic error is probably because ENIGMA is requesting a GL resource of some kind, and instead of checking the return value (NULL in this case) it just uses it as-is.

At some point I'll try to narrow down what the component is, but for now I'll just test in my windows partition.

Thanks for the offer of testing the binary! Shouldn't be needed now though.