View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000281Ecere SDKcompilerpublic2009-11-05 17:282013-05-19 22:15
Reporterjerome 
Assigned Toredj 
PriorityimmediateSeveritymajorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version0.44 Ryoan-jiFixed in Version0.44 Ryoan-ji 
Summary0000281: Preprocessor errors such as missing header files cause cryptic error messages
Descriptionyou get an error that the .sym file isn't found
no error/warning from the preprocessor is displayed

with
https://github.com/ecere/sdk/commit/8b1b23278b11adb020a5c4478aa5ae5d51390c52 [^]

now the build fails before we get to the missing .sym part
it fails on the ecp call for the offending .ec file

we still need to find a way to show the errror/warnings from the preprocesser under windows

see notes below

Tagsv0.44d2
Attached Files

- Relationships
related to 0000425new Missing .sym message should provide details of missing dll file or failed load or other issues. 
related to 0000230new Preprocessor errors are not reported 

-  Notes
(0000494)
jerome (administrator)
2012-02-15 08:34
edited on: 2012-02-15 08:34

I just noticed that when building from the console on Linux, the GCC headers not found errors do show up. Perhaps they go to stderr, and it's not handled/redirected (neither by ecp, nor by the IDE)

(0000498)
redj (administrator)
2012-03-05 22:34

we do handle stderr at
sdk/ide/src/project/Project.ec: 1496: if((f = DualPipeOpen(PipeOpenMode { output = true, error = true, input = true }, command)))
  
the call to cpp that is in ecc.ec and ecp.ec does not handle stderr on the other hand. how does this play out on the different platforms windows/linux

we want to redirect stderr of cpp to stderr of ecp
guess in Linux it does go there automatically, and not on Windows ?

Fix belongs in DualPipe.c
on Windows, likely
between lines 363 and 458
(0000510)
redj (administrator)
2012-03-06 11:11

{
      HANDLE hOutput[2] = { 0 },hOutputRead = 0;
      HANDLE hInput[2] = { 0 }, hInputWrite = 0;
      HANDLE hError[2] = { 0 }, hErrorRead = 0;
      HANDLE hStdErr = 0, hStdIn = 0, hStdOut = 0;
      SECURITY_ATTRIBUTES sa;
      PROCESS_INFORMATION pi = { 0 };
      STARTUPINFO si = { 0 };
      uint16 * _wcommandLine = __ecereNameSpace__ecere__sys__UTF8toUTF16(commandLine, null);

      sa.nLength = sizeof(SECURITY_ATTRIBUTES);
      sa.lpSecurityDescriptor = null;
      sa.bInheritHandle = TRUE;

      // Force redirecting if GUI application
      if(!(mode & POM_error))
         hStdErr = GetStdHandle(STD_ERROR_HANDLE);
      if(!(mode & POM_input))
         hStdIn = GetStdHandle(STD_INPUT_HANDLE);
      if(!(mode & POM_output))
         hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);

      if((mode & POM_output) || !hStdOut)
         CreatePipe(&hOutput[PIPE_READ],&hOutput[PIPE_WRITE],&sa,0);

      if(( (mode & POM_error) && !(mode & POM_output)) ||
         (!(mode & POM_error) && !hStdErr))
         CreatePipe(&hError[PIPE_READ], &hError[PIPE_WRITE],&sa,0);
         
      if((mode & POM_input) || !hStdIn)
         CreatePipe(&hInput[PIPE_READ], &hInput[PIPE_WRITE], &sa,0);

      if(hInput[PIPE_READ])
         DuplicateHandle(GetCurrentProcess(),hInput[PIPE_WRITE],GetCurrentProcess(),&hInputWrite,0,FALSE,DUPLICATE_SAME_ACCESS);

      if((mode & POM_error) && (mode & POM_output))
      {
         DuplicateHandle(GetCurrentProcess(),hOutput[PIPE_READ],GetCurrentProcess(),&hOutputRead,0,FALSE,DUPLICATE_SAME_ACCESS);
         DuplicateHandle(GetCurrentProcess(),hOutput[PIPE_WRITE],GetCurrentProcess(),&hError[PIPE_WRITE],0,TRUE,DUPLICATE_SAME_ACCESS);
      }
      else
      {
         if(hOutput[PIPE_WRITE])
            DuplicateHandle(GetCurrentProcess(),hOutput[PIPE_READ],GetCurrentProcess(),&hOutputRead,0,FALSE,DUPLICATE_SAME_ACCESS);
         if(hError[PIPE_WRITE])
            DuplicateHandle(GetCurrentProcess(),hError[PIPE_READ],GetCurrentProcess(),&hErrorRead,0,FALSE,DUPLICATE_SAME_ACCESS);
      }

      if(hOutput[PIPE_READ])
         CloseHandle(hOutput[PIPE_READ]);
      if(hError[PIPE_READ])
         CloseHandle(hError[PIPE_READ]);
      if(hInput[PIPE_WRITE])
         CloseHandle(hInput[PIPE_WRITE]);

      // Set up the start up info struct.
      si.cb = sizeof(STARTUPINFO);
      si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
      si.hStdOutput = hOutput[PIPE_WRITE] ? hOutput[PIPE_WRITE] : hStdOut;
      si.hStdInput = hInput [PIPE_READ] ? hInput [PIPE_READ] : hStdIn;
      if((mode & POM_error) && (mode & POM_output))
         si.hStdError = hOutput[PIPE_WRITE];
      else if((mode & POM_output))
         si.hStdError = hError[PIPE_WRITE];
      else
         si.hStdError = hError[PIPE_WRITE] ? hError[PIPE_WRITE] : hStdErr;

      if(CreateProcess(null,_wcommandLine,null,null,TRUE, 0,env,null ,&si,&pi))
      {
         CloseHandle(pi.hThread);

         f = calloc(1, sizeof(_DualPipe));
         f->inputHandle = hOutputRead;
         f->outputHandle = hInputWrite;
         f->hProcess = pi.hProcess;
         f->pid = pi.dwProcessId;
         *inputPtr = null;
         *outputPtr = null;
      }
      else
      {
         if(hOutputRead)
            CloseHandle(hOutputRead);
         if(hInputWrite)
            CloseHandle(hInputWrite);
         if(hErrorRead)
            CloseHandle(hErrorRead);
      }

      if(hInput [PIPE_READ]) CloseHandle(hInput [PIPE_READ]);
      if(hOutput[PIPE_WRITE]) CloseHandle(hOutput[PIPE_WRITE]);
      if(hError [PIPE_WRITE]) CloseHandle(hError [PIPE_WRITE]);
      __ecereNameSpace__ecere__com__eSystem_Delete(_wcommandLine);
}
(0000511)
redj (administrator)
2012-03-06 11:12

