|
first time installing allegro |
Tyler Wrobel
Member #16,594
November 2016
|
I am trying to install allegro for the first time. I am following this guide on wiki but have ran into a few problems. I am hoping to get some advice from some experts or experienced individuals. I am using this link https://wiki.allegro.cc/index.php?title=Building_with_msys2#Install_dependencies. My first problem it would seem is that although MSYS seems to be building a make file it appears to be skipping quite a few of the libraries as it says it cannot find them. But, I am not getting and directx or dinput errors. I did install all the dependencies with pacman. My second problem would be that either I am doing something wrong or this wiki need to be updated. When I run the cmake portion in part 1 of the build process I realized I could not build with the directory set to allegro in the last part of the instructions, I had to change this part to say allegro5 so it would match with the source files. Was this the right thing to do? And lastly, when I run the 'make && make install' instruction I was getting errors say that no target was specified. So, I typed dir into the MSYS terminal and tried the 'make cmake_install && make install' options and it told me that no cmake files existed but when I typed dir into the MSYS teminal it clearly show a cmake in that folder. What is the proper way to use the 'make && make install' instruction in this case and or resolve the location of this directory? I am using the mingw64 version of MSYS with pacman recommended in the wiki guide. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
After you install the dependencies, you change to the 'allegro5' source directory. From there you create a build directory and change to it and then you run cmake with the desired options, then you run make && make install. Post a complete log of the commands you are entering and the output you receive and we will be able to help you more effectively. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
Here it is headgearxthree@DESKTOP-PFLMU84 MINGW64 ~ headgearxthree@DESKTOP-PFLMU84 MINGW64 ~ headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5 headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5 headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5 headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5 headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5/build_allegro_monolith Usually I do this from outside the allegro5 folder. But, you definetly said build 1 layer inside the allegro5 folder do I guess this is right but now I am getting this wierd error. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
The error is in your cmake command. You should be specifying the allegro5 directory as the directory to look for for cmake files. In your current command, you specify "../allegro5", which as the error message says, does not exist. This is an error in the wiki page. I have since corrected it. From your 'build' directory, you specify the parent directory, by using two dots (..). This will then tell cmake to look one directory up for the cmake files, which is the allegro5 folder. That should fix your initial problem. If you have more, please post the full log again on your next try. Please post the whole log anyway, as you said you had problems with cmake detecting the dependencies for the addon libraries. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
Isn't that what I did. I call ../allegro5 from the build_allegro_monolith which is nested inside the allegro5 folder. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Your setup /allegro5 /build_allegro_monolith When in the build_allegro_monolith directory, and you refer to ../allegro5 you are referring to a directory that doesn't exist. The parent directory is allegro5 and you refer to it by using two dots, and only two dots. cd build cmake -G "MSYS Makefiles" [OPTIONS] ..
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
Just so you know I am using Windows. So here it is, same problem. Am I supposed to execute some kind of batch file everytime in run msys or after I restart like some 64 bit compilers I use? MSYS64 was working fine after I initially installed it with the exception of the build phase, then sometime and I restarted my computer. Now. it is as if it is as if cmake itself does not have access to the rest of the machine. Here it is. headgearxthree@DESKTOP-PFLMU84 MINGW64 ~ headgearxthree@DESKTOP-PFLMU84 MINGW64 ~ headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5 headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5 headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5/build_allegro_monolith headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5/build_allegro_monolith Why would it does this? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Listen to the error. Pay attention to my directions. Two dots by themselves specify the parent directory. I know you're on Windows you're using msys. As long as your path is set up correctly you don't need to run any batch scripts. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
Ok, so this is what I got. headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5/build_allegro_monolith headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5/build_allegro_monolith headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5/build_allegro_monolith Now I am getting the no makefile found error and alot of things were not found. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Your first problem is that cmake thinks you want Visual Studio project files. This should be overridden by "-G "MSYS Makefiles". Try entering all the cmake commands on one line without the separating backslashes. cmake -G "MSYS Makefiles" -DWANT_MONOLITH=On -DCMAKE_INSTALL_PREFIX=/mingw64/x64_64-w64-mingw32 .. EDIT My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
Ok, I will try that. So here is what I got. I feel like I myself can probably have played around a little bit before posting this? But, here is what is happening... I am pretty sure I was getting direct_x before when it was trying to compile for visual studios... headgearxthree@DESKTOP-PFLMU84 MINGW64 ~ headgearxthree@DESKTOP-PFLMU84 MINGW64 ~ headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5 headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5/build_allegro_monolith /* After I got this cmake error i went into the dir in windows file explorer and deleted that .txt file and the CMakeFiles directory and did this */ headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5/build_allegro_monolith -- Configuring incomplete, errors occurred! headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5/build_allegro_monolith I am going to try with a clean directory. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
The wiki covers this : Quote: If you receive errors relating to CMake such as Could NOT find DINPUT (missing: DINPUT_INCLUDE_DIR) it's likely CMake isn't resolving the directx headers and libraries. These are included in msys. Try passing an altered PATH variable by replacing cmake with PATH=/mingw64/x86_64-w64-mingw32/bin:$PATH cmake in the above install line.
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
Ok, so I definetly messed up bad. I went along and removed the \ slashes and it didn't resolve my direct_x issue. Just for the sake of it I went back to executing it the way I was earlier because I though that didn't add up. And needless to say even when I compile it now it still can't find direct x. I think I deleted something. I am sure it was before because at least it would complete are return with few not found errors. I am going to reinstall all dependencies now. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Tyler Wrobel said: I went along and removed the \ slashes and it didn't resolve my direct_x issue. It wouldn't. The backslashes have to do with continuing a line in MSYS. Quote: And needless to say even when I compile it now it still can't find direct x. That's why I suggested you follow the wiki and alter your PATH variable before calling cmake. Okay, here's a basic rundown : 1. Install dependencies via pacman (including git and cmake). 2. Clone allegro 3. cd allegro5 4. mkdir build 5. cd build 6. PATH=/mingw64/x86_64-w64-mingw32/bin:$PATH cmake -G "MSYS Makefiles" -DWANT_MONOLITH=On -DCMAKE_INSTALL_PREFIX=/mingw64/x64_64-w64-mingw32 .. 7. make 8. make install Step #6 is the most important. It's altering your path to detect the installed DirectX, telling cmake to create MSYS Makefiles, create the monolith, and install to /mingw64/x64_64-w64-mingw32. Ensure all those paths are correct for your compiler. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
Got the above. But, in the Run Msys section at the beginning of the artical it says to run the " mingwXX_shell.bat" file. However I only have executables in that directory. Is a bat file supposed to be there? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
In the msys/msys64 directory there should be two batch files. One named mingw32_shell.bat and one named mingw64_shell.bat. I assume you want mingw64_shell.bat since you're building for x64. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
I don't have those. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Then you installed msys wrong. Search around in the local directories and see if you installed it somewhere else. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
I guess I got a crap install then. I ran the autorebase.bat that is in that directory though. I will probably have to reinstall msys. Do you think you could open either one of those bat files in notepad and post its contents here? I started executing the autorebase.bat file that was in the msys/ directory becuase I thought maybe my directory was built slightly differently but then I opened it just now to find it contents @echo off set PATH=%~dp0\usr\bin;%PATH% this looks like it could be playing a part in msys no longer resolving directx also. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Don't just run random files (batch or not). :/ I'm going to go through the install process with you and see if I have any problems. I'm downloading MSYS2 now. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
Ok EDIT: So I was able to make some progress with that edit you showed me. I still got some errors along the way but I am going to try to compile something with GCC and Allegro and see what happens. I got this. I am not sure what the ARGV_C are, but I was thinking that could either be bad or negligible. headgearxthree@DESKTOP-PFLMU84 MINGW64 ~/allegro5/build **After this I just ran make and then make install and didnt note any errors just alot of linking and compiling. Also I did get a really wierd serious of errors when I was running pacman, I accidentally exited out of that window. And since lost what it said, so thats why I am going to run a test trial before I attemp to figure out what the were. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I've gotten everything installed and updated and allegro cloned. I'm ready for the cmake step, but I'm going to go home and have dinner first. I'll be back in a couple hours (like two). C'ya then. No problems so far. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
Ok EDIT: Here is the contents of the alplatf.h.cmake file -- /* alplatf.h is generated from alplatf.h.cmake */ #cmakedefine ALLEGRO_CFG_D3D #cmakedefine ALLEGRO_CFG_ANDROID_LEGACY /*---------------------------------------------------------------------------*/ /* Define to 1 if you have the corresponding header file. */ /* Define to 1 if the corresponding functions are available. */ #cmakedefine ALLEGRO_HAVE_FSEEKO /* Define to 1 if procfs reveals argc and argv */ /*---------------------------------------------------------------------------*/ /* Define if target machine is little endian. */ /* Define if target machine is big endian. */ /* Define if target platform is Darwin. */ /*---------------------------------------------------------------------------*/ /* Define if you need support for X-Windows. */ /* Define if XCursor ARGB extension is available. */ /* Define if XF86VidMode extension is supported. */ /* Define if Xinerama extension is supported. */ /* Define if XRandR extension is supported. */ /* Define if XIM extension is supported. */ /* Define if XInput 2.2 X11 extension is supported. */ /*---------------------------------------------------------------------------*/ /* Define if target platform is linux. */ /* Define if we are building with SDL backend. */ /*---------------------------------------------------------------------------*/ I was reading through it and I happened to notice that line 70 is references something about ARGC_V and I was getting a failed for that when I ran cmake and built it, I think this file may have been the culpret. As if for some reason it could not determine that I was building for windows or something it looks like it failed. I am going to make a copy of this then try to build it myself by using logic and carefuly examing the if statements to build a header file. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Alright, so I have everything done up to step #6 above (cmake). You'll want to run this from the mingw64 shell. In the latest MSYS2, the default install directory is c:\msys64. In this folder you'll find msys.exe, mingw64.exe and mingw32.exe. You'll want to run mingw64.exe to set up the mingw64 build environment before running cmake. NOTE : There is an error in the wiki. I fixed it. It should say in the cmake command line parameters to set the CMAKE_INSTALL_PREFIX to the following directory : After running cmake, make, and make install, you should have something that looks like the following log file : EDIT FOR YOUR EDIT My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Tyler Wrobel
Member #16,594
November 2016
|
Okay, I guess we will see where I stand compared to what you have. |
|
|