Pages: 1
  Print  
Author Topic: Trouble compiling ENIGMA on Windows  (Read 2545 times)
Offline (Unknown gender) sorlok_reaves
Posted on: August 11, 2014, 09:02:12 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
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.
#
Logged
Offline (Unknown gender) sorlok_reaves
Reply #1 Posted on: August 11, 2014, 09:27:39 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
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".
Logged
Offline (Male) Goombert
Reply #2 Posted on: August 11, 2014, 11:29:51 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
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
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) sorlok_reaves
Reply #3 Posted on: August 12, 2014, 12:18:51 AM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
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?
Logged
Offline (Unknown gender) daz
Reply #4 Posted on: August 12, 2014, 01:29:56 PM
Contributor
Joined: Jul 2010
Posts: 167

View Profile
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.
Logged
Offline (Unknown gender) sorlok_reaves
Reply #5 Posted on: August 12, 2014, 02:11:43 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
Ah, thanks I think I understand the problem now. The Portable EXE contains these libs. The zip of additional dependencies does not. I will try this out after work, but I think your solution (copy from the portable) will work. Thanks!
Logged
Offline (Unknown gender) sorlok_reaves
Reply #6 Posted on: August 13, 2014, 10:40:44 AM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
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:
  • The "Additional Dependencies" link in the wiki is missing 5 libraries. Only the portable EXE works.
  • The statically-compiled libraries in the portable EXE don't work well with other versions of MinGW (obviously). So it's best to use the mingw install that comes with the EXE.
  • The latest version of MinGW has issue with the "Windows widgets" API in ENIGMA (I have no idea why). Again, best to use the portable EXE to "jump start" source builds.

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?
Logged
Offline (Unknown gender) sorlok_reaves
Reply #7 Posted on: August 13, 2014, 11:00:45 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
Ugh, spoke too soon. It turns out that if I add a single, empty room (or a room with objects), I get the following:


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.
Logged
Offline (Male) Goombert
Reply #8 Posted on: August 13, 2014, 11:10:35 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
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.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) sorlok_reaves
Reply #9 Posted on: August 13, 2014, 11:54:17 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
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.
Logged
Offline (Unknown gender) daz
Reply #10 Posted on: August 14, 2014, 05:18:14 PM
Contributor
Joined: Jul 2010
Posts: 167

View Profile
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.
Logged
Offline (Unknown gender) sorlok_reaves
Reply #11 Posted on: August 14, 2014, 06:26:00 PM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
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.
Logged
Pages: 1
  Print