bugGNU nano - Bugs: bug #48262, when CFLAGS contains -Werror,...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #48262: when CFLAGS contains -Werror, ./configure fails to detect some functions

Submitter:  Benno Schulenberg <bens>
Submitted:  Sat 18 Jun 2016 02:03:42 PM UTC
   
 
Severity:  3 - Normal Status:  Wont Fix
Assigned to:  bens Open/Closed:  Closed

Wed 29 Jun 2016 01:31:00 PM UTC, comment #3: 

Apparently it is not a good idea to have -Werror in your global CFLAGS.  See https://lists.gnu.org/archive/html/nano-devel/2016-06/msg00116.html.  Other packages (like grep, for example) don't filter out or disarm -Werror during ./configure either, so there is little point in nano doing so.

Benno Schulenberg <bens>
Group administrator
Tue 21 Jun 2016 04:03:42 PM UTC, comment #2: 

adding -Werror to your compiler settings and then running configure is wrong and unsupported.  this isn't supported by really any autotools project.

Mike Frysinger <vapier>
Group Member
Tue 21 Jun 2016 10:23:52 AM UTC, comment #1: 

Proposed patch.

(file #37535)

Benno Schulenberg <bens>
Group administrator
Sat 18 Jun 2016 02:03:42 PM UTC, original submission:  

To reproduce, run these two commands:

CFLAGS="" ./configure  >blank 2>&1
CFLAGS="-Werror" ./configure  >werror 2>&1

Then look at 'diff blank werror | less', which shows this:

87,88c87,88
< checking for isblank... yes
< checking for strcasecmp... yes
---

> checking for isblank... no
> checking for strcasecmp... no

90c90
< checking for strncasecmp... yes
---

> checking for strncasecmp... no

92,97c92,97
< checking for snprintf... yes
< checking for vsnprintf... yes
< checking for iswalnum... yes
< checking for iswblank... yes
< checking for iswpunct... yes
< checking for iswspace... yes
---

> checking for snprintf... no
> checking for vsnprintf... no
> checking for iswalnum... no
> checking for iswblank... no
> checking for iswpunct... no
> checking for iswspace... no

103a104,107

> checking for pkg-config... /usr/local/bin/pkg-config
> checking for GLIB - version >= 2.0.0... yes (version 2.24.1)
> checking for pkg-config... (cached) /usr/local/bin/pkg-config
> checking for GLIB - version >= 2.0.0... yes (version 2.24.1)

106,107c110
< checking for vprintf... yes
< checking for _doprnt... no
---

> checking for vprintf... no

117a121,126

> configure: WARNING:
> * Insufficient UTF-8 support was detected in your curses and/or C
> * libraries.  If you want UTF-8 support, please verify that your slang
> * was built with UTF-8 support or your curses was built with wide
> * character support, and that your C library was built with wide
> * character support.

119,120c128,131
< checking for GNU-style word boundary regex support... yes
< checking whether _XOPEN_SOURCE_EXTENDED is needed... no
---

> checking for GNU-style word boundary regex support... no
> checking whether _XOPEN_SOURCE_EXTENDED is needed... not sure
> configure: WARNING: * Couldn't successfully compile basic color test with or without _XOPEN_SOURCE_EXTENDED
> configure: WARNING: * This build may not compile. Consider configuring with --disable-color or installing ncurses


Compilation then fails with this:

In file included from chars.c:26:
/usr/include/ctype.h:128: error: conflicting types for ‘nisblank’
proto.h:176: note: previous declaration of ‘nisblank’ was here
make[2]: * [chars.o] Error 1

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by vapier (Posted a comment)
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-30 bens Open/ClosedOpen Closed
    2016-06-29 bens StatusIn Progress Wont Fix
    2016-06-21 bens Attached File- Added 0001-build-prevent-Werror-from-interfering-with-configure.patch, #37535
        StatusNone In Progress
        Assigned toNone bens
    2016-06-20 bens Summarywhen CFLAGS contains -Werror, ./configure fails to detect curses when CFLAGS contains -Werror, ./configure fails to detect some functions

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code