Bug 231835 - devel/googletest: fix build on GCC-based architectures
Summary: devel/googletest: fix build on GCC-based architectures
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: Jan Beich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-30 23:36 UTC by Piotr Kubaj
Modified: 2018-10-01 01:59 UTC (History)
2 users (show)

See Also:
jbeich: maintainer-feedback+


Attachments
patch (398 bytes, patch)
2018-09-30 23:36 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2018-09-30 23:36:33 UTC
Created attachment 197650 [details]
patch

USES=compiler:c++11-lang is necessary to fix build on architectures that use GCC in base.

Tested on powerpc64 and amd64.

Hardware sponsored by IntegriCloud.
Comment 1 Nathan 2018-09-30 23:43:58 UTC
As I posted in bug#231834 please find alternative or atleast make it where it doesn't break mips-based archs. Like previous way I did to only target certain archs that need it and not all archs
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-10-01 00:14:09 UTC
A commit references this bug:

Author: jbeich
Date: Mon Oct  1 00:13:17 UTC 2018
New revision: 480987
URL: https://svnweb.freebsd.org/changeset/ports/480987

Log:
  devel/googletest: unbreak on GCC architectures after r478607

  In file included from ./include/gtest/gtest.h:59,
                   from src/gtest_main.cc:31:
  ./include/gtest/internal/gtest-internal.h:657: error: expected ',' or '...' before '>' token
  ./include/gtest/internal/gtest-internal.h:657: error: parse error in template argument list
  ./include/gtest/internal/gtest-internal.h:657: error: default argument missing for parameter 7 of 'static bool testing::internal::TypeParameterizedTest<Fixture, TestSel, Types>::Register(const char*, const testing::internal::CodeLocation&, const char*, const char*, int, const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, Types)'

  In file included from src/gtest_main.cc:31:
  In file included from ./include/gtest/gtest.h:59:
  ./include/gtest/internal/gtest-internal.h:947:44: error: no member named 'declval' in namespace 'std'
            class Iterator = decltype(::std::declval<const C&>().begin()),
                                      ~~~~~~~^
  ./include/gtest/internal/gtest-internal.h:947:52: error: expected expression
            class Iterator = decltype(::std::declval<const C&>().begin()),
                                                     ^
  ./include/gtest/internal/gtest-internal.h:948:35: error: no member named 'declval' in namespace 'std'
            class = decltype(::std::declval<const C&>().end()),
                             ~~~~~~~^
  ./include/gtest/internal/gtest-internal.h:948:43: error: expected expression
            class = decltype(::std::declval<const C&>().end()),
                                            ^
  ./include/gtest/internal/gtest-internal.h:949:37: error: no member named 'declval' in namespace 'std'
            class = decltype(++::std::declval<Iterator&>()),
                               ~~~~~~~^
  ./include/gtest/internal/gtest-internal.h:949:45: error: 'Iterator' does not refer to a value
            class = decltype(++::std::declval<Iterator&>()),
                                              ^
  ./include/gtest/internal/gtest-internal.h:947:17: note: declared here
            class Iterator = decltype(::std::declval<const C&>().begin()),
                  ^
  ./include/gtest/internal/gtest-internal.h:949:54: error: expected expression
            class = decltype(++::std::declval<Iterator&>()),
                                                       ^
  ./include/gtest/internal/gtest-internal.h:949:56: error: expected expression
            class = decltype(++::std::declval<Iterator&>()),
                                                         ^
  ./include/gtest/internal/gtest-internal.h:950:36: error: no member named 'declval' in namespace 'std'
            class = decltype(*::std::declval<Iterator>()),
                              ~~~~~~~^
  ./include/gtest/internal/gtest-internal.h:950:44: error: 'Iterator' does not refer to a value
            class = decltype(*::std::declval<Iterator>()),
                                             ^
  ./include/gtest/internal/gtest-internal.h:947:17: note: declared here
            class Iterator = decltype(::std::declval<const C&>().begin()),
                  ^
  ./include/gtest/internal/gtest-internal.h:950:54: error: expected expression
            class = decltype(*::std::declval<Iterator>()),
                                                       ^

  PR:		231835
  Submitted by:	Piotr Kubaj (based on)

