public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105127] New: Search Path not working on Cygwin
@ 2022-04-01 15:25 samuel.d.darwin at gmail dot com
  2022-11-28 17:54 ` [Bug c++/105127] " pinskia at gcc dot gnu.org
  2022-11-28 18:56 ` samuel.d.darwin at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: samuel.d.darwin at gmail dot com @ 2022-04-01 15:25 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/105127] Search Path not working on Cygwin
  2022-04-01 15:25 [Bug c++/105127] New: Search Path not working on Cygwin samuel.d.darwin at gmail dot com
@ 2022-11-28 17:54 ` pinskia at gcc dot gnu.org
  2022-11-28 18:56 ` samuel.d.darwin at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-28 17:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105127

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-11-28
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>Appveyor's Visual Studio 2017 image was ok. The problem appears on 2019 and 2022.

I get the feeling the issue is more inside cygwin library if it works with 2017
image.  Have you reported this problem to the cygwin folks?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/105127] Search Path not working on Cygwin
  2022-04-01 15:25 [Bug c++/105127] New: Search Path not working on Cygwin samuel.d.darwin at gmail dot com
  2022-11-28 17:54 ` [Bug c++/105127] " pinskia at gcc dot gnu.org
@ 2022-11-28 18:56 ` samuel.d.darwin at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: samuel.d.darwin at gmail dot com @ 2022-11-28 18:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105127

--- Comment #2 from Sam Darwin <samuel.d.darwin at gmail dot com> ---
yes, reported: https://cygwin.com/pipermail/cygwin/2022-January/250693.html

I don't know where the bug originates, in gcc or cygwin. If an expert in gcc
could submit a fix to cygwin or vice versa.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-28 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01 15:25 [Bug c++/105127] New: Search Path not working on Cygwin samuel.d.darwin at gmail dot com
2022-11-28 17:54 ` [Bug c++/105127] " pinskia at gcc dot gnu.org
2022-11-28 18:56 ` samuel.d.darwin at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).