Bug 243995 - devel/py-grpcio: fix build on powerpc64 elfv2
Summary: devel/py-grpcio: fix build on powerpc64 elfv2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: Vanilla I. Shu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-09 00:10 UTC by Piotr Kubaj
Modified: 2020-02-09 17:20 UTC (History)
2 users (show)

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


Attachments
patch (2.27 KB, patch)
2020-02-09 00:10 UTC, Piotr Kubaj
no flags Details | Diff
patch (2.29 KB, patch)
2020-02-09 00:11 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (vanilla)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2020-02-09 00:10:14 UTC
Created attachment 211489 [details]
patch

Clang doesn't have sys/platform/ppc.h:
cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -Ithird_party/boringssl/include -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -maltivec -mvsx -isystem /usr/local/include -fPIC -DOPENSSL_NO_ASM=1 -D_WIN32_WINNT=1536 -DGPR_BACKWARDS_COMPATIBILITY_MODE=1 -DHAVE_CONFIG_H=1 -DGRPC_ENABLE_FORK_SUPPORT=1 -Isrc/python/grpcio -Iinclude -I. -Ithird_party/abseil-cpp -Ithird_party/address_sorting/include -I/usr/include -Ithird_party/boringssl/include -Ithird_party/upb -Isrc/core/ext/upb-generated -I/usr/include -I/usr/local/include/python3.7m -c third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc -o python_build/temp.freebsd-13.0-CURRENT-powerpc-3.7/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.o -std=c++11 -pthread
third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc:24:10: fatal error: 'sys/platform/ppc.h' file not found
#include <sys/platform/ppc.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.

__ppc_get_timebase() and __ppc_get_timebase_freq() are not supported on FreeBSD.
Comment 1 Piotr Kubaj freebsd_committer 2020-02-09 00:11:28 UTC
Created attachment 211490 [details]
patch

Also include sys/types.h.
Comment 2 Vanilla I. Shu freebsd_committer 2020-02-09 02:01:13 UTC
Approved, please feel free to commit, thanks.
Comment 3 commit-hook freebsd_committer 2020-02-09 11:20:06 UTC
A commit references this bug:

Author: pkubaj
Date: Sun Feb  9 11:19:47 UTC 2020
New revision: 525649
URL: https://svnweb.freebsd.org/changeset/ports/525649

Log:
  devel/py-grpcio: fix build on powerpc64 elfv2

  Clang doesn't have sys/platform/ppc.h:
  cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -Ithird_party/boringssl/include -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -maltivec -mvsx -isystem /usr/local/include -fPIC -DOPENSSL_NO_ASM=1 -D_WIN32_WINNT=1536 -DGPR_BACKWARDS_COMPATIBILITY_MODE=1 -DHAVE_CONFIG_H=1 -DGRPC_ENABLE_FORK_SUPPORT=1 -Isrc/python/grpcio -Iinclude -I. -Ithird_party/abseil-cpp -Ithird_party/address_sorting/include -I/usr/include -Ithird_party/boringssl/include -Ithird_party/upb -Isrc/core/ext/upb-generated -I/usr/include -I/usr/local/include/python3.7m -c third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc -o python_build/temp.freebsd-13.0-CURRENT-powerpc-3.7/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.o -std=c++11 -pthread
  third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc:24:10: fatal error: 'sys/platform/ppc.h' file not found
  #include <sys/platform/ppc.h>
           ^~~~~~~~~~~~~~~~~~~~
  1 error generated.

  __ppc_get_timebase() and __ppc_get_timebase_freq() are not supported on FreeBSD.

  PR:		243995
  Approved by:	vanilla (maintainer)

Changes:
  head/devel/py-grpcio/files/patch-third__party_abseil-cpp_absl_base_internal_unscaledcycleclock.cc
Comment 4 commit-hook freebsd_committer 2020-02-09 17:20:40 UTC
A commit references this bug:

Author: pkubaj
Date: Sun Feb  9 17:20:06 UTC 2020
New revision: 525666
URL: https://svnweb.freebsd.org/changeset/ports/525666

Log:
  devel/pecl-grpc: fix build on powerpc64 elfv2

  Clang doesn't have sys/platform/ppc.h:
  /wrkdirs/usr/ports/devel/pecl-grpc/work-php74/grpc-1.27.0/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc:24:10: fatal error: 'sys/platform/ppc.h' file not found
  #include <sys/platform/ppc.h>
           ^~~~~~~~~~~~~~~~~~~~
  1 error generated.

  __ppc_get_timebase() and __ppc_get_timebase_freq() are not supported on FreeBSD.

  PR:		243995
  Approved by:	vanilla (maintainer)

Changes:
  head/devel/pecl-grpc/files/patch-third__party_abseil-cpp_absl_base_internal_unscaledcycleclock.cc