Zeus Forum Index Zeus
Use this forum to ask for help, submit a bug report or make a suggestion.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

makefile

 
Post new topic   Reply to topic    Zeus Forum Index -> General
View previous topic :: View next topic  
Author Message
dirk
Guest





PostPosted: Wed Sep 22, 2004 8:09 pm    Post subject: makefile Reply with quote

Hi there,
I don't want to set the path's and options for the compiler in the Dialogs because I have to compile with several compilers.

So I'm writing my own makefiles. If I try to make(Workspace Make) or Compile (in Compile/Option Commandline = Make)

I get the Error

cl -o testzeus main.obj /link /LIBPATH:"C:\Programme\Microsoft Visual C++ Toolkit 2003\lib" /LIBPATH:"C:\Programme\Microsoft Platform SDK for Windows XP SP2\LIB" user32.lib gdi32.lib program.res
process_easy: DuplicateHandle(In) failed (e=6)
make: Interrupt/Exception caught (code = 0xc0000005, addr = 0x4163a4)

The makefile runs in the shell.
Have you an idea?

dirk
Back to top
jussij
Site Admin


Joined: 13 Aug 2004
Posts: 1439

PostPosted: Thu Sep 23, 2004 2:26 pm    Post subject: Reply with quote

Which version of windows are you running? When it comes to spawing processes each version of Windows does have a habit of working slightly differently Sad

To check that it is not some sort of environment variable issue, use the Options Editor Options menu and in the General section turn on the Help debug tools, macros and executables option. With this option enabled Zeus will display the make command line that it being run.

Next use the Tools, Dos Shell menu to bring up a command prompt and run the same make command. This would hopefully result in the same runtime error and if it does this means the error is environment related.

Code:
cl -o testzeus main.obj /link /LIBPATH:"C:\Programme\Microsoft Visual C++ Toolkit 2003\lib" /LIBPATH:"C:\Programme\Microsoft
Platform SDK for Windows XP SP2\LIB" user32.lib gdi32.lib program.res
process_easy: DuplicateHandle(In) failed (e=6)
make: Interrupt/Exception caught (code = 0xc0000005, addr = 0x4163a4)


I am assuming this compile was run by the make tool. What type of make utility is it? Is the make utility a DOS or a Win32 based executable? It does not look like the microsoft nmake tool.

One other thing worth trying is setting up a tool to run the make and see if tool behaves in the same manner. Also try running the tool visible, but turn off the option to capture the output and see if that has any effect.

Jussi
Back to top
View user's profile Send private message Send e-mail
dirk
Guest





PostPosted: Thu Sep 23, 2004 5:53 pm    Post subject: make Reply with quote

Hi Jussi,
first of all thanks for your fast reply!

I'm working with Windows XP SP2.

If I use Toos/DosShell the make command works.

I'm using GNU Make version 3.78.1 compiled for Win32.

If I disable capture standard error I get the message "Compilation completed successfully" but nothing is done(no exe file). I see only the fist line of my makefile in the compileroutputwindow, the second is missing.

If I'm enable capture standard error I get the message I've send yesterday.

If I disable both it works fine. Very Happy

dirk
Back to top
jussij
Site Admin


Joined: 13 Aug 2004
Posts: 1439

PostPosted: Fri Sep 24, 2004 1:59 am    Post subject: Reply with quote

Quote:
If I use Toos/DosShell the make command works.

That rules out the environment variables Sad

Quote:
I'm using GNU Make version 3.78.1 compiled for Win32.
....
If I disable both it works fine. [Very Happy]

As the names of the check boxes suggest, they control what program output Zeus will try to capture. So it looks like the make utility is not happy with Zeus trying to capture its output Sad

Looking back, the error message DuplicateHandle(In) failed (e=6) hints of this fact. As to why the this is happening, unfortunately I have no idea Sad

But there are two other options that may yet fix the output capture problem entirely. Currently I am assuming you have a command line something like this:
Code:
make -f "$pf"

or something similar.

The first option would be to create a my_make.cmd batch file as the follows:
Code:
@echo off
echo Running my_make.cmd for make file: %1
make -f %1

and then change the make command line to read:
Code:
my_make.cmd "$pf"

This means Zeus will be running the command interpreter and the command intepreter is left to run the make program. With some luck this may trick the make into running even with the Zeus capture on.

If that does not work, the final option would be to change the batch file to read:
Code:
@echo off
echo Running my_make.cmd for make file: %1
make -f %1 >>%1.err 2>&1
type %1.err

This batch file sends the stdout of the make to a file with the extension of err and sends the stderr output to stdout. The net result is all output produced by the make should end up in the err file. The final type command then sends the err file to stdout. So using this batch file you can run the make command with Zeus only capturing the stdout and again with some luck this may work.

Jussi
Back to top
View user's profile Send private message Send e-mail
jussij
Site Admin


Joined: 13 Aug 2004
Posts: 1439

PostPosted: Fri Sep 24, 2004 2:20 am    Post subject: Reply with quote

In an effort to better understand this bug, I ran a quick search of google for the error message:

DuplicateHandle(In) failed (e=6)

From the results found it appears that Zeus is not the only IDE are having problems with this GNU make utility.

Jussi


Last edited by jussij on Sun Jul 12, 2009 5:28 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Sat Sep 25, 2004 7:49 am    Post subject: Reply with quote

hi jussi,
with a little change the batch runs. Very Happy

@echo off
command /c make -f Makefile > makefile.err 2>>&1
type Makefile.err

I have to start make in his own enviroment (command /c) otherwise make becomes the error with the duplicated handel.

dirk
Back to top
jussij
Site Admin


Joined: 13 Aug 2004
Posts: 1439

PostPosted: Sat Sep 25, 2004 8:01 am    Post subject: Reply with quote

Hi Dirk,

Quote:
with a little change the batch runs.

That is good news Smile

Quote:
@echo off
command /c make -f Makefile > makefile.err 2>>&1
type Makefile.err
I have to start make in his own enviroment (command /c) otherwise make becomes the error with the duplicated handel.

Very nice idea Smile I can see how that would help.

Does it also work if you use cmd.exe /c instead of command.exe /c. The command.exe is the older DOS command interpreter where as cmd.exe is the newer NT command interpreter, so it might be better to use cmd.exe if you can.

Jussi
Back to top
View user's profile Send private message Send e-mail
dirk
Guest





PostPosted: Mon Sep 27, 2004 5:15 pm    Post subject: makefile Reply with quote

Hi Jussi,

I see no chance with cmd.exe /C because it use the handle off the first batch. I've tested it with cmd.exe /C CALL but there ist the same error.

so good old dos...

dirk
Back to top
jussij
Site Admin


Joined: 13 Aug 2004
Posts: 1439

PostPosted: Tue Sep 28, 2004 1:12 am    Post subject: Reply with quote

Hi Dirk,

Quote:
I've tested it with cmd.exe /C CALL but there ist the same error.

so good old dos...


That is very strange indeed. I guess some of the weird things DOS does with file handles somehow makes it work.

But at least you now have found something that DOS does well Smile

Cheers Jussi
Back to top
View user's profile Send private message Send e-mail
jussij
Site Admin


Joined: 13 Aug 2004
Posts: 1439

PostPosted: Mon Jun 20, 2005 12:56 am    Post subject: Reply with quote

Bfmitch posted the following Gnu Make Two Step as an alternative fix to this problem.

Jussi
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Zeus Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group