Bug 197562 - security/libgpg-error : fails to build on gcc-5 due to new cpp functionality
Summary: security/libgpg-error : fails to build on gcc-5 due to new cpp functionality
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: Roman Bogorodskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-12 09:12 UTC by John Marino
Modified: 2015-04-02 07:41 UTC (History)
0 users

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


Attachments
Patch to set CPP to tradcpp (385 bytes, patch)
2015-02-12 19:06 UTC, John Marino
no flags Details | Diff

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-12 09:12:12 UTC
libgpg-error will not build on gcc-5.  This breaks 7950 ports directly or indirectly.  I know, impressive right?

Debian has run into this as well, I don't think they've fixed it yet.
https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1301822.html

One solution may be to use tradcpp instead of gcc-5's cpp.

The port of error log is follows.  If tradcpp solutions works, I'll post back but that will take a couple of days.

=========

gmake[3]: Entering directory '/wrkdirs/security/libgpg-error/work/libgpg-error-1.17/src'
/usr/bin/awk -f ./mkerrnos.awk ./errnos.in >code-to-errno.h
/usr/bin/awk -f ./mkerrcodes1.awk ./errnos.in >_mkerrcodes.h
cpp -I/usr/local/include  _mkerrcodes.h | grep GPG_ERR_ | \
               /usr/bin/awk -f ./mkerrcodes.awk >mkerrcodes.h
rm _mkerrcodes.h
cc -I. -I. -o mkerrcodes ./mkerrcodes.c
In file included from ./mkerrcodes.c:26:0:
./mkerrcodes.h:9:5: error: expected expression before ',' token
   { , "GPG_ERR_E2BIG" },
     ^
./mkerrcodes.h:10:5: error: expected expression before ',' token
   { , "GPG_ERR_EACCES" },
     ^
./mkerrcodes.h:11:5: error: expected expression before ',' token
   { , "GPG_ERR_EADDRINUSE" },
     ^
./mkerrcodes.h:12:5: error: expected expression before ',' token
   { , "GPG_ERR_EADDRNOTAVAIL" },
     ^
./mkerrcodes.h:13:5: error: expected expression before ',' token
   { , "GPG_ERR_EAFNOSUPPORT" },
     ^
./mkerrcodes.h:14:5: error: expected expression before ',' token
   { , "GPG_ERR_EAGAIN" },
     ^
./mkerrcodes.h:15:5: error: expected expression before ',' token
   { , "GPG_ERR_EALREADY" },
     ^
./mkerrcodes.h:16:5: error: expected expression before ',' token
   { , "GPG_ERR_EAUTH" },
     ^
./mkerrcodes.h:17:5: error: expected expression before ',' token
   { , "GPG_ERR_EBADF" },
     ^
./mkerrcodes.h:18:5: error: expected expression before ',' token
   { , "GPG_ERR_EBADMSG" },
     ^
./mkerrcodes.h:19:5: error: expected expression before ',' token
   { , "GPG_ERR_EBADRPC" },
     ^
./mkerrcodes.h:20:5: error: expected expression before ',' token
   { , "GPG_ERR_EBUSY" },
     ^
./mkerrcodes.h:21:5: error: expected expression before ',' token
   { , "GPG_ERR_ECANCELED" },
     ^
./mkerrcodes.h:22:5: error: expected expression before ',' token
   { , "GPG_ERR_ECHILD" },
     ^
./mkerrcodes.h:23:5: error: expected expression before ',' token
   { , "GPG_ERR_ECONNABORTED" },
     ^
./mkerrcodes.h:24:5: error: expected expression before ',' token
   { , "GPG_ERR_ECONNREFUSED" },
     ^
./mkerrcodes.h:25:5: error: expected expression before ',' token
   { , "GPG_ERR_ECONNRESET" },
     ^
./mkerrcodes.h:26:5: error: expected expression before ',' token
   { , "GPG_ERR_EDEADLK" },
     ^
./mkerrcodes.h:27:5: error: expected expression before ',' token
   { , "GPG_ERR_EDESTADDRREQ" },
     ^
./mkerrcodes.h:28:5: error: expected expression before ',' token
   { , "GPG_ERR_EDOM" },
     ^
./mkerrcodes.h:29:5: error: expected expression before ',' token
   { , "GPG_ERR_EDQUOT" },
     ^
./mkerrcodes.h:30:5: error: expected expression before ',' token
   { , "GPG_ERR_EEXIST" },
     ^
./mkerrcodes.h:31:5: error: expected expression before ',' token
   { , "GPG_ERR_EFAULT" },
     ^
./mkerrcodes.h:32:5: error: expected expression before ',' token
   { , "GPG_ERR_EFBIG" },
     ^
./mkerrcodes.h:33:5: error: expected expression before ',' token
   { , "GPG_ERR_EFTYPE" },
     ^
./mkerrcodes.h:34:5: error: expected expression before ',' token
   { , "GPG_ERR_EHOSTDOWN" },
     ^
./mkerrcodes.h:35:5: error: expected expression before ',' token
   { , "GPG_ERR_EHOSTUNREACH" },
     ^
./mkerrcodes.h:36:5: error: expected expression before ',' token
   { , "GPG_ERR_EIDRM" },
     ^
./mkerrcodes.h:37:5: error: expected expression before ',' token
   { , "GPG_ERR_EILSEQ" },
     ^
./mkerrcodes.h:38:5: error: expected expression before ',' token
   { , "GPG_ERR_EINPROGRESS" },
     ^
./mkerrcodes.h:39:5: error: expected expression before ',' token
   { , "GPG_ERR_EINTR" },
     ^
./mkerrcodes.h:40:5: error: expected expression before ',' token
   { , "GPG_ERR_EINVAL" },
     ^
./mkerrcodes.h:41:5: error: expected expression before ',' token
   { , "GPG_ERR_EIO" },
     ^
./mkerrcodes.h:42:5: error: expected expression before ',' token
   { , "GPG_ERR_EISCONN" },
     ^
./mkerrcodes.h:43:5: error: expected expression before ',' token
   { , "GPG_ERR_EISDIR" },
     ^
./mkerrcodes.h:44:5: error: expected expression before ',' token
   { , "GPG_ERR_ELOOP" },
     ^
./mkerrcodes.h:45:5: error: expected expression before ',' token
   { , "GPG_ERR_EMFILE" },
     ^
./mkerrcodes.h:46:5: error: expected expression before ',' token
   { , "GPG_ERR_EMLINK" },
     ^
./mkerrcodes.h:47:5: error: expected expression before ',' token
   { , "GPG_ERR_EMSGSIZE" },
     ^
./mkerrcodes.h:48:5: error: expected expression before ',' token
   { , "GPG_ERR_EMULTIHOP" },
     ^
./mkerrcodes.h:49:5: error: expected expression before ',' token
   { , "GPG_ERR_ENAMETOOLONG" },
     ^
./mkerrcodes.h:50:5: error: expected expression before ',' token
   { , "GPG_ERR_ENEEDAUTH" },
     ^
./mkerrcodes.h:51:5: error: expected expression before ',' token
   { , "GPG_ERR_ENETDOWN" },
     ^
./mkerrcodes.h:52:5: error: expected expression before ',' token
   { , "GPG_ERR_ENETRESET" },
     ^
./mkerrcodes.h:53:5: error: expected expression before ',' token
   { , "GPG_ERR_ENETUNREACH" },
     ^
./mkerrcodes.h:54:5: error: expected expression before ',' token
   { , "GPG_ERR_ENFILE" },
     ^
./mkerrcodes.h:55:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOBUFS" },
     ^
./mkerrcodes.h:56:5: error: expected expression before ',' token
   { , "GPG_ERR_ENODEV" },
     ^
./mkerrcodes.h:57:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOENT" },
     ^
./mkerrcodes.h:58:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOEXEC" },
     ^
./mkerrcodes.h:59:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOLCK" },
     ^
./mkerrcodes.h:60:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOLINK" },
     ^
./mkerrcodes.h:61:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOMEDIUM" },
     ^
./mkerrcodes.h:62:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOMEM" },
     ^
./mkerrcodes.h:63:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOMSG" },
     ^
./mkerrcodes.h:64:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOPROTOOPT" },
     ^
./mkerrcodes.h:65:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOSPC" },
     ^
./mkerrcodes.h:66:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOSYS" },
     ^
./mkerrcodes.h:67:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOTBLK" },
     ^
./mkerrcodes.h:68:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOTCONN" },
     ^
./mkerrcodes.h:69:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOTDIR" },
     ^
./mkerrcodes.h:70:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOTEMPTY" },
     ^
./mkerrcodes.h:71:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOTSOCK" },
     ^
./mkerrcodes.h:72:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOTSUP" },
     ^
./mkerrcodes.h:73:5: error: expected expression before ',' token
   { , "GPG_ERR_ENOTTY" },
     ^
./mkerrcodes.h:74:5: error: expected expression before ',' token
   { , "GPG_ERR_ENXIO" },
     ^
./mkerrcodes.h:75:5: error: expected expression before ',' token
   { , "GPG_ERR_EOPNOTSUPP" },
     ^
./mkerrcodes.h:76:5: error: expected expression before ',' token
   { , "GPG_ERR_EOVERFLOW" },
     ^
./mkerrcodes.h:77:5: error: expected expression before ',' token
   { , "GPG_ERR_EPERM" },
     ^
./mkerrcodes.h:78:5: error: expected expression before ',' token
   { , "GPG_ERR_EPFNOSUPPORT" },
     ^
./mkerrcodes.h:79:5: error: expected expression before ',' token
   { , "GPG_ERR_EPIPE" },
     ^
./mkerrcodes.h:80:5: error: expected expression before ',' token
   { , "GPG_ERR_EPROCLIM" },
     ^
./mkerrcodes.h:81:5: error: expected expression before ',' token
   { , "GPG_ERR_EPROCUNAVAIL" },
     ^
./mkerrcodes.h:82:5: error: expected expression before ',' token
   { , "GPG_ERR_EPROGMISMATCH" },
     ^
./mkerrcodes.h:83:5: error: expected expression before ',' token
   { , "GPG_ERR_EPROGUNAVAIL" },
     ^
./mkerrcodes.h:84:5: error: expected expression before ',' token
   { , "GPG_ERR_EPROTO" },
     ^
./mkerrcodes.h:85:5: error: expected expression before ',' token
   { , "GPG_ERR_EPROTONOSUPPORT" },
     ^
./mkerrcodes.h:86:5: error: expected expression before ',' token
   { , "GPG_ERR_EPROTOTYPE" },
     ^
./mkerrcodes.h:87:5: error: expected expression before ',' token
   { , "GPG_ERR_ERANGE" },
     ^
./mkerrcodes.h:88:5: error: expected expression before ',' token
   { , "GPG_ERR_EREMOTE" },
     ^
./mkerrcodes.h:89:5: error: expected expression before ',' token
   { , "GPG_ERR_EROFS" },
     ^
./mkerrcodes.h:90:5: error: expected expression before ',' token
   { , "GPG_ERR_ERPCMISMATCH" },
     ^
./mkerrcodes.h:91:5: error: expected expression before ',' token
   { , "GPG_ERR_ESHUTDOWN" },
     ^
./mkerrcodes.h:92:5: error: expected expression before ',' token
   { , "GPG_ERR_ESOCKTNOSUPPORT" },
     ^
./mkerrcodes.h:93:5: error: expected expression before ',' token
   { , "GPG_ERR_ESPIPE" },
     ^
./mkerrcodes.h:94:5: error: expected expression before ',' token
   { , "GPG_ERR_ESRCH" },
     ^
./mkerrcodes.h:95:5: error: expected expression before ',' token
   { , "GPG_ERR_ESTALE" },
     ^
./mkerrcodes.h:96:5: error: expected expression before ',' token
   { , "GPG_ERR_ETIMEDOUT" },
     ^
