Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Installing Allegro On Vista

This thread is locked; no one can reply to it. rss feed Print
Installing Allegro On Vista
Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I encountered a few hiccups while installing Allegro on Windows Vista.

Everything compiled fine for both dynamically and statically linked versions of Allegro for the debug , optimised , and profiling versions of the Allegro Library.

I did have a few problems with the installation though , nothing too serious.

When I was installing Allegro , make install failed to copy the allegro libraries to the Windows\System32 folder while installing on Vista for the dynamically linked debug , optimized , and profiling versions of Allegro. Apparently in Vista they've made some sort of provision about copying things to the Windows\System32 folder so it denied access to copy into those folders.
Here's an annotated version of the cmd console output while building Allegro :

Allegro compile\install log on Windows Vista

1c:\mingw\allegro>fix.bat mingw
2Configuring Allegro for Windows/MinGW...
3Done!
4c:\mingw\allegro>mingw32-make DEBUGMODE=1
5Compiling Allegro for MinGW32, debugging. Please wait...
6 
7...compiled ok
8 
9The debugging MinGW32 library has been compiled.
10Run "make install" with the options you passed to "make"
11in order to complete the installation.
12 
13c:\mingw\allegro>mingw32-make install DEBUGMODE=1
14misc\mdhelper.bat C:\mingw\lib
15misc\mdhelper.bat C:\mingw\include
16misc\mdhelper.bat C:\mingw\include\allegro
17misc\mdhelper.bat C:\mingw\include\allegro\platform
18misc\mdhelper.bat C:\mingw\include\allegro\internal
19misc\mdhelper.bat C:\mingw\include\allegro\inline
20copy lib\mingw32\liballd.a C:\mingw\lib
21 1 file(s) copied.
22copy lib\mingw32\alld42.dll C:\Windows\system32
23Access is denied.
24 0 file(s) copied.
25mingw32-make: *** [C:/Windows/system32/alld42.dll] Error 1
26 
27c:\mingw\allegro>mingw32-make
28Compiling Allegro for MinGW32, optimised. Please wait...
29 
30... compiled ok
31 
32The optimised MinGW32 library has been compiled.
33Run "make install" with the options you passed to "make"
34in order to complete the installation.
35 
36c:\mingw\allegro>mingw32-make install
37misc\mdhelper.bat C:\mingw\lib
38misc\mdhelper.bat C:\mingw\include
39misc\mdhelper.bat C:\mingw\include\allegro
40misc\mdhelper.bat C:\mingw\include\allegro\platform
41misc\mdhelper.bat C:\mingw\include\allegro\internal
42misc\mdhelper.bat C:\mingw\include\allegro\inline
43copy lib\mingw32\liballeg.a C:\mingw\lib
44 1 file(s) copied.
45copy lib\mingw32\alleg42.dll C:\Windows\system32
46Access is denied.
47 0 file(s) copied.
48mingw32-make: *** [C:/Windows/system32/alleg42.dll] Error 1
49 
50c:\mingw\allegro>mingw32-make PROFILEMODE=1
51Compiling Allegro for MinGW32, profiling. Please wait...
52 
53... compiled ok
54 
55The profiling MinGW32 library has been compiled.
56Run "make install" with the options you passed to "make"
57in order to complete the installation.
58 
59c:\mingw\allegro>mingw32-make install PROFILEMODE=1
60misc\mdhelper.bat C:\mingw\lib
61misc\mdhelper.bat C:\mingw\include
62misc\mdhelper.bat C:\mingw\include\allegro
63misc\mdhelper.bat C:\mingw\include\allegro\platform
64misc\mdhelper.bat C:\mingw\include\allegro\internal
65misc\mdhelper.bat C:\mingw\include\allegro\inline
66copy lib\mingw32\liballp.a C:\mingw\lib
67 1 file(s) copied.
68copy lib\mingw32\allp42.dll C:\Windows\system32
69Access is denied.
70 0 file(s) copied.
71mingw32-make: *** [C:/Windows/system32/allp42.dll] Error 1
72 
73c:\mingw\allegro>notepad .\allegro_dynamic_compile_log.txt
74 
75c:\mingw\allegro>

--------------------------------------------
I thought that maybe mingw32-make wouldn't have permission by itself , so I tried again by entering the copy command myself , but it still failed.

c:\mingw\allegro\lib\mingw32>copy .*.dll c:\Windows\System32
.\alld42.dll
Access is denied.
.\alleg42.dll
Access is denied.
.\allp42.dll
Access is denied.
        0 file(s) copied.

c:\mingw\allegro\lib\mingw32>

----------------------------------------------
I had to use explorer to copy the three dll's over to the Windows\System32 folder.
Even then , I had to give administrator permission before it would copy them and then I had to say it was okay to continue again. Vista is a little paranoid , I think.

