public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/99476] New: 'PATH_MAX' was not declared in this scope
@ 2021-03-08 22:35 unlvsur at live dot com
  2022-01-16 23:31 ` [Bug sanitizer/99476] " unlvsur at live dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: unlvsur at live dot com @ 2021-03-08 22:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99476
           Summary: 'PATH_MAX' was not declared in this scope
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 50334
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50334&action=edit
sanitizers do not find PATH_MAX and use linux headers

I try to cross compile gcc from windows to freebsd.
PATH_MAX does not exist.

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

* [Bug sanitizer/99476] 'PATH_MAX' was not declared in this scope
  2021-03-08 22:35 [Bug sanitizer/99476] New: 'PATH_MAX' was not declared in this scope unlvsur at live dot com
@ 2022-01-16 23:31 ` unlvsur at live dot com
  2023-05-18  3:46 ` syq at debian dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: unlvsur at live dot com @ 2022-01-16 23:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from cqwrteur <unlvsur at live dot com> ---
../../../../../../../gcc/libsanitizer/asan/asan_linux.cpp: In function 'void
__asan::AsanCheckIncompatibleRT()':
../../../../../../../gcc/libsanitizer/asan/asan_linux.cpp:200:21: error:
'PATH_MAX' was not declared in this scope
  200 |       char filename[PATH_MAX];
      |                     ^~~~~~~~
../../../../../../../gcc/libsanitizer/asan/asan_linux.cpp:201:35: error:
'filename' was not declared in this scope; did you mean 'rename'?
  201 |       MemoryMappedSegment segment(filename, sizeof(filename));
      |                                   ^~~~~~~~
      |                                   rename

The bug is still in the source

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

* [Bug sanitizer/99476] 'PATH_MAX' was not declared in this scope
  2021-03-08 22:35 [Bug sanitizer/99476] New: 'PATH_MAX' was not declared in this scope unlvsur at live dot com
  2022-01-16 23:31 ` [Bug sanitizer/99476] " unlvsur at live dot com
@ 2023-05-18  3:46 ` syq at debian dot org
  2024-01-08  9:50 ` iii at linux dot ibm.com
  2024-02-21  5:12 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: syq at debian dot org @ 2023-05-18  3:46 UTC (permalink / raw)
  To: gcc-bugs

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

YunQiang Su <syq at debian dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |syq at debian dot org

--- Comment #2 from YunQiang Su <syq at debian dot org> ---
Since commit
    59e4c98173a79fcaa2c33253261409f38856c384
You can add an configure option
    --includedir=/you/sysroot/include
to solve this problem.

/you/sysroot/include should contains a real workable limits.h.

The reason is due to that if gcc cannot find a limits.h,
it will use its ./gcc/glimits.h, which has no PATH_MAX defined.

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

* [Bug sanitizer/99476] 'PATH_MAX' was not declared in this scope
  2021-03-08 22:35 [Bug sanitizer/99476] New: 'PATH_MAX' was not declared in this scope unlvsur at live dot com
  2022-01-16 23:31 ` [Bug sanitizer/99476] " unlvsur at live dot com
  2023-05-18  3:46 ` syq at debian dot org
@ 2024-01-08  9:50 ` iii at linux dot ibm.com
  2024-02-21  5:12 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: iii at linux dot ibm.com @ 2024-01-08  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

Ilya Leoshkevich <iii at linux dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iii at linux dot ibm.com

--- Comment #3 from Ilya Leoshkevich <iii at linux dot ibm.com> ---
I had a similar issue when compiling GCC targeting i686-linux on x86_64 debian,
and --includedir= helped, thanks! I had to do the following:

../configure --target=i686-linux-gnu --disable-bootstrap --prefix=/usr
--includedir=/usr/i686-linux-gnu/include

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

* [Bug sanitizer/99476] 'PATH_MAX' was not declared in this scope
  2021-03-08 22:35 [Bug sanitizer/99476] New: 'PATH_MAX' was not declared in this scope unlvsur at live dot com
                   ` (2 preceding siblings ...)
  2024-01-08  9:50 ` iii at linux dot ibm.com
@ 2024-02-21  5:12 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-21  5:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This has to do with the way you are doing the cross compiling. Either use a
sysroot (with --with-sysroot=DIR) or use includedir as directed below.

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

end of thread, other threads:[~2024-02-21  5:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 22:35 [Bug sanitizer/99476] New: 'PATH_MAX' was not declared in this scope unlvsur at live dot com
2022-01-16 23:31 ` [Bug sanitizer/99476] " unlvsur at live dot com
2023-05-18  3:46 ` syq at debian dot org
2024-01-08  9:50 ` iii at linux dot ibm.com
2024-02-21  5:12 ` pinskia at gcc dot gnu.org

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).