Changes:
  head/devel/googletest/Makefile
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-10-01 00:18:15 UTC
A commit references this bug:

Author: jbeich
Date: Mon Oct  1 00:17:59 UTC 2018
New revision: 480988
URL: https://svnweb.freebsd.org/changeset/ports/480988

Log:
  MFH: r480987

  devel/googletest: unbreak on GCC architectures after r478607

  In file included from ./include/gtest/gtest.h:59,
                   from src/gtest_main.cc:31:
  ./include/gtest/internal/gtest-internal.h:657: error: expected ',' or '...' before '>' token
  ./include/gtest/internal/gtest-internal.h:657: error: parse error in template argument list
  ./include/gtest/internal/gtest-internal.h:657: error: default argument missing for parameter 7 of 'static bool testing::internal::TypeParameterizedTest<Fixture, TestSel, Types>::Register(const char*, const testing::internal::CodeLocation&, const char*, const char*, int, const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, Types)'

  In file included from src/gtest_main.cc:31:
  In file included from ./include/gtest/gtest.h:59:
  ./include/gtest/internal/gtest-internal.h:947:44: error: no member named 'declval' in namespace 'std'
            class Iterator = decltype(::std::declval<const C&>().begin()),
                                      ~~~~~~~^
  ./include/gtest/internal/gtest-internal.h:947:52: error: expected expression
            class Iterator = decltype(::std::declval<const C&>().begin()),
                                                     ^
  ./include/gtest/internal/gtest-internal.h:948:35: error: no member named 'declval' in namespace 'std'
            class = decltype(::std::declval<const C&>().end()),
                             ~~~~~~~^
  ./include/gtest/internal/gtest-internal.h:948:43: error: expected expression
            class = decltype(::std::declval<const C&>().end()),
                                            ^
  ./include/gtest/internal/gtest-internal.h:949:37: error: no member named 'declval' in namespace 'std'
            class = decltype(++::std::declval<Iterator&>()),
                               ~~~~~~~^
  ./include/gtest/internal/gtest-internal.h:949:45: error: 'Iterator' does not refer to a value
            class = decltype(++::std::declval<Iterator&>()),
                                              ^
  ./include/gtest/internal/gtest-internal.h:947:17: note: declared here
            class Iterator = decltype(::std::declval<const C&>().begin()),
                  ^
  ./include/gtest/internal/gtest-internal.h:949:54: error: expected expression
            class = decltype(++::std::declval<Iterator&>()),
                                                       ^
  ./include/gtest/internal/gtest-internal.h:949:56: error: expected expression
            class = decltype(++::std::declval<Iterator&>()),
                                                         ^
  ./include/gtest/internal/gtest-internal.h:950:36: error: no member named 'declval' in namespace 'std'
            class = decltype(*::std::declval<Iterator>()),
                              ~~~~~~~^
  ./include/gtest/internal/gtest-internal.h:950:44: error: 'Iterator' does not refer to a value
            class = decltype(*::std::declval<Iterator>()),
                                             ^
  ./include/gtest/internal/gtest-internal.h:947:17: note: declared here
            class Iterator = decltype(::std::declval<const C&>().begin()),
                  ^
  ./include/gtest/internal/gtest-internal.h:950:54: error: expected expression
            class = decltype(*::std::declval<Iterator>()),
                                                       ^

  PR:		231835
  Submitted by:	Piotr Kubaj (based on)
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q3/
  branches/2018Q3/devel/googletest/Makefile
Comment 4 Jan Beich freebsd_committer freebsd_triage 2018-10-01 00:23:01 UTC
Please, don't forget error logs. If I can't reproduce it may delay review in future.

