Good suggestion. I couldn't get that to work before, now I can. Below are all the "NOT FOUND" things that occur when I run tar from the cmd.exe prompt (tar.exe and gzip.exe are in C:\Program Files\Bibledit-4.9.8\editor\bin).

It appears that when tar tries to fork off to gzip (pid 12040), it tries to do so using sh. I may be wrong, but this seems to be somehow different behavior than say a year ago, because I could use tar with gzip just fine then.

I also don't understand how tar knows to truncate part of the path C:\Program Files\Bibledit-4.9.8\editor\bin (it drops editor\bin) in order to look for stuff that it wants.

If I copy msys2 /usr/bin/sh.exe  into C:\Program Files\Bibledit-4.9.8\usr\bin then it gets farther, but complains:

bash.exe: warning: could not find /tmp, please create!

If I create C:\Program Files\Bibledit-4.9.8\tmp then it works.

Bottom line for me is I now have to copy /usr/bin/sh.exe into my package, which I definitely did not have to do before.

Can anyone explain what changed?

Process Name PID Operation Path Result
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\etc\fstab PATH NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\etc\nsswitch.conf PATH NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\etc\passwd PATH NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\editor\bin\netutils.dll NAME NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\editor\bin\srvcli.dll NAME NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\editor\bin\wkscli.dll NAME NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\editor\bin\SAMCLI.DLL NAME NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\editor\bin\SAMLIB.dll NAME NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\etc\fstab.d\postiffm PATH NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\etc\group PATH NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\home\postiffm PATH NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\home NAME NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\home.lnk NAME NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\home\postiffm PATH NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\home NAME NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\home\postiffm PATH NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\home NAME NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\home.lnk NAME NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\home\postiffm PATH NOT FOUND
tar.exe 10708 CreateFile C:\Program Files\Bibledit-4.9.8\home NAME NOT FOUND
tar.exe 12040 CreateFile C:\Program Files\Bibledit-4.9.8\usr\bin\sh PATH NOT FOUND
tar.exe 12040 CreateFile C:\Program Files\Bibledit-4.9.8\usr\bin PATH NOT FOUND
tar.exe 12040 CreateFile C:\Program Files\Bibledit-4.9.8\usr\bin\sh PATH NOT FOUND
tar.exe 12040 CreateFile C:\Program Files\Bibledit-4.9.8\usr\bin PATH NOT FOUND
tar.exe 12040 CreateFile C:\Program Files\Bibledit-4.9.8\usr NAME NOT FOUND

Matt

On 2/21/2017 4:48 AM, Ray Donnelly wrote:
Can you use procmon.exe to see which folders get searched then?

On Tue, Feb 21, 2017 at 2:07 AM, Matthew A. Postiff
<[email protected]> wrote:
Thanks Ray. Unfortunately, the path already contains the directory where tar
and gzip reside; in fact, I have it as the first entry in the path.


On 2/20/2017 7:06 PM, Ray Donnelly wrote:

Then tar is looking only in PATH. You can use _putenv() at the top of your
program to add the directory your program is in (Get ModuleFileName) to
PATH.

On Feb 18, 2017 8:57 PM, "Matthew A. Postiff" <[email protected]> wrote:
Thanks Oscar. I already have gzip.exe in the same directory as tar. If I
run gzip by itself from the command line, it works. If I run tar -cf by
itself, it works. Only when I do tar -czf ... does it fail with the gzip
cannot exec error.

Matt


On 2/18/2017 2:34 PM, Óscar Fuentes wrote:
"Matthew A. Postiff" <[email protected]>
writes:

I have a Windows gtk program that I build in an msys2 environment, and
the program itself uses some msys2 utilities. I copy the ones I need
into the C:\program files\myprogram\bin with the idea that I don't have
to install all of msys2 to run the program. In my program I spawn the
command tar -czf

Tar breaks because it cannot find gzip.
You need to copy gzip to your binaries directory, along with any dll it
requires.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users


    

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to