ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 7449] New: Building Wireshark with '-O0 -D_FORTIFY_SOURCE=

Date: Sat, 7 Jul 2012 15:29:43 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7449

           Summary: Building Wireshark with  '-O0 -D_FORTIFY_SOURCE=2 ...'
                    fails
           Product: Wireshark
           Version: unspecified
          Platform: x86
        OS/Version: Fedora
            Status: ASSIGNED
          Severity: Minor
          Priority: Low
         Component: Wireshark
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: wmeier@xxxxxxxxxxx


Build Information:

--
The warning [error] message:

/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires
compiling with optimization (-O) [-Werror=cpp]`


A bit of research shows that this warning was added to a recent version of
glibc (on at least Fedora).

 See: http://sourceware.org/bugzilla/show_bug.cgi?id=13979

The warning message occurs if -D_FORTIFY_SOURCE=... is used and the gcc
'optimization level' == 0 (-O0).

Unfortunately when building with -O0 this warning message:

1. Causes compiles to fail (if -Werror [stop  on warning])
2. Causes ./configure to fail with an (incorrect) message
   about the pcap header being older than the libpcap version.


I will commit a fix shortly for configure to use -D_FORTIFY_SOURCE=2 only if
the gcc 'optimization level' is > 0.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.