[Separate side topic]
While I was getting MinGW ready to compile on Vista , I couldn't get things to compile right away. I decompressed all the .tar.gz files into C:\mingw , set my path using "path c:\mingw\bin;%PATH%" and tried to compile some simple c and cpp files. It kept telling me that there was a mingw installation error and it couldn't find cc1.exe or cc1plus.exe. I had to alter the path again so it could find those files and then it compiled plain c and cpp source files okay after that.
So I used this to fix the PATH variable instead :
"path c:\mingw\libexec\gcc\mingw32\3.4.5;c:\mingw\bin;%PATH%"
(That's a line I use in a batch file that runs when I open a specialized cmd interpreter)
(cc1.exe and cc1plus.exe were in the 3.4.5 folder)
Just a note in case anyone else encounters that at some point.

Milan Mimica
Member #3,877
September 2003
avatar

Quote:

Even then , I had to give administrator permission before it would copy them and then I had to say it was okay to continue again. Vista is a little paranoid , I think.

It's what all other systems do for ages.

Isn't there something like "su" on unix, to run a program from a cdm line as another user? "runas"?

Matthew Leverton
Supreme Loser
January 1999
avatar

I would disable UAC if I were you. It will just annoy you to no end.

Quote:

Just a note in case anyone else encounters that at some point.

It's well known that MinGW is broken under Vista. Adjusting the path fixes most things, but you still cannot do things such as compile files on secondary drives.

Evert
Member #794
November 2000
avatar

I'm curious to know what changed in the way Vista worked to how XP worked that would cause such seemingly random breakage in MinGW while other programs keep working.

That aside though,

Quote:

Adjusting the path fixes most things, but you still cannot do things such as compile files on secondary drives.

I did a quick google, and according to this forum post linked from this wiki article it does work, at least from Code::Blocks. Is their setup different or is this one of those cases where things randomly work for some people but not for others?

Elias
Member #358
May 2000

Trent also has been using mingw for developing Allegro 5 for months, so it can't be totally broken.

--
"Either help out or stop whining" - Evert

BAF
Member #2,981
December 2002
avatar

Quote:

I'm curious to know what changed in the way Vista worked to how XP worked that would cause such seemingly random breakage in MinGW while other programs keep working.

IIRC, they were relying on something with undefined outcome. MS fixed a bug or something, and it broke MinGW.

Matthew Leverton
Supreme Loser
January 1999
avatar

I didn't say it was totally broken. The path system is broken due to a horrible design by the MinGW people.

http://aarongiles.com/?p=199:

Quote:

The first problem I encountered was that the built-in paths within the mingw environment were no longer working. This is an actual mingw bug that has been tracked down to a change in the way the Microsoft standard C libraries handle invalid parameters. Older versions of the DLL would not check invalid parameters and go down potentially untested code paths with them. The versions in Vista do stricter parameter checking. Some calls made by the mingw tools pass invalid parameters to one of the functions and fail, causing the internal paths to quit working.

It's possible to work around it by adding extra files to the paths, by copying MinGW libraries all over the place, and other annoyances. Some of these things you may get for free from an IDE (or they might even be updated to work around the MinGW bug), so you might not notice all the problems.

ImLeftFooted
Member #3,935
October 2003
avatar

The title's desires said:

Installing Allegro On Vista ..

It can't be done! There is no way!
*queue heroic music*

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Milan said:

Isn't there something like "su" on unix, to run a program from a cdm line as another user? "runas"?

The cmd line interpreter I was installing Allegro from was started from an Administrator account , apparently it doesn't have the same permissions as explorer.

Matthew said:

I would disable UAC if I were you. It will just annoy you to no end.

What does UAC stand for? Is there a control panel setting for it somewhere?
Vista asks whether I want to give permission for more than a few different kind of tasks.

Evert's link to a Code::Blocks wiki article said:

The problem here actually is, that MinGW is unable to find its helper executeables, in this case cc1plus.exe. To fix this go to your "Settings" -> "Compiler and Debugger" -> "Toolchain executeables" -> "Additional paths" and add there the Directory "C:\MinGW\libexec\gcc\mingw32\MinGW-Version" where MinGW-Version is the Version of MinGW you are using

When I got Code::Blocks installed and tried to compile a simple c or c++ source file this is the same error and same solution that I used to fix it.

Matthew Leverton
Supreme Loser
January 1999
avatar

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Ron Novy
Member #6,982
March 2006
avatar

UAC? :-X I always thought that was the Union Aerospace Corporation. ;D

----
Oh... Bieber! I thought everyone was chanting Beaver... Now it doesn't make any sense at all. :-/

Arthur Kalliokoski
Second in Command
February 2005
avatar

Quote:

UAC? :-X I always thought that was the Union Aerospace Corporation.

M$ bought them out and rebadged it trying to hide the fact that they didn't develop the gateways to hell themselves.

They all watch too much MSNBC... they get ideas.

Go to: