Bug 204921 - devel/cmake: 3.4.0 fails to build with GCC 4.8+
Summary: devel/cmake: 3.4.0 fails to build with GCC 4.8+
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2015-11-30 21:28 UTC by mikhail.rokhin
Modified: 2015-12-02 11:00 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback? (kde)
koobs: merge-quarterly-


Attachments
Error logs (11.87 KB, application/x-zip-compressed)
2015-12-01 16:14 UTC, mikhail.rokhin
no flags Details
Error logs cmake-clang.zip (12.67 KB, application/x-zip-compressed)
2015-12-01 16:29 UTC, mikhail.rokhin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mikhail.rokhin 2015-11-30 21:28:22 UTC
Fails building after succ. bootsrapping in various places with error of undeclared type.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-01 03:15:08 UTC
@Mikhail

* Please include (as attachments please) the failing build logs for both GCC and Clang

* For future issue reports, please use "category/portname:" as a prefix of issue "summary" field, so that they are automatically assigned to the correct MAINTAINER
Comment 2 mikhail.rokhin 2015-12-01 16:14:45 UTC
Created attachment 163714 [details]
Error logs
Comment 3 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-12-01 16:20:24 UTC
Are you really able to reproduce this with any GCC or clang version, including the base ones? The log you've attached likely shows that GCC6 is stricter and requires an additional header inclusion.

I'm interested in the output you get when you use the default compiler for your FreeBSD version.
Comment 4 mikhail.rokhin 2015-12-01 16:29:34 UTC
Created attachment 163715 [details]
Error logs cmake-clang.zip
Comment 5 mikhail.rokhin 2015-12-01 16:31:47 UTC
(In reply to Raphael Kubo da Costa from comment #3)
Error logs cmake-clang.zip attachment is the default compiler output.
Comment 6 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-12-01 17:42:25 UTC
OK, the clang errors are caused by you using GCC to build all ports by default (like jsoncpp), so you end up with incompatibilities between libc++ and libstdc++. Given this, I'm tempted to retitle this bug report and make it specific to GCC6.
Comment 7 mikhail.rokhin 2015-12-01 20:37:48 UTC
(In reply to Raphael Kubo da Costa from comment #6)
Right you are, substituting dependency ports with clang-built avoids failure, when building with clang.
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-12-02 10:59:21 UTC
A commit references this bug:

Author: rakuco
Date: Wed Dec  2 10:58:51 UTC 2015
New revision: 402818
URL: https://svnweb.freebsd.org/changeset/ports/402818

Log:
  CMake: Add upstream patch to fix the build with recent GCCs.

  At least lang/gcc (4.8) and later were known to be broken like this:

  /usr/ports/devel/cmake/work/cmake-3.4.0/Source/cmArchiveWrite.h:93:23: error: 'mode_t' has not been declared
     void SetPermissions(mode_t permissions_)
                         ^
  /usr/ports/devel/cmake/work/cmake-3.4.0/Source/cmArchiveWrite.h:106:27: error: 'mode_t' has not been declared
     void SetPermissionsMask(mode_t permissionsMask_)
                             ^
  /usr/ports/devel/cmake/work/cmake-3.4.0/Source/cmArchiveWrite.h:179:26: error: 'mode_t' was not declared in this scope
     cmArchiveWriteOptional<mode_t> Permissions;
                            ^
  /usr/ports/devel/cmake/work/cmake-3.4.0/Source/cmArchiveWrite.h:179:32: error: template argument 1 is invalid
     cmArchiveWriteOptional<mode_t> Permissions;
                                  ^
  /usr/ports/devel/cmake/work/cmake-3.4.0/Source/cmArchiveWrite.h:180:26: error: 'mode_t' was not declared in this scope
     cmArchiveWriteOptional<mode_t> PermissionsMask;
                            ^
  /usr/ports/devel/cmake/work/cmake-3.4.0/Source/cmArchiveWrite.h:180:32: error: template argument 1 is invalid
     cmArchiveWriteOptional<mode_t> PermissionsMask;
                                  ^

  This was introduced in CMake 3.4.0, so there is no need for an MFH request.

  PR:		204921

Changes:
  head/devel/cmake/files/patch-git_16f5d184
  head/devel/cmake-gui/files/patch-git_16f5d184
Comment 9 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-12-02 10:59:43 UTC
Fixed, thank you for the report.