Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Cygwin and gdb - error creating process ( error 5 )

This thread is locked; no one can reply to it. rss feed Print
Cygwin and gdb - error creating process ( error 5 )
Hyena_
Member #8,852
July 2007
avatar

Yesterday I encountered a very strange problem when attempting to debug my game under Cygwin using GDB.

$ gdb arion.exe
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) run 4000
Starting program: /cygdrive/d/arion/mud/src/arion.exe 4000
Error creating process /cygdrive/d/arion/mud/src/arion.exe, (error 5).
(gdb) quit

It appears that the very same error shows up whatever program I attempt to debug. I googled for hours and even downloaded gdb's src code to search for error 5 but there was no use. Neither firewall nor antivirus causes it. Can anyone give me an idea how to get it fixed? Meanwhile I try one more thing - full deletion of Cygwin and then reinstall and download all libraries again.

EDIT:

Problem solved. I deleted cygwin from drive D leaving nothing to remain. Then I installed it from scratch to the C:\cygwin directory ( no longer D:\cygwin ) and I chose only gdb and some gdbm ( devel ) libraries. After that gdb works just fine. I don't know what I did right this time but when it's not broken, don't fix it :D

BAF
Member #2,981
December 2002
avatar

Why are you using cygwin? :o

Billybob
Member #3,136
January 2003

Hyena_ said:

I don't know what I did right this time but when it's not broken, don't fix it

That seems to be what everyone said when I tried to Google the problem. They just tried random stuff until it magically worked. :P shrugs

BAF said:

Why are you using cygwin?

Why aren't you using cygwin? :o

Arthur Kalliokoski
Second in Command
February 2005
avatar

Quote:

Why aren't you using cygwin? :o

It wasn't made by his hero, savior of the world from communist open-source software, BillG.

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

BAF
Member #2,981
December 2002
avatar

Cygwin is awful. I'd rather use a barbed wire fence to wipe my ass after I take a shit than use cygwin. It's the red-headed, cheap chinese knock-off of Linux.

Billybob
Member #3,136
January 2003

BAF said:

cheap chinese knock-off of Linux.

Linux is made in China.

BAF
Member #2,981
December 2002
avatar

That doesn't mean there doesn't exist a cheap chinese knock-off of it.

Billybob
Member #3,136
January 2003

I wonder if there is a cheap Chinese knockoff of Allegro?

Hyena_
Member #8,852
July 2007
avatar

Ok I got gdb working but soon after that I ran into another problem:

$ make clean
2 [main] make 2292 fork: child -1 - CreateProcessW failed for 'C:\cygwin\b
in\make.exe', errno 13
make: vfork: Permission denied

my make.exe doesn't simply work. This time reinstalling the whole Cygwin didn't give me any results.

When I gave a command "make -d" I got this:
...
...
Trying pattern rule with stem `Makefile.sh'.
Trying implicit prerequisite `Makefile.sh,v'.
Trying pattern rule with stem `Makefile.sh'.
Trying implicit prerequisite `RCS/Makefile.sh,v'.
Trying pattern rule with stem `Makefile.sh'.
Trying implicit prerequisite `RCS/Makefile.sh'.
Trying pattern rule with stem `Makefile.sh'.
Trying implicit prerequisite `s.Makefile.sh'.
Trying pattern rule with stem `Makefile.sh'.
Trying implicit prerequisite `SCCS/s.Makefile.sh'.
No implicit rule found for `Makefile'.
Finished prerequisites of target file `Makefile'.
No need to remake target `Makefile'.
Updating goal targets....
Considering target file `all'.
File `all' does not exist.
Finished prerequisites of target file `all'.
Must remake target `all'.
2 [main] make 5476 fork: child -1 - CreateProcessW failed for 'C:\cygwin\b
in\make.exe', errno 13
make: vfork: Permission denied
Failed to remake target file `all'.

I'm using cygwin because I can't install any linux here. The funny thing about the whole problem is that cygwin usually has worked fine under other computers but on my laptop it has problems.

Billybob
Member #3,136
January 2003

What OS are you running? Perhaps try running Cygwin as administrator (Windows Vista/7)? Check the permissions on make? (ls -la /bin/make)

BAF
Member #2,981
December 2002
avatar

Billybob said:

I wonder if there is a cheap Chinese knockoff of Allegro?

SDL? Or is that the other way around? ???

Tobias Dammers
Member #2,604
August 2002
avatar

BAF said:

Cygwin is awful. I'd rather use a barbed wire fence to wipe my ass after I take a shit than use cygwin. It's the red-headed, cheap chinese knock-off of Linux.

It tries to make Windows behave like a Unix. That's an admirable cause, and it does an amazing job, but the fact is, Windows is Windows and doesn't like being bent like that.
Also, gdb was designed with a Unix process model in mind, the mere fact that it works somewhat under Windows is amazing enough - but you shouldn't expect the true debugging experience. If you want gdb to shine, you NEED to use it on an OS that really supports it.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Hyena_
Member #8,852
July 2007
avatar

Turned out that my COMODO firewall blocked make.exe from creating a process of gcc.exe. Soon after that I got make.exe working but it didn't compile me an executable still yelling ACCESS DENIED. I used process monitor n stuff but it didn't help, finally just out of curiosity I checked the security rights of make.exe and noticed that it was not allowed to execute by any user ( even admin ). I gave the permissions and just in case gave them to gcc.exe as well..

However, now when I typed "make" I got this MS-DOS 16 bit application error and a message that cpu was given some incorrect instructions. Sooooo, after half an hour I found out that I had replaced the original make.exe with the one I found from here: http://www.equation.com/servlet/equation.cmd?fa=make

After I had restored the original make.exe I got everything perfectly working. Problems solved.

Tobias Dammers
Member #2,604
August 2002
avatar

I had to do this to make gdb work:
sudo aptitude install g++ make gdb

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Thomas Fjellstrom
Member #476
June 2000
avatar

sudo aptitude install build-essential gdb is what I'd do.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Go to: