Bug 248726 - devel/cmake: fails to build on GCC architectures
Summary: devel/cmake: fails to build on GCC architectures
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Many People
Assignee: freebsd-kde (Team)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-18 12:13 UTC by Piotr Kubaj
Modified: 2020-08-18 15:11 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2020-08-18 12:13:14 UTC
No fix yet, as I just found it and am currently investigating. I'm reporting it now since it will affect probably all powerpc* users on stable branches.

On FreeBSD 12.1-RELEASE/powerpc64 with cmake 3.18.1:
In file included from /usr/local/lib/gcc9/include/c++/chrono:41,
                 from /wrkdirs/usr/ports/devel/cmake/work/cmake-3.18.1/Source/cmDuration.h:5,
                 from /wrkdirs/usr/ports/devel/cmake/work/cmake-3.18.1/Source/cmSystemTools.h:19,
                 from /wrkdirs/usr/ports/devel/cmake/work/cmake-3.18.1/Source/cmSystemTools.cxx:13:
/usr/local/lib/gcc9/include/c++/ctime:80:11: error: '::timespec_get' has not been declared
   80 |   using ::timespec_get;
      |           ^~~~~~~~~~~~
Comment 1 Piotr Kubaj freebsd_committer 2020-08-18 15:10:21 UTC
Looks like I figured it out on my own, closing.
Comment 2 commit-hook freebsd_committer 2020-08-18 15:11:07 UTC
A commit references this bug:

Author: pkubaj
Date: Tue Aug 18 15:10:09 UTC 2020
New revision: 545234
URL: https://svnweb.freebsd.org/changeset/ports/545234

Log:
  devel/cmake: fix build on GCC architectures

  Manually define __BSD_VISIBLE to make timespec_get() available:
  In file included from /usr/local/lib/gcc9/include/c++/chrono:41,
                   from /wrkdirs/usr/ports/devel/cmake/work/cmake-3.18.1/Source/cmDuration.h:5,
                   from /wrkdirs/usr/ports/devel/cmake/work/cmake-3.18.1/Source/cmSystemTools.h:19,
                   from /wrkdirs/usr/ports/devel/cmake/work/cmake-3.18.1/Source/cmSystemTools.cxx:13:
  /usr/local/lib/gcc9/include/c++/ctime:80:11: error: '::timespec_get' has not been declared
     80 |   using ::timespec_get;
        |           ^~~~~~~~~~~~

  PR:		248726

Changes:
  head/devel/cmake/Makefile