Back end build: child process dies SOLVED

Discussion of issues related specifically to writing code for native mode devices. This includes ZBasic code as well as assembly language code and C code, both inline and standalone.
Post Reply
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Back end build: child process dies SOLVED

Post by spamiam »

I had a back end build problem on my Vista 64 bit computer. I got verbose report that included text looking like:

Code: Select all

0 [main] sh 468 sync_with_child: child 4800(0x118) died before initialization with status code 0x0
  32675 [main] sh 468 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable 
It took a long while to track down, but I "fixed" the problem. I made the symptom go away, without really fixing the underlying issue.

After I got the error, I installed Atmel AVR Studio and WinAVR on this computer. It, too, gave the same error. So, it is a WinAVR problem. ZBasic native mode compilation uses WinAVR.

Then I removed Studio and WinAVR and installed the newest version of Studio (V4.19) which uses a special Atmel version of the avr-gcc toolchain. Much to my surprise, it compiled properly!

I then added back into the mix WinAVR. With no other changes at all, and when not even using WinAVR, the AVR Studio build with the Atmel AVR Toolchain failed! So I removed all references to WinAVR in the System evnironment path. That repaired the problem.

I then added the WinAVR references to the end of the path, thereby breaking the build again. I then started deleting WinAVR folders and files until I isolated the culprit. It is sh.exe and MSys-1.0.dll.

5 or 6 years ago, these two programs caused the same problem for Vista, but it was supposedly fixed. Well, I it still does not work on my Vista 64 computer!

The Atmel AVR Toolchain is almost identical to WinAVR, except they do not distribute sh.exe or MSys-1.0.dll with it. So, WinAVR might build successfully without it too. I renamed sh.exe, so it would not be able to be found, and WinAVR did a build perfectly.

So, I renamed sh.exe in the zbasic ...winavr\utils\bin folder and ZBasic also had a successful build. This was just an empty project, with no actual user code. This info is hot off the press, so I can't guarantee that removing sh.exe has no other side effects, but it works fine so far.

-Tony
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

I just installed the newest version of ZBasic. I had to remove sh.exe from the folder as specified above to get a successful compilation for generic and native mode devices. This is on a Vista 75 laptop with an older installation of AVR Studio, and WinAVR also installed.

-Tony
Post Reply