Project

General

Profile

Actions

Bug #2419

closed

wscript misdetects availability of functions for conditional compilation (getpass, setegid, ...)

Added by Davide Pesavento almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
High
Category:
Build
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

The test program generated by waf for getpass is:

#include <unistd.h>

int main(int argc, char **argv) {
        void *p;
        (void)argc; (void)argv;
        p=(void*)(getpass);
        return 0;
}

which fails to compile with our debug CXXFLAGS due to the presence of -Werror:

['/usr/bin/g++', '-pedantic', '-Wall', '-O0', '-g3', '-Werror', '-Wno-error=maybe-uninitialized', '-Og', '-fdiagnostics-color', '-std=c++11', '-D_DEBUG', '-DHAVE_IS_DEFAULT_CONSTRUCTIBLE=1', '-DHAVE_IS_MOVE_CONSTRUCTIBLE=1', '-DHAVE_IS_MOVE_ASSIGNABLE=1', '-DHAVE_CXX_FRIEND_TYPENAME=1', '-DHAVE_PTHREAD=1', '-DHAVE_RT=1', '../test.cpp', '-c', '-o', '/home/davide/ndn-cxx/build/.conf_check_cb65f796106d255f157c14cc65e54028/testbuild/test.cpp.1.o']
err: ../test.cpp: In function ‘int main(int, char**)’:
../test.cpp:4:8: error: variable ‘p’ set but not used [-Werror=unused-but-set-variable]
  void *p;
        ^
cc1plus: all warnings being treated as errors

This is a regression introduced in commit a2ada22022bc8aebc5c4b36753ee5935443f480c


Related issues 3 (1 open2 closed)

Related to ndn-cxx - Bug #4157: ndnsec-export: confusing error message when getpass is unavailableNew

Actions
Related to NFD - Bug #4296: Xcode >= 9.0 triggers -Wundefined-func-template warnings/errors in boost headersClosedAlex Afanasyev

Actions
Has duplicate NFD - Bug #2448: waf does not find setegid when configured in debug mode in Ubuntu 14.04Closed

Actions
Actions

Also available in: Atom PDF