Hello. Since MSYS2 supports applications with 3 different runtime environments (msys-2.0-dll, MinGW 32-bit, and MinGW 64-bit) you always need to understand which environment you are using or else you might get confused. In this case, strace is probably in /usr/bin, which means it uses msys-2.0.dll, and it will probably only recognize Cygwin-type system calls. I don't know if a MinGW strace is available.
--David On Mon, Jul 11, 2016 at 2:23 PM, Computer Jock <[email protected]> wrote: > I just joined this mailing list and I hope I have not misunderstood what > it's for... If I should be asking somewhere else, please let me know so > I don't bother anyone with inappropriate posts. > > I've installed Msys2 and am using the 64-bit build environment on win7 x64 > > Problem 1: > > t.c: > main(){ int f = open("a.exe",0); } > > $ gcc t.c > $ strace a.exe > create_child: a.exe > --- Process 7648 created > --- Process 7648 loaded C:\Windows\System32\ntdll.dll at 0000000076F70000 > --- Process 7648 loaded C:\Windows\System32\kernel32.dll at 0000000076E50000 > --- Process 7648 loaded C:\Windows\System32\KernelBase.dll at > 000007FEFCE20000 > --- Process 7648 loaded C:\Windows\System32\msvcrt.dll at 000007FEFD330000 > --- Process 7648 loaded D:\msys64\mingw64\bin\libwinpthread-1.dll at > 0000000064940000 > --- Process 7648 loaded C:\Windows\System32\user32.dll at 0000000076D50000 > --- Process 7648 loaded C:\Windows\System32\gdi32.dll at 000007FEFD3D0000 > --- Process 7648 loaded C:\Windows\System32\lpk.dll at 000007FEFD810000 > --- Process 7648 loaded C:\Windows\System32\usp10.dll at 000007FEFF1B0000 > --- Process 7648 loaded C:\Windows\System32\imm32.dll at 000007FEFD440000 > --- Process 7648 loaded C:\Windows\System32\msctf.dll at 000007FEFD470000 > --- Process 7648 exited with status 0x0 > > > No trace of the open() syscall. Am I misunderstanding what strace is > supposed to do? > > Problem 2: > > t.c: > #include <ncurses/curses.h> > main() { initscr(); } > > $ gcc t.c -lncurses > $ ./a > Error opening terminal: xterm. > > Using sysinternal's procmon, I see an attempt to access > "D:\mingw64\share\" but my Msys2 installation root is actually D:\msys64 > > Making a windows symlink: D:\mingw64 => D:\msys64\mingw64 > > Then it works; I get no error message about opening terminal xterm. > > Pacman -Q says I've installed: > mingw-w64-x86_64-ncurses 6.0.20160220-2 > ncurses 6.0.20160220-1 > mingw-w64-x86_64-termcap 1.3.1-2 > > It seems to me that ncurses is not figuring out that my Msys2 root > starts at D:\msys64\ > Everything else in my Msys2 installation seems to be working properly > and has been for several months > > > > > ------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > _______________________________________________ > Msys2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/msys2-users ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ Msys2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/msys2-users
