comp.lang.ada
 help / color / mirror / Atom feed
* MinGW issues with gnat
@ 2011-05-29 21:16 Marco
  2011-05-29 21:40 ` Yannick Duchêne (Hibou57)
  2011-05-30  3:59 ` tornenvi
  0 siblings, 2 replies; 9+ messages in thread
From: Marco @ 2011-05-29 21:16 UTC (permalink / raw)


I downloaded MinGW yesterday. The gcc compiler/linker works fine for C code but when I tried to run gnat (or any of the gnat utilities) I got this:

procedure entry point GetProcessID could not be located in KERNAL32.dll

Any ideas?

Running on an old Window 2000 box.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MinGW issues with gnat
  2011-05-29 21:16 MinGW issues with gnat Marco
@ 2011-05-29 21:40 ` Yannick Duchêne (Hibou57)
  2011-05-29 21:58   ` Ludovic Brenta
  2011-05-30  3:59 ` tornenvi
  1 sibling, 1 reply; 9+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-05-29 21:40 UTC (permalink / raw)


Le Sun, 29 May 2011 23:16:25 +0200, Marco <prenom_nomus@yahoo.com> a écrit:

> I downloaded MinGW yesterday. The gcc compiler/linker works fine for C  
> code but when I tried to run gnat (or any of the gnat utilities) I got  
> this:
>
> procedure entry point GetProcessID could not be located in KERNAL32.dll
>
> Any ideas?
>
> Running on an old Window 2000 box.
All GNAT versions later than GNAT 3.15p, were compatible with Windows NT  
(or like) kernels. Prior to Windows XP, Windows NT and other Windows  
version were different things. I guess that may be source of the failure.

You have to either switch to Windows XP or Windows NT. As this may not me  
possible (depending on the requirements), you may use GNAT 3.15p instead.
You can get one here:
http://www.les-ziboux.rasama.org/compilateur-ada-gnat.html
(the first link is a download for Windows, the second is a download for  
RedHat).

Note: I use to “play” with GNAT under Windows 95. Was OK with GNAT 3.15p,  
but cannot remember if I ever used a later version in the same  
circumstance. As far as I can remember, GNAT 3.15p provided Ada 95 (no Ada  
2005, obviously). You will also have to forget about the debugger which  
was not working (I am noticing this for you, as I don't use debuggers  
myself).

-- 
“Syntactic sugar causes cancer of the semi-colons.”  [Epigrams on  
Programming — Alan J. — P. Yale University]
“Structured Programming supports the law of the excluded muddle.” [Idem]
“c++; /* this makes c bigger but returns the old value */” [Anonymous]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MinGW issues with gnat
  2011-05-29 21:40 ` Yannick Duchêne (Hibou57)
@ 2011-05-29 21:58   ` Ludovic Brenta
  2011-05-29 22:32     ` Yannick Duchêne (Hibou57)
  2011-05-30  7:30     ` Dmitry A. Kazakov
  0 siblings, 2 replies; 9+ messages in thread
From: Ludovic Brenta @ 2011-05-29 21:58 UTC (permalink / raw)


Yannick Duchêne writes on comp.lang.ada:
> Marco <prenom_nomus@yahoo.com> a écrit:
>> I downloaded MinGW yesterday. The gcc compiler/linker works fine for
>> C code but when I tried to run gnat (or any of the gnat utilities) I
>> got  this:
>>
>> procedure entry point GetProcessID could not be located in KERNAL32.dll
>>
>> Any ideas?
>>
>> Running on an old Window 2000 box.
>
> All GNAT versions later than GNAT 3.15p, were compatible with Windows
> NT (or like) kernels. Prior to Windows XP, Windows NT and other
> Windows version were different things. I guess that may be source of
> the failure.

Even though it's been a long time since I had any interest in Windows, I
do remember that Windows 2000 is a version of Windows NT (specifically,
it is Windows NT 5.0; XP is 6.0; Vista is 6.1 and 7 is 7).

The problem is simply that GetProcessID was introduced only in Windows
XP with SP1 and Windows Server 2003 [1].

[1] http://msdn.microsoft.com/en-us/library/ms683215%28v=vs.85%29.aspx

Three solutions then:
- upgrade to XP SP1 or later
- downgrade the compiler
- upgrade to GNU/Linux or a BSD :)

-- 
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MinGW issues with gnat
  2011-05-29 21:58   ` Ludovic Brenta
@ 2011-05-29 22:32     ` Yannick Duchêne (Hibou57)
  2011-05-30  7:30     ` Dmitry A. Kazakov
  1 sibling, 0 replies; 9+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-05-29 22:32 UTC (permalink / raw)


Le Sun, 29 May 2011 23:58:07 +0200, Ludovic Brenta  
<ludovic@ludovic-brenta.org> a écrit:
> Even though it's been a long time since I had any interest in Windows, I
> do remember that Windows 2000 is a version of Windows NT
Yes, I confirm you are right Ludovic (I remembered later, but did not  
bother to correct this sentence, as anyway, later versions of GNAT were  
not made to work with Windows 2000, no more than with Windows 95/98).

Just that I believe to feel in his case, it gonna be easier to downgrade  
the compiler than to upgrade the environment, as there is little chance he  
is targeting such an OS as Windows 2000 without good reasons for that.

Please Marco, can you tell us more on the reason why you are targeting  
Windows 2000, so as we can better figure the story ? (I may guess you are  
to work on some ancient Ada source, but this is just a guess, would be  
better to be really fixed).

-- 
“Syntactic sugar causes cancer of the semi-colons.”  [Epigrams on  
Programming — Alan J. — P. Yale University]
“Structured Programming supports the law of the excluded muddle.” [Idem]
“c++; /* this makes c bigger but returns the old value */” [Anonymous]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MinGW issues with gnat
  2011-05-29 21:16 MinGW issues with gnat Marco
  2011-05-29 21:40 ` Yannick Duchêne (Hibou57)
@ 2011-05-30  3:59 ` tornenvi
  2011-05-30  5:30   ` Yannick Duchêne (Hibou57)
  1 sibling, 1 reply; 9+ messages in thread
From: tornenvi @ 2011-05-30  3:59 UTC (permalink / raw)


On 30/05/2011 6:46 AM, Marco wrote:
> I downloaded MinGW yesterday. The gcc compiler/linker works fine for C code but when I tried to run gnat (or any of the gnat utilities) I got this:
>
> procedure entry point GetProcessID could not be located in KERNAL32.dll
>
> Any ideas?
>
> Running on an old Window 2000 box.

Hello All,

You can run MINGW gcc-4.4.0.  I am currently using it to run test software on an older
hardware test setup. I compile on an XP machine and transfer the files to the 2000 machine.

I have tried to use MINGW gcc-4.5.0-1 and found the same problem.
I believe it depends on the switches used when the compiler is built.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MinGW issues with gnat
  2011-05-30  3:59 ` tornenvi
@ 2011-05-30  5:30   ` Yannick Duchêne (Hibou57)
  2011-05-30  8:20     ` tornenvi
  0 siblings, 1 reply; 9+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-05-30  5:30 UTC (permalink / raw)


Le Mon, 30 May 2011 05:59:28 +0200, tornenvi <tornenvi@gmail.com> a écrit:
> compile on an XP machine and transfer the files to the 2000 machine.
>
> I have tried to use MINGW gcc-4.5.0-1 and found the same problem.
> I believe it depends on the switches used when the compiler is built.
No, there is no way, you may play with whatever switch you want, this will  
be systematically the same. The reason was already explained by Ludovic,  
and here is a reference which base this:
http://msdn.microsoft.com/en-us/library/ms683215(v=vs.85).aspx

It says:

    Minimum supported client	Windows Vista, Windows XP with SP1
    Minimum supported server	Windows Server 2003

Note even on Windows XP, this may not work, if you've not installed at  
least Service Pack 1.

-- 
“Syntactic sugar causes cancer of the semi-colons.”  [Epigrams on  
Programming — Alan J. — P. Yale University]
“Structured Programming supports the law of the excluded muddle.” [Idem]
“c++; /* this makes c bigger but returns the old value */” [Anonymous]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MinGW issues with gnat
  2011-05-29 21:58   ` Ludovic Brenta
  2011-05-29 22:32     ` Yannick Duchêne (Hibou57)
@ 2011-05-30  7:30     ` Dmitry A. Kazakov
  2011-05-30 10:42       ` Frank J. Lhota
  1 sibling, 1 reply; 9+ messages in thread
From: Dmitry A. Kazakov @ 2011-05-30  7:30 UTC (permalink / raw)


On Sun, 29 May 2011 23:58:07 +0200, Ludovic Brenta wrote:

> Yannick Duch�ne writes on comp.lang.ada:
>> Marco <prenom_nomus@yahoo.com> a �crit:
>>> I downloaded MinGW yesterday. The gcc compiler/linker works fine for
>>> C code but when I tried to run gnat (or any of the gnat utilities) I
>>> got  this:
>>>
>>> procedure entry point GetProcessID could not be located in KERNAL32.dll
>>>
>>> Any ideas?
>>>
>>> Running on an old Window 2000 box.
>>
>> All GNAT versions later than GNAT 3.15p, were compatible with Windows
>> NT (or like) kernels. Prior to Windows XP, Windows NT and other
>> Windows version were different things. I guess that may be source of
>> the failure.
> 
> Even though it's been a long time since I had any interest in Windows, I
> do remember that Windows 2000 is a version of Windows NT (specifically,
> it is Windows NT 5.0; XP is 6.0; Vista is 6.1 and 7 is 7).
> 
> The problem is simply that GetProcessID was introduced only in Windows
> XP with SP1 and Windows Server 2003 [1].
> 
> [1] http://msdn.microsoft.com/en-us/library/ms683215%28v=vs.85%29.aspx
> 
> Three solutions then:
> - upgrade to XP SP1 or later
> - downgrade the compiler
> - upgrade to GNU/Linux or a BSD :)

+ Remove references to GetProcessID. In many cases it can be removed or
worked around by this or other way. An overview can be found here:

http://www.ms-news.net/f2725/getprocessid-and-how-to-do-this-for-windows-98-2000-and-xp-4079045.html

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MinGW issues with gnat
  2011-05-30  5:30   ` Yannick Duchêne (Hibou57)
@ 2011-05-30  8:20     ` tornenvi
  0 siblings, 0 replies; 9+ messages in thread
From: tornenvi @ 2011-05-30  8:20 UTC (permalink / raw)


On 30/05/2011 3:00 PM, Yannick Duchêne (Hibou57) wrote:
> Le Mon, 30 May 2011 05:59:28 +0200, tornenvi <tornenvi@gmail.com> a écrit:
>> compile on an XP machine and transfer the files to the 2000 machine.
>>
>> I have tried to use MINGW gcc-4.5.0-1 and found the same problem.
>> I believe it depends on the switches used when the compiler is built.
> No, there is no way, you may play with whatever switch you want, this will be systematically the same. The reason was already explained by Ludovic, and here is a reference which base this:
> http://msdn.microsoft.com/en-us/library/ms683215(v=vs.85).aspx
>
> It says:
>
> Minimum supported client Windows Vista, Windows XP with SP1
> Minimum supported server Windows Server 2003
>
> Note even on Windows XP, this may not work, if you've not installed at least Service Pack 1.
>

I checked and you are correct there are no switches or low level defines that allow the compiler
to be built without the use of GetProcessID.

The call has been added to gcc\ada\adainit.c

 From the Ada ChangeLog-2009 for 2009-07-13
----------
	* mingw32.h: Make it explicit that we need XP or later.
and
	* adaint.c: Changes throughout the Windows section to redesign storage
	of the child process list and the process identification.
-------

But as I said before I know MINGW gcc-4.4.0 from the mingw site works.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MinGW issues with gnat
  2011-05-30  7:30     ` Dmitry A. Kazakov
@ 2011-05-30 10:42       ` Frank J. Lhota
  0 siblings, 0 replies; 9+ messages in thread
From: Frank J. Lhota @ 2011-05-30 10:42 UTC (permalink / raw)


On 5/30/2011 3:30 AM, Dmitry A. Kazakov wrote:
>
> + Remove references to GetProcessID. In many cases it can be removed or
> worked around by this or other way. An overview can be found here:
>
> http://www.ms-news.net/f2725/getprocessid-and-how-to-do-this-for-windows-98-2000-and-xp-4079045.html

Two points about this thread:

- It does not provide a solution that works for all versions of Windows 
discussed (98, XP, Vista and 7); and
- When did "document" become a dirty word, rendered as "do***ent" to 
avoid offense?

-- 
"All things extant in this world,
Gods of Heaven, gods of Earth,
Let everything be as it should be;
Thus shall it be!"
- Magical chant from "Magical Shopping Arcade Abenobashi"

"Drizzle, Drazzle, Drozzle, Drome,
Time for this one to come home!"
- Mr. Wizard from "Tooter Turtle"



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-05-30 10:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-29 21:16 MinGW issues with gnat Marco
2011-05-29 21:40 ` Yannick Duchêne (Hibou57)
2011-05-29 21:58   ` Ludovic Brenta
2011-05-29 22:32     ` Yannick Duchêne (Hibou57)
2011-05-30  7:30     ` Dmitry A. Kazakov
2011-05-30 10:42       ` Frank J. Lhota
2011-05-30  3:59 ` tornenvi
2011-05-30  5:30   ` Yannick Duchêne (Hibou57)
2011-05-30  8:20     ` tornenvi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox