ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: keganonthedunes on October 16, 2018, 07:10:15 pm

Title: Win32 Enigma missing ffi.h
Post by: keganonthedunes on October 16, 2018, 07:10:15 pm
Followed the guide on the Wiki to a T. Compile test game, can't find "ffi.h"
Code: [Select]
g++ -std=c++11 -I/mingw64/lib/libffi-3.2.1/include -I../Additional/i686-w64-mingw32/include -Wall -s -O3 -fno-rtti -fno-exceptions -DENIGMA_PLATFORM_WINDOWS -DGLEW_STATIC -DPATH_EXT_SET -IPlatforms/Win32/Info -IGraphics_Systems/OpenGL1/Info -IAudio_Systems/DirectSound/Info -ICollision_Systems/Precise/Info -IWidget_Systems/Win32/Info -INetworking_Systems/None/Info -IUniversal_System/Info -I. -IC:/Users/Kegan/AppData/Local/ENIGMA/ -I../../shared/lodepng -I../../shared  -MMD -MP -c -o C:/Users/Kegan/AppData/Local/ENIGMA/.eobjs/Windows/Windows/Mingw_GCC_G++/Run/SHELLmain.o SHELLmain.cpp
g++ -std=c++11 -I/mingw64/lib/libffi-3.2.1/include -I../Additional/i686-w64-mingw32/include -Wall -s -O3 -fno-rtti -fno-exceptions -DENIGMA_PLATFORM_WINDOWS -DGLEW_STATIC -DPATH_EXT_SET -IPlatforms/Win32/Info -IGraphics_Systems/OpenGL1/Info -IAudio_Systems/DirectSound/Info -ICollision_Systems/Precise/Info -IWidget_Systems/Win32/Info -INetworking_Systems/None/Info -IUniversal_System/Info -I. -IC:/Users/Kegan/AppData/Local/ENIGMA/ -I../../shared/lodepng -I../../shared  -MMD -MP -c -o C:/Users/Kegan/AppData/Local/ENIGMA/.eobjs/Windows/Windows/Mingw_GCC_G++/Run/Platforms/Win32/WINDOWSexternals.o Platforms/Win32/WINDOWSexternals.cpp
Platforms/Win32/WINDOWSexternals.cpp:36:10: fatal error: ffi.h: No such file or directory
 #include <ffi.h>

if i do "locate ffi.h" it exists in /mingw32/lib/libffi-3.2.1/include/. probably not the right place to be, but I'm not sure where the right place even is. any help would be great. Thanks! This tool is amazing otherwise, I started using it back around 2014 when the Windows binaries were available and it was really great.
Title: Re: Win32 Enigma missing ffi.h
Post by: hpg678 on October 17, 2018, 04:10:32 am
hi! did you try starting ENIGMA from Mingw32 and not Msys32?
Title: Re: Win32 Enigma missing ffi.h
Post by: keganonthedunes on October 17, 2018, 08:16:21 am
I did indeed, but that did not work. What DID work was manually copying ffi.h and ffitarget.h from /mingw32/lib/libffi-3.2.1/include/ to C:\Users\<me>\AppData\Local\ENIGMA. I don't know why that worked or why those files weren't sent to that particular folder in the first place but it works now.
Title: Re: Win32 Enigma missing ffi.h
Post by: Goombert on October 17, 2018, 10:13:38 am
Hey thanks for letting us know about this, I need the MSYS2 setup to work flawlessly for the fast-approaching RadialGM beta. Please let me know if you find anything else out in regards to this. It could have been any number of things including a recent change/update to the MSYS2 packages or perhaps you skipped the package containing that header during setup. If you do find anymore info, I'll keep track and make an announcement if I think it will be helpful to people. That said, I'm glad you did get it working!
Title: Re: Win32 Enigma missing ffi.h
Post by: hpg678 on October 17, 2018, 11:42:29 am
I'm happy you got it figured out as well.  (Y) (Y)  As for me I still cant get my Win32 version working but that's ok........I've got it working on my Windows 8.1 64bit laptop.



Title: Re: Win32 Enigma missing ffi.h
Post by: keganonthedunes on October 17, 2018, 12:27:43 pm
Hey thanks for letting us know about this, I need the MSYS2 setup to work flawlessly for the fast-approaching RadialGM beta. Please let me know if you find anything else out in regards to this. It could have been any number of things including a recent change/update to the MSYS2 packages or perhaps you skipped the package containing that header during setup. If you do find anymore info, I'll keep track and make an announcement if I think it will be helpful to people. That said, I'm glad you did get it working!
Everything seems to be working great, although sometimes I get an error pop up when I go to edit sprites, but the error doesn't actually crash the program or break anything. Next time it'll happens I'll screenshot it with the log. Things are working good though. I'm pretty positive I didn't skip a package so there must have been an update to a package in MSYS2 that broke something.
Title: Re: Win32 Enigma missing ffi.h
Post by: keganonthedunes on October 17, 2018, 06:31:38 pm
Here it is, unhandled exception when editing sprites in Paint
Code: [Select]
LateralGM Version: 1.8.40

Operating System: Windows 10
Version: 10.0
Architecture: x86

