Bug 251057 - graphics/s2: fails to build on aarch64
Summary: graphics/s2: fails to build on aarch64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-11 18:49 UTC by Mikael Urankar
Modified: 2020-11-15 18:26 UTC (History)
1 user (show)

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


Attachments
v1 (1.62 KB, patch)
2020-11-11 18:49 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2020-11-11 18:49:59 UTC
Created attachment 219571 [details]
v1

on aarch64 13-current, clang 11

/usr/local/libexec/ccache/c++  -DS2_USE_GFLAGS -DS2_USE_GLOG -Ds2_EXPORTS -I/usr/ports/graphics/s2/work/s2geometry-0.9.0/src -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -fPIC   -Wno-attributes -Wno-deprecated-declarations -std=c++11 -MD -MT CMakeFiles/s2.dir/src/s2/s2lax_polygon_shape.cc.o -MF CMakeFiles/s2.dir/src/s2/s2lax_polygon_shape.cc.o.d -o CMakeFiles/s2.dir/src/s2/s2lax_polygon_shape.cc.o -c /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/s2lax_polygon_shape.cc
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/s2lax_polygon_shape.cc:18:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/s2lax_polygon_shape.h:25:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/encoded_s2point_vector.h:23:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/encoded_string_vector.h:25:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/encoded_uint_vector.h:23:
/usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/third_party/absl/base/internal/unaligned_access.h:289:8: error: unknown type name 'uint64'; did you mean 'uint64_t'?
inline uint64 UnalignedLoad64(const void *p) {
       ^~~~~~
       uint64_t
/usr/include/sys/endian.h:54:20: note: 'uint64_t' declared here
typedef __uint64_t      uint64_t;
                        ^
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/s2lax_polygon_shape.cc:18:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/s2lax_polygon_shape.h:25:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/encoded_s2point_vector.h:23:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/encoded_string_vector.h:25:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/encoded_uint_vector.h:23:
/usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/third_party/absl/base/internal/unaligned_access.h:290:3: error: unknown type name 'uint64'; did you mean 'uint64_t'?
  uint64 t;
  ^~~~~~
  uint64_t
/usr/include/sys/endian.h:54:20: note: 'uint64_t' declared here
typedef __uint64_t      uint64_t;
                        ^
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/s2lax_polygon_shape.cc:18:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/s2lax_polygon_shape.h:25:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/encoded_s2point_vector.h:23:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/encoded_string_vector.h:25:
In file included from /usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/encoded_uint_vector.h:23:
/usr/ports/graphics/s2/work/s2geometry-0.9.0/src/s2/third_party/absl/base/internal/unaligned_access.h:299:39: error: unknown type name 'uint64'; did you mean 'uint64_t'?
inline void UnalignedStore64(void *p, uint64 v) { memcpy(p, &v, sizeof v); }
                                      ^~~~~~
                                      uint64_t
/usr/include/sys/endian.h:54:20: note: 'uint64_t' declared here
typedef __uint64_t      uint64_t;


upstream has the correct type:
https://github.com/abseil/abseil-cpp/blob/master/absl/base/internal/unaligned_access.h#L114
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-11-15 18:17:15 UTC
A commit references this bug:

Author: sunpoet
Date: Sun Nov 15 18:13:37 UTC 2020
New revision: 555412
URL: https://svnweb.freebsd.org/changeset/ports/555412

Log:
  Fix build on aarch64

  PR:		251057
  Submitted by:	mikael

Changes:
  head/graphics/s2/files/patch-src-s2-third_party-absl-base-internal-unaligned_access.h
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-11-15 18:26:12 UTC
Committed. Thanks!