Closed eldiener closed 7 years ago
This was because the rule
__pch.h: ${srcdir}/src/env/_crtdef.h
echo "#include \"$<\"" > $@
generated an #include
directive with an absolute POSIX path that a native GCC would not accept.
It was an oversight. David had a partially correct solution here. Note that the path is meant to be placed in double quotes, so cygpath -w
would cause problems because of backslashes. We have to use cygpath -m
here.
Thanks for the report. Please pull and try again. The problem should no longer happen.
Thanks, your fix enabled me to correctly build both a 32-bit and 64-bit version of your library.
:joy:
When trying to build your library under MSYS2 using mingw-64 I get this error:
"Building shared library... x86_64-w64-mingw32-gcc -x c-header -DHAVE_CONFIG_H -Wall -Wextra -pedantic -pedantic-errors -Werror -Wwrite-strings -Wconversion -Wsign-conversion -Wsuggest-attribute=noreturn -Winvalid-pch -Wundef -Wshadow -Wstrict-aliasing=2 -Wstrict-overflow=5 -pipe -mno-stack-arg-probe -mno-accumulate-outgoing-args -mpush-args -masm=intel -ffreestanding -DNDEBUG $(echo "" "-include pch.h -std=c11 -Wstrict-prototypes" | sed "s/-include pch\.h//") -O3 -ffunction-sections -fdata-sections -m64 pch.h -o pch.h.gch __pch.h:1:70: fatal error: /e/Programming/VersionControl/mcfgthread/src/env/_crtdef.h: No such file or directory
include "/e/Programming/VersionControl/mcfgthread/src/env/_crtdef.h"
compilation terminated. make: *** [Makefile:1143: __pch.h.gch] Error 1"
Yet when I do:
ls -al /e/Programming/VersionControl/mcfgthread/src/env/_crtdef.h
the output is:
-rw-r--r-- 1 eldnew8 None 2107 Apr 5 20:24 /e/Programming/VersionControl/mcfgthread/src/env/_crtdef.h
so clearly the file exists. Any ideas why gcc tells me that there is no such file or directory ?