Java Name: Java HotSpot(TM) Client VM
Java Vendor: Oracle Corporation
Version: 1.8.0_191

Available processors (cores): 4
Free memory (bytes): 29953472
Maximum memory (bytes): 259522560
Total memory available to JVM (bytes): 104501248

File system root: C:\
Total space (bytes): 159463239680
Free space (bytes): 41690292224
Usable space (bytes): 41690292224

File system root: E:\
Total space (bytes): 480983040
Free space (bytes): 0
Usable space (bytes): 0

Stack trace:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(Unknown Source)
at java.util.HashMap$ValueIterator.next(Unknown Source)
at org.lateralgm.subframes.SpriteFrame.cleanup(SpriteFrame.java:1814)
at org.lateralgm.subframes.SpriteFrame.dispose(SpriteFrame.java:1807)
at javax.swing.JInternalFrame.doDefaultCloseAction(Unknown Source)
at org.lateralgm.components.mdi.RevertableMDIFrame.close(RevertableMDIFrame.java:44)
at org.lateralgm.subframes.ResourceFrame.doDefaultSaveAction(ResourceFrame.java:238)
at org.lateralgm.subframes.ResourceFrame.actionPerformed(ResourceFrame.java:245)
at org.lateralgm.subframes.SpriteFrame.actionPerformed(SpriteFrame.java:1536)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Title: Re: Win32 Enigma missing ffi.h
Post by: Goombert on October 18, 2018, 06:17:00 am
I see, I am not surprised, this has already been reported by Hugar actually:
https://github.com/IsmAvatar/LateralGM/issues/377

I know what the issue is already actually. The sprite subframe list is being iterated on close and modifying the list while iterating it. That's what a concurrent modification is. You have to do special things, even in C++, when mutating any kind of data structure you happen to be iterating over at the same time. That said, I tried fixing it when hugar reported it, but Java sucks so badly none of the solutions for iterating the list and adding/removing from it at the same time that I sent to him worked. So I am sort of convinced it may actually be a Java bug, but can't say for certain. I am also on Windows 10 and have not encountered the issue myself.

I apologize that I do not have more time to invest in fixing this right now as I am trying to prioritize RadialGM which will be much better and solve a lot of our issues. I very strongly dislike Java after all of the experience developing for it that I have obtained. It's just a complete mess to write working applications for the Java platform when there's multiple JDKs with multiple Java API implementations just on a single platform. That and the fact that we can't control the dependencies (like Java Swing version) our users end up trying ENIGMA with, makes the situation all the more serious.

For these reasons, I believe that LateralGM is going to stop working soon to the point we won't be able to maintain it so I am focusing all my energy on RadialGM in order to save the project. The setup is going to be a lot easier as well, no installation of Java, just drag and drop RadialGM exe into your enigma-dev folder. Just yesterday I got compiling games working.
(https://user-images.githubusercontent.com/3212801/47119921-d3e90500-d23a-11e8-8ee8-3b444505fc58.png)

Anyway, sorry to divert from your issue, I just want to be clear why I can't offer much more help on any LGM issues right now. I hope you understand and that maybe I helped a little bit, and please stay tuned for more information about the upcoming IDE! :)
Title: Re: Win32 Enigma missing ffi.h
Post by: hpg678 on October 18, 2018, 08:37:54 am
I concur with Goombert in his statements about Java. Which is why I have suspended for now, all Windows 32bit development for now, until RGM beta is released.
the only other advice I can give is to try updating your Java, as well as install the latest version of JRE. 
Title: Re: Win32 Enigma missing ffi.h
Post by: keganonthedunes on October 18, 2018, 03:24:15 pm
I'm not worried too much about it, like I said it doesn't actually break anything or crash the program, it just creates an ugly popup that can go away easily lol. Can't wait for RadialGM
Title: Re: Win32 Enigma missing ffi.h
Post by: hpg678 on October 18, 2018, 05:02:37 pm
Beta should be done by Xmas........i hope........though its been hinted to be more like January 2019.........However the guys been doing tremendous work lately, so who knows, it may be early. (Fingers crossed :) :) )


Check out the Discord channel for more information and check up on the process.


 (Y) (Y)
Title: Re: Win32 Enigma missing ffi.h
Post by: Darkstar2 on November 02, 2018, 01:12:00 pm
I am anxiously awaiting for RGM this will breath new life to the project, once it's done perhaps the enigma team could then teach some lessons to YYG, who knows maybe they can license the IDE for GMS 3.0  :D

I dunno how high they were when they concocted the IDE for GMS2, ok people begged for a new IDE but I don't think that this is what they had in mind.   As far as LGM the only downsides are the bloody JAVA issues, but something funny happened the other day, I was working on app project in LGM for several hours straight and it did not crash at all, mind you I have since transitioned to Win10,  Development for GMS has slowed down to a crawl now, it seems they are focusing more now on exports than worthy features.
Title: Re: Win32 Enigma missing ffi.h
Post by: hpg678 on November 06, 2018, 04:07:34 am
In my opinion, as far as exports go, unless Game development software has a competent method to do port to LINUX, it is going to hurt itself. Basically it has to do with users  wanting more games for LINUX or wanting a port for LINUX.  Of course, there is Wine and Proton, but it is not the same as running the game natively.