Skip to content

ARROW-11277: [C++] Workaround macOS 10.11: don't default construct consts - #9267

Closed
bkietz wants to merge 1 commit into
apache:masterfrom
bkietz:11277-Fix-compilation-error-in-
Closed

ARROW-11277: [C++] Workaround macOS 10.11: don't default construct consts#9267
bkietz wants to merge 1 commit into
apache:masterfrom
bkietz:11277-Fix-compilation-error-in-

Conversation

@bkietz

Copy link
Copy Markdown
Member
/tmp/apache-arrow-20210116-6233-1jyrhk8/apache-arrow-3.0.0/cpp/src/arrow/dataset/expression.cc
/tmp/apache-arrow-20210116-6233-1jyrhk8/apache-arrow-3.0.0/cpp/src/arrow/dataset/expression.cc:684:30:
error: default initialization of an object of const type 'const arrow::Datum' without a user-provided default constructor
staticconst Datum ignored_input;

Datum defines a default constructor but it doesn't seem to be found for const/constexpr decls

[](const Expression& argument) { return argument.literal(); })) {
// all arguments are literal; we can evaluate this subexpression *now*
static const Datum ignored_input;
static const Datum ignored_input = Datum{};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can give Datum a default constructor?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/bkietz/arrow/blob/17f2df78f1fa623d05dd01f245f8f65f828f510d/cpp/src/arrow/datum.h#L118-L119

Datum has one already; resolution of that constructor is just failing here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

precisely

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 since we have to deal with lousy compilers

@jeroen

Copy link
Copy Markdown
Contributor

Thanks I'm going to test this patch on top of rc2. Btw the MacOS 10.11 target be be EOL for us in april/may (but I imagine RHEL users will have the same issues....)

@jeroen

Copy link
Copy Markdown
Contributor

Thanks confirmed this works. With this patch I can build rc2 on macos 10.11

@github-actions

Copy link
Copy Markdown

kszucs pushed a commit that referenced this pull request Jan 25, 2021
…nsts
```c++
/tmp/apache-arrow-20210116-6233-1jyrhk8/apache-arrow-3.0.0/cpp/src/arrow/dataset/expression.cc
/tmp/apache-arrow-20210116-6233-1jyrhk8/apache-arrow-3.0.0/cpp/src/arrow/dataset/expression.cc:684:30:
error: default initialization of an object of const type 'const arrow::Datum' without a user-provided default constructor
static const Datum ignored_input;
```
Datum defines a default constructor but it doesn't seem to be found for const/constexpr decls
Closes#9267 from bkietz/11277-Fix-compilation-error-in-
Authored-by: Benjamin Kietzman <bengilgit@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
@bkietz
bkietz deleted the 11277-Fix-compilation-error-in- branch February 25, 2021 16:11
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@bkietz@jeroen@pitrou