Hi,
I (think I) found a bug in msys2. Here is a simple demo case:
main.c:
int main() { return 42; }
Makefile:
CC = gcc
CC2 = $(shell which $(CC))
out_1: clean main.c
$(CC) main.c -o /home/username/out.exe
out_2: clean main.c
$(CC) /home/username/main.c -o out.exe
out_3: clean main.c
$(CC) main.c -o out.exe
out_4: clean main.c
$(CC2) main.c -o /home/username/out.exe
out_5: clean main.c
$(CC2) main.c -o out.exe
clean:
rm -f out.exe
All 5 targets in the makefile should do the same thing, right?
If I try to run target #1, I get:
C:/Users/username/progs/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
cannot open output file /home/username/out.exe: No such file or directory
For #2 I get:
gcc: error: /home/username/main.c: No such file or directory
The other 3 work correctly.
If I run the command in #1 or #2 manually from the msys bash prompt, it
works fine. It only fails using the makefile.
When checking with Process Monitor, I found that in the first 2 cases, it
was trying to access the folder at C:\home\username\ , or in other words -
it was not translating the msys path to the real windows path.
I am using:
msys2-base-x86_64-20140704
x86_64-4.9.1-release-posix-seh-rt_v3-rev0
The make I am using is the mingw32-make included with the compiler version
above.
--
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public