https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105127
Bug ID: 105127 Summary: Search Path not working on Cygwin Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: samuel.d.darwin at gmail dot com Target Milestone: --- Hi, It appears that "Search Path" is not working as expected on the Cygwin platform. Your feedback would be appreciated. Notice on this page https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html it says: By default, the preprocessor looks for header files included by the quote form of the directive #include "file" first relative to the directory of the current file, and then in a preconfigured list of standard system directories. However, during testing, g++ fails to include a file in the same directory. An error such as this occurs: "fatal error: zutil.h: No such file or directory | #include "zutil.h" compilation terminated." How can it be replicated? The problem was discovered when running CI tests https://github.com/boostorg/boost-ci . Notice the .appveyor.yml file contained there. To run more Cygwin tests I forked that repository to https://github.com/samd2/boost-ci/tree/feature/searchpath and added Visual Studio 2019 and Visual Studio 2022 images. Appveyor's Visual Studio 2017 image was ok. The problem appears on 2019 and 2022. CI output at https://ci.appveyor.com/project/sam-original/boost-ci/builds/43100905 > Which version of gcc? # gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/11/lto-wrapper.exe Target: x86_64-pc-cygwin Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.2.0/configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.2.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --disable-bootstrap --enable-languages=c,c++,fortran,lto,objc,obj-c++,jit --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.2.0 (GCC) b2 --abbreviate-paths libs/boost-ci/test toolset=gcc cxxstd=11,14,1z address-model=64 link=shared,static variant=release -j3 > What command failed? Actually, g++ was called by another tools, b2 : b2 --abbreviate-paths libs/boost-ci/test toolset=gcc cxxstd=11,14,1z address-model=64 link=shared,static variant=release -j3 By adding the -d2 debugging flag to b2 it can be seen that the g++ command was: g++ -std=c++14 -fvisibility-inlines-hidden -m64 -mthreads -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2\libs\boost-ci\test\gcc-11\rls\cxstd-14-iso\trgt-os-cygwn\thrd-mlt\vsblt-hdn\test.o" "libs\boost-ci\test\test.cpp" > What was the C++ source file contents? In this case the file test.cpp. It can be seen here: https://github.com/boostorg/boost-ci/blob/master/test/test.cpp It has the line "#include "test2.hpp" > What was the exact error? libs\boost-ci\test\test.cpp:18:10: fatal error: test2.hpp: No such file or directory 18 | #include "test2.hpp" | ^~~~~~~~~ View the entire build here: https://ci.appveyor.com/project/sam-original/boost-ci/builds/43100905 Let me know if you need more info. Thanks.