should I see the problem in there?
(0000512)
redj (administrator)
2012-03-06 11:55
edited on: 2012-03-06 21:00

the manual: http://support.microsoft.com/kb/190351 [^]

searches:

https://www.google.ca/search?sourceid=chrome&ie=UTF-8&q=CreateProcess+how+to+redirect+stderr+from+child+process+to+parent+process#hl=en&sclient=psy-ab&q=CreateProcess+redirect+stderr+from+child+process+to+parent+process&oq=CreateProcess+redirect+stderr+from+child+process+to+parent+process&aq=f&aqi=&aql=&gs_sm=3&gs_upl=5099l5457l0l5735l2l2l1l0l0l0l101l101l0.1l1l0&gs_l=serp.3...5099l5457l0l5735l2l2l1l0l0l0l101l101l0j1l1l0&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&fp=5a1555c5fd3b3cce&biw=1840&bih=881 [^]

https://www.google.ca/search?sourceid=chrome&ie=UTF-8&q=gnu+make+and+stderr+redirect+win32#hl=en&sclient=psy-ab&q=gnu+make+stderr+redirect+win&oq=gnu+make+stderr+redirect+win&aq=f&aqi=&aql=&gs_sm=3&gs_upl=27592l33702l0l34602l4l4l1l0l0l0l97l228l3l3l0&gs_l=serp.3...27592l33702l0l34603l4l4l1l0l0l0l97l228l3l3l0&fp=1&biw=1840&bih=881&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&cad=b [^]

(0000514)
jerome (administrator)
2012-03-07 08:15

Fixed in DualPipe.c:
https://github.com/ecere/sdk/commit/48422b31c3cfa997044d7384bc4ed6bf71a64e35 [^]

- Issue History
Date Modified Username Field Change
2009-11-05 17:28 jerome New Issue
2010-07-07 02:59 redj Target Version => 0.44d2
2010-07-07 04:10 redj Tag Attached: v0.44d2
2010-07-25 20:48 redj Relationship added child of 0000429
2010-07-26 01:54 jerome Relationship added related to 0000425
2010-07-26 02:16 jerome Relationship added related to 0000230
2010-07-26 19:18 thexa4 Target Version 0.44d2 => 0.44 draft 2
2010-12-19 01:17 thexa4 Status new => assigned
2010-12-19 01:17 thexa4 Assigned To => thexa4
2012-02-15 08:34 jerome Note Added: 0000494
2012-02-15 08:34 jerome Note Edited: 0000494
2012-03-05 22:34 redj Note Added: 0000498
2012-03-06 11:11 redj Note Added: 0000510
2012-03-06 11:12 redj Note Added: 0000511
2012-03-06 11:55 redj Note Added: 0000512
2012-03-06 21:00 redj Note Edited: 0000512
2012-03-06 21:18 redj Description Updated
2012-03-06 21:19 redj Description Updated
2012-03-06 21:24 redj Assigned To thexa4 => redj
2012-03-07 08:15 jerome Status assigned => resolved
2012-03-07 08:15 jerome Fixed in Version => 0.44 pre-release 2
2012-03-07 08:15 jerome Resolution open => fixed
2012-03-07 08:15 jerome Note Added: 0000514
2012-03-08 15:32 redj Target Version old 0.44.pre2 => 0.44 Ryoan-ji
2012-03-08 17:21 redj Relationship deleted child of 0000429
2012-03-08 18:07 redj Fixed in Version => 0.44 Ryoan-ji
2012-03-29 07:50 redj Category => eC Compiling Tools
2012-03-29 07:50 redj Project @2@ => Ecere SDK
2013-05-19 22:15 jerome Status resolved => closed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker