Skip to content

Commit

Permalink
ARROW-7804: [C++][R] Compile error on macOS 10.11
Browse files Browse the repository at this point in the history
This fixes the uninitialized variables and updates the `macos-r-autobrew` crossbow job to test on macOS 10.11, which is what CRAN uses.

Closes #6388 from nealrichardson/el-capitan and squashes the following commits:

8a95569 <Neal Richardson> Comments to explain this archaic mess
8f821c8 <Neal Richardson> Revert "Correct hack (revert me)"
50d9835 <Neal Richardson> Remove checks that require LaTeX
6d3afb3 <Neal Richardson> Fix hack for ancient xcode
dea999f <Neal Richardson> Try older xcode
58b9a1d <Neal Richardson> Correct hack (revert me)
81b1a79 <Neal Richardson> Revert "Hack to test cpp change (revert me)"
5ab13be <Neal Richardson> Hack to test cpp change (revert me)
7e24a84 <Neal Richardson> Attempt to fix compilation error
6bd6566 <Neal Richardson> No TeX
e979b57 <Neal Richardson> Use old xcode on Travis to match CRAN's macOS 10.11

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
  • Loading branch information
nealrichardson committed Feb 8, 2020
1 parent d15c3b2 commit 0adadcf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cpp/src/parquet/stream_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ class PARQUET_EXPORT StreamWriter {
};

struct PARQUET_EXPORT EndRowType {};
constexpr EndRowType EndRow;
constexpr EndRowType EndRow = {};

struct PARQUET_EXPORT EndRowGroupType {};
constexpr EndRowGroupType EndRowGroup;
constexpr EndRowGroupType EndRowGroup = {};

PARQUET_EXPORT
StreamWriter& operator<<(StreamWriter&, EndRowType);
Expand Down
13 changes: 10 additions & 3 deletions dev/tasks/homebrew-formulae/travis.osx.r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
# limitations under the License.

os: osx
# CRAN builds on macOS 10.11, so make sure that's what we're testing
osx_image: xcode7.3
language: r
cache: packages
r: {{ r_version }}
fortran: false
latex: false
cran: https://mac.r-project.org

# don't build twice
Expand All @@ -37,12 +40,16 @@ before_install:
- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
- if [ $CROSSBOW_USE_COMMIT_ID = true ]; then git -C arrow checkout {{ arrow.head }}; else git -C arrow checkout FETCH_HEAD; fi
- cd arrow/r
# This script used to be inside r/tools/ but was moved
# Put the formula inside r/ so that it's included in the package build
- cp ../dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb tools/apache-arrow.rb
before_script:
# Hack for old macOS (10.11)
# See https://travis-ci.community/t/library-developer-commandlinetools-sdks-macosx-sdk-missing-on-el-capitain/3213/3
- sed -i.bak 's/-isysroot /-I/g' $(R RHOME)/etc/Makeconf
script:
- travis_wait R CMD build .
- travis_wait R CMD build --no-build-vignettes .
# Note that this is not --as-cran. CRAN doesn't do macOS checks --as-cran
- travis_wait R CMD check arrow_*.tar.gz --install-args="--build"
- travis_wait R CMD check arrow_*.tar.gz --no-manual --ignore-vignettes --install-args="--build"
after_failure:
# If there's a build failure, it's probably in this log
- cat arrow.Rcheck/00install.out
Expand Down

0 comments on commit 0adadcf

Please sign in to comment.