./mkerrcodes.h:97:5: error: expected expression before ',' token
   { , "GPG_ERR_ETOOMANYREFS" },
     ^
./mkerrcodes.h:98:5: error: expected expression before ',' token
   { , "GPG_ERR_ETXTBSY" },
     ^
./mkerrcodes.h:99:5: error: expected expression before ',' token
   { , "GPG_ERR_EUSERS" },
     ^
./mkerrcodes.h:100:5: error: expected expression before ',' token
   { , "GPG_ERR_EWOULDBLOCK" },
     ^
./mkerrcodes.h:101:5: error: expected expression before ',' token
   { , "GPG_ERR_EXDEV" },
     ^
Makefile:1190: recipe for target 'mkerrcodes' failed
gmake[3]: *** [mkerrcodes] Error 1
gmake[3]: Leaving directory '/wrkdirs/security/libgpg-error/work/libgpg-error-1.17/src'
Makefile:403: recipe for target 'all-recursive' failed
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/security/libgpg-error/work/libgpg-error-1.17'
Makefile:334: recipe for target 'all' failed
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory '/wrkdirs/security/libgpg-error/work/libgpg-error-1.17'
*** Error code 1

Stop.
make: stopped in /usr/ports/security/libgpg-error
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-12 09:12:12 UTC
Auto-assigned to maintainer novel@FreeBSD.org
Comment 2 John Marino freebsd_committer freebsd_triage 2015-02-12 19:06:49 UTC
Created attachment 152914 [details]
Patch to set CPP to tradcpp

This patch fixes the build with gcc-5 for me, and bapt@ agrees it's the right fix.
Comment 3 John Marino freebsd_committer freebsd_triage 2015-02-23 10:01:41 UTC
novel, this PR times out in 3 days.  If there's no activity on this PR before then I'll commit the patch.
Comment 4 Roman Bogorodskiy freebsd_committer freebsd_triage 2015-02-23 15:03:30 UTC
Please go ahead and commit, I'll not be able to get to it sooner than the next weekend anyway.
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-03-01 16:53:01 UTC
A commit references this bug:

Author: marino
Date: Sun Mar  1 16:52:44 UTC 2015
New revision: 380211
URL: https://svnweb.freebsd.org/changeset/ports/380211

Log:
  security/libgpg-error: Switch cpp to support gcc-5

  This port relies on CPP behavior that changes on GCC 5.  To ensure
  libgpg-error keeps building on the newest GCC, add a build dependency
  on tradcpp and use it instead.

  PR:		197562
  Submitted by:	marino
  Approved by:	maintainer (novel)

Changes:
  head/security/libgpg-error/Makefile
Comment 6 John Marino freebsd_committer freebsd_triage 2015-03-01 16:54:08 UTC
thanks, done.
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-03-01 17:42:11 UTC
A commit references this bug:

Author: marino
Date: Sun Mar  1 17:41:46 UTC 2015
New revision: 380217
URL: https://svnweb.freebsd.org/changeset/ports/380217

Log:
  security/libgpg-error: Revert use of tradcpp (F11 regression)

  With the previous change, libgpg-error does not pass configure target
  on FreeBSD 11 due tradcpp failing "sanity checks".  This is a regression
  since this port builds fine on FreeBSD 10.  However, 2037 ports get
  skipped (this port is *way* too important) as a result, so revert the
  gcc-5 fix until a solution can be found.

  PR:		197562

Changes:
  head/security/libgpg-error/Makefile
Comment 8 John Marino freebsd_committer freebsd_triage 2015-03-01 17:43:01 UTC
re-open, commit got reverted due to F11 regression
Comment 9 John Marino freebsd_committer freebsd_triage 2015-04-02 07:41:51 UTC
bofh tested a different fix, "CPP+= -P" for me on 8 platforms: 8,9,10,11 x i386,amd64.  It worked.

I was going to commit it today, then I noticed it accidentally got committed with the PTHREAD_LIBS removal commit.  I honestly don't know how that happened but it clearly did.

Anyway, the fix has been in place for a week already, it didn't break anything, so I'm closing the PR.  The main problem is that commit message is wrong.