Bug 197785 - security/libssh : won't build with -Wpedantic on gcc-5
Summary: security/libssh : won't build with -Wpedantic on gcc-5
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dima Panov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-18 09:11 UTC by John Marino
Modified: 2015-02-21 22:09 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (fluffy)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Marino freebsd_committer freebsd_triage 2015-02-18 09:11:51 UTC
gcc-5 adjusted the gcc interpretation of pedantic, which libssh violates (see below).  Is there a fix upstream?  Or should -Werror or -Wpedantic flag be removed?


--- src/CMakeFiles/ssh_static.dir/agent.c.o ---
In file included from /wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:53:0:
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c: In function 'ssh_set_agent_channel':
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:200:33: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)
                                 ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:181:5: note: in expansion of macro 'ssh_set_error'
     ssh_set_error(session, SSH_REQUEST_DENIED, "Session has no active agent");
     ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c: In function 'agent_talk':
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:182:24: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
                        ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:260:3: note: in expansion of macro 'SSH_LOG'
   SSH_LOG(SSH_LOG_TRACE, "Request length: %u", len);
   ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:182:24: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
                        ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:267:7: note: in expansion of macro 'SSH_LOG'
       SSH_LOG(SSH_LOG_WARN, "atomicio sending request failed: %s",
       ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:182:24: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
                        ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:272:5: note: in expansion of macro 'SSH_LOG'
     SSH_LOG(SSH_LOG_WARN,
     ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:182:24: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
                        ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:280:5: note: in expansion of macro 'SSH_LOG'
     SSH_LOG(SSH_LOG_WARN, "atomicio read response length failed: %s",
     ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:200:33: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)
                                 ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:287:5: note: in expansion of macro 'ssh_set_error'
     ssh_set_error(session, SSH_FATAL,
     ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:182:24: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
                        ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:291:3: note: in expansion of macro 'SSH_LOG'
   SSH_LOG(SSH_LOG_TRACE, "Response length: %u", len);
   ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:182:24: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
                        ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:299:7: note: in expansion of macro 'SSH_LOG'
       SSH_LOG(SSH_LOG_WARN,
       ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:182:24: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
                        ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:304:7: note: in expansion of macro 'SSH_LOG'
       SSH_LOG(SSH_LOG_WARN, "Not enough space");
       ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c: In function 'ssh_agent_get_ident_count':
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:207:31: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_set_error_oom(error, __FUNCTION__)
                               ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:337:7: note: in expansion of macro 'ssh_set_error_oom'
       ssh_set_error_oom(session);
       ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:207:31: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_set_error_oom(error, __FUNCTION__)
                               ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:341:7: note: in expansion of macro 'ssh_set_error_oom'
       ssh_set_error_oom(session);
       ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:200:33: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)
                                 ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:349:5: note: in expansion of macro 'ssh_set_error'
     ssh_set_error(session, SSH_FATAL, "Not enough space");
     ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:200:33: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)
                                 ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:363:5: note: in expansion of macro 'ssh_set_error'
     ssh_set_error(session, SSH_FATAL,
     ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:182:24: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
                        ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:369:3: note: in expansion of macro 'SSH_LOG'
   SSH_LOG(SSH_LOG_WARN,
   ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:200:33: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)
                                 ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:377:7: note: in expansion of macro 'ssh_set_error'
       ssh_set_error(session, SSH_FATAL,
       ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:182:24: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
                        ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:385:3: note: in expansion of macro 'SSH_LOG'
   SSH_LOG(SSH_LOG_DEBUG, "Agent count: %d",
   ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:200:33: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)
                                 ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:388:5: note: in expansion of macro 'ssh_set_error'
     ssh_set_error(session, SSH_FATAL,
     ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c: In function 'ssh_agent_sign_data':
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:182:24: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
                        ^
/wrkdirs/security/libssh/work/libssh-0.6.3/src/agent.c:560:9: note: in expansion of macro 'SSH_LOG'
         SSH_LOG(SSH_LOG_WARN, "Agent reports failure in signing the key");
         ^
/wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:200:33: error: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
     _ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)
                                 ^
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-18 09:11:51 UTC
Auto-assigned to maintainer fluffy@FreeBSD.org
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-02-21 22:06:32 UTC
A commit references this bug:

Author: marino
Date: Sat Feb 21 22:06:01 UTC 2015
New revision: 379559
URL: https://svnweb.freebsd.org/changeset/ports/379559

Log:
  devel/libssh: Remove -pedantic-error flags and reset port

  This port breaks if it violates standards according to the -pedantic flag.
  Accord to gcc-5, it indeed does with dozens of warnings like this:

  /wrkdirs/security/libssh/work/libssh-0.6.3/include/libssh/priv.h:200:33:
    error: ISO C does not support '__FUNCTION__' predefined identifier
    [-Wpedantic] _ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)

  The maintainer has been MIA for over a year with PRs on 8 ports.  I'm not
  waiting for this one to time out too.  While here, reset MAINTAINER.

  PR:		197785
  Submitted by:	marino
  Approved by:	maintainer reset

Changes:
  head/security/libssh/Makefile
Comment 3 John Marino freebsd_committer freebsd_triage 2015-02-21 22:09:58 UTC
I fixed it with sed to remove -pedantic-errors.  Port maintainer was also reset based on history (no commits in over 1 year, 8 ports with open PRs)