(In reply to Nathan from comment #1)
> make it where it doesn't break mips-based archs

mips64 should stop delaying Clang switch[1] or bring lang/gcc* support.

[1] https://lists.freebsd.org/pipermail/freebsd-arch/2017-October/018394.html
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-10-01 00:31:27 UTC
A commit references this bug:

Author: jbeich
Date: Mon Oct  1 00:31:09 UTC 2018
New revision: 480989
URL: https://svnweb.freebsd.org/changeset/ports/480989

Log:
  devel/googletest: oops, builds fine with clang++ -stdlib=libstdc++ -std=gnu++03

  FreeBSD 9.x defaulted to GCC 4.2 but could use Clang, so c++11-lang
  used Clang while c++11-lib use lang/gcc* bun nowadays the difference
  no longer exists. While testing previous change I forgot to account
  that newer Clang versions have switched to C++14 by default while
  libstdc++ 4.2 doesn't support C++11 or newer.

  PR:		231835

Changes:
  head/devel/googletest/Makefile
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-10-01 00:32:31 UTC
A commit references this bug:

Author: jbeich
Date: Mon Oct  1 00:31:44 UTC 2018
New revision: 480990
URL: https://svnweb.freebsd.org/changeset/ports/480990

Log:
  MFH: r480989

  devel/googletest: oops, builds fine with clang++ -stdlib=libstdc++ -std=gnu++03

  FreeBSD 9.x defaulted to GCC 4.2 but could use Clang, so c++11-lang
  used Clang while c++11-lib use lang/gcc* bun nowadays the difference
  no longer exists. While testing previous change I forgot to account
  that newer Clang versions have switched to C++14 by default while
  libstdc++ 4.2 doesn't support C++11 or newer.

  PR:		231835
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q3/
  branches/2018Q3/devel/googletest/Makefile
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-10-01 00:37:37 UTC
A commit references this bug:

Author: jbeich
Date: Mon Oct  1 00:36:38 UTC 2018
New revision: 480991
URL: https://svnweb.freebsd.org/changeset/ports/480991

Log:
  devel/googlemock: unbreak on GCC architectures

  In file included from /usr/local/include/gtest/gtest.h:59,
                   from ./include/gmock/internal/gmock-internal-utils.h:47,
                   from ./include/gmock/gmock-actions.h:47,
                   from ./include/gmock/gmock.h:59,
                   from src/gmock_main.cc:32:
  /usr/local/include/gtest/internal/gtest-internal.h:657: error: expected ',' or '...' before '>' token
  /usr/local/include/gtest/internal/gtest-internal.h:657: error: parse error in template argument list
  /usr/local/include/gtest/internal/gtest-internal.h:657: error: default argument missing for parameter 7 of 'static bool testing::internal::TypeParameterizedTest<Fixture, TestSel, Types>::Register(const char*, const testing::internal::CodeLocation&, const char*, const char*, int, const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, Types)'

  PR:		231835

Changes:
  head/devel/googlemock/Makefile
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-10-01 00:37:39 UTC
A commit references this bug:

Author: jbeich
Date: Mon Oct  1 00:37:29 UTC 2018
New revision: 480992
URL: https://svnweb.freebsd.org/changeset/ports/480992

Log:
  MFH: r480991

  devel/googlemock: unbreak on GCC architectures

  In file included from /usr/local/include/gtest/gtest.h:59,
                   from ./include/gmock/internal/gmock-internal-utils.h:47,
                   from ./include/gmock/gmock-actions.h:47,
                   from ./include/gmock/gmock.h:59,
                   from src/gmock_main.cc:32:
  /usr/local/include/gtest/internal/gtest-internal.h:657: error: expected ',' or '...' before '>' token
  /usr/local/include/gtest/internal/gtest-internal.h:657: error: parse error in template argument list
  /usr/local/include/gtest/internal/gtest-internal.h:657: error: default argument missing for parameter 7 of 'static bool testing::internal::TypeParameterizedTest<Fixture, TestSel, Types>::Register(const char*, const testing::internal::CodeLocation&, const char*, const char*, int, const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, Types)'

  PR:		231835
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q3/
  branches/2018Q3/devel/googlemock/Makefile
Comment 9 commit-hook freebsd_committer freebsd_triage 2018-10-01 01:59:43 UTC
A commit references this bug:

Author: jbeich
Date: Mon Oct  1 01:59:35 UTC 2018
New revision: 480995
URL: https://svnweb.freebsd.org/changeset/ports/480995

Log:
  devel/google{test,mock}: back out r480988, r480990, r480991

  The ports still build fine with GCC 4.2 as 2018Q3 lacks r478607.

  PR:		231835
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q3/
  branches/2018Q3/devel/googlemock/Makefile
  branches/2018Q3/devel/googletest/Makefile