Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLib] apache-arrow-glib 15.0.2 failed to build #40674

Closed
chenrui333 opened this issue Mar 19, 2024 · 5 comments
Closed

[GLib] apache-arrow-glib 15.0.2 failed to build #40674

chenrui333 opened this issue Mar 19, 2024 · 5 comments

Comments

@chenrui333
Copy link

Describe the bug, including details regarding any error messages, version, and platform.

👋 trying to build the latest release, but run into some build issue. The error log is as below:

error build log
[16/101] clang++ -Iarrow-glib/libarrow-glib.1500.dylib.p -I. -I../c_glib -I/opt/homebrew/Cellar/brotli/1.1.0/include -I/opt/homebrew/Cellar/lz4/1.9.4/include -I/opt/homebrew/Cellar/zstd/1.5.5/include -I/opt/homebrew/Cellar/utf8proc/2.9.0/include -I/opt/homebrew/Cellar/apache-arrow/15.0.2/include -I/opt/homebrew/Cellar/pcre2/10.43/include -I/opt/homebrew/Cellar/glib/2.80.0/include -I/opt/homebrew/Cellar/glib/2.80.0/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.80.0/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ffi -fdiagnostics-color=always -Wall -Winvalid-pch -std=c++17 -O3 -Wmissing-declarations -Wno-incompatible-function-pointer-types -DUTF8PROC_EXPORTS -MD -MQ arrow-glib/libarrow-glib.1500.dylib.p/composite-array.cpp.o -MF arrow-glib/libarrow-glib.1500.dylib.p/composite-array.cpp.o.d -o arrow-glib/libarrow-glib.1500.dylib.p/composite-array.cpp.o -c ../c_glib/arrow-glib/composite-array.cpp
FAILED: arrow-glib/libarrow-glib.1500.dylib.p/composite-array.cpp.o
clang++ -Iarrow-glib/libarrow-glib.1500.dylib.p -I. -I../c_glib -I/opt/homebrew/Cellar/brotli/1.1.0/include -I/opt/homebrew/Cellar/lz4/1.9.4/include -I/opt/homebrew/Cellar/zstd/1.5.5/include -I/opt/homebrew/Cellar/utf8proc/2.9.0/include -I/opt/homebrew/Cellar/apache-arrow/15.0.2/include -I/opt/homebrew/Cellar/pcre2/10.43/include -I/opt/homebrew/Cellar/glib/2.80.0/include -I/opt/homebrew/Cellar/glib/2.80.0/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.80.0/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ffi -fdiagnostics-color=always -Wall -Winvalid-pch -std=c++17 -O3 -Wmissing-declarations -Wno-incompatible-function-pointer-types -DUTF8PROC_EXPORTS -MD -MQ arrow-glib/libarrow-glib.1500.dylib.p/composite-array.cpp.o -MF arrow-glib/libarrow-glib.1500.dylib.p/composite-array.cpp.o.d -o arrow-glib/libarrow-glib.1500.dylib.p/composite-array.cpp.o -c ../c_glib/arrow-glib/composite-array.cpp
../c_glib/arrow-glib/composite-array.cpp:613:10: error: cannot initialize return object of type 'const gint64 *' (aka 'const long *') with an rvalue of type 'const typename LargeListArray::offset_type *' (aka 'const long long *')
  return garrow_base_list_array_get_value_offsets<arrow::LargeListArray>(
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/8344623050/job/22837685244
relates to Homebrew/homebrew-core#166595

Component(s)

GLib

@raulcd
Copy link
Member

raulcd commented Mar 19, 2024

The error seems to be:

   FAILED: arrow-glib/libarrow-glib.1500.dylib.p/array-builder.cpp.o 
  clang++ -Iarrow-glib/libarrow-glib.1500.dylib.p -I. -I../c_glib -I/opt/homebrew/Cellar/apache-arrow/15.0.2/include -I/opt/homebrew/Cellar/pcre2/10.43/include -I/opt/homebrew/Cellar/glib/2.80.0/include -I/opt/homebrew/Cellar/glib/2.80.0/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.80.0/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/ffi -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_LIBCPP_ENABLE_ASSERTIONS=1 -Wall -Winvalid-pch -std=c++17 -O3 -Wmissing-declarations -MD -MQ arrow-glib/libarrow-glib.1500.dylib.p/array-builder.cpp.o -MF arrow-glib/libarrow-glib.1500.dylib.p/array-builder.cpp.o.d -o arrow-glib/libarrow-glib.1500.dylib.p/array-builder.cpp.o -c ../c_glib/arrow-glib/array-builder.cpp
  ../c_glib/arrow-glib/array-builder.cpp:5171:41: error: cannot initialize a parameter of type 'const int64_t *' (aka 'const long long *') with an lvalue of type 'const gint64 *' (aka 'const long *')
      return arrow_builder->AppendIndices(values, values_length, valid_bytes);
                                          ^~~~~~
  /opt/homebrew/Cellar/apache-arrow/15.0.2/include/arrow/array/builder_dict.h:691:39: note: passing argument to parameter 'values' here
    Status AppendIndices(const int64_t* values, int64_t length,
                                        ^
  ../c_glib/arrow-glib/array-builder.cpp:5405:41: error: cannot initialize a parameter of type 'const int64_t *' (aka 'const long long *') with an lvalue of type 'const gint64 *' (aka 'const long *')
      return arrow_builder->AppendIndices(values, values_length, valid_bytes);
                                          ^~~~~~
  /opt/homebrew/Cellar/apache-arrow/15.0.2/include/arrow/array/builder_dict.h:691:39: note: passing argument to parameter 'values' here
    Status AppendIndices(const int64_t* values, int64_t length,
                                        ^
  2 errors generated.

cc @kou

@kou kou changed the title apache-arrow-glib 15.0.2 failed to build [GLib] apache-arrow-glib 15.0.2 failed to build Mar 20, 2024
@kou
Copy link
Member

kou commented Mar 20, 2024

Hmm. It seems that 64-bit integer type provided by GLib (gint64) and C++ (int64_t) became incompatible...
I'll add explicit casts...

@carlocab
Copy link

Hmm. It seems that 64-bit integer type provided by GLib (gint64) and C++ (int64_t) became incompatible...

This seems to be due to a misconfiguration on our end. Should be fixed by Homebrew/homebrew-core#166473.

Nevertheless,

I'll add explicit casts...

is probably still a good idea. See Homebrew/homebrew-core#166595 (comment)

@kou
Copy link
Member

kou commented Mar 22, 2024

Thanks for the info!
I didn't know the gint64 note:

https://docs.gtk.org/glib/types.html#gint64

Note that on platforms with more than one 64-bit standard integer type, gint64 and int64_t are not necessarily implemented by the same 64-bit integer type. For example, on a platform where both long and long long are 64-bit, it might be the case that one of those types is used for gint64 and the other is used for int64_t.

kou added a commit to kou/arrow that referenced this issue Mar 22, 2024
GLib doesn't guarantee it:

https://docs.gtk.org/glib/types.html#gint64

> Note that on platforms with more than one 64-bit standard integer
> type, gint64 and int64_t are not necessarily implemented by the same
> 64-bit integer type. For example, on a platform where both long and
> long long are 64-bit, it might be the case that one of those types is
> used for gint64 and the other is used for int64_t.
kou added a commit to kou/arrow that referenced this issue Mar 22, 2024
GLib doesn't guarantee it:

https://docs.gtk.org/glib/types.html#gint64

> Note that on platforms with more than one 64-bit standard integer
> type, gint64 and int64_t are not necessarily implemented by the same
> 64-bit integer type. For example, on a platform where both long and
> long long are 64-bit, it might be the case that one of those types is
> used for gint64 and the other is used for int64_t.
kou added a commit that referenced this issue Mar 28, 2024
…40736)

### Rationale for this change

GLib doesn't guarantee that `gint64` and `int64_t` use the same type:

https://docs.gtk.org/glib/types.html#gint64

> Note that on platforms with more than one 64-bit standard integer
> type, gint64 and int64_t are not necessarily implemented by the same
> 64-bit integer type. For example, on a platform where both long and
> long long are 64-bit, it might be the case that one of those types is
> used for gint64 and the other is used for int64_t.

### What changes are included in this PR?

Add explicit casts.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #40674

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 16.0.0 milestone Mar 28, 2024
@kou
Copy link
Member

kou commented Mar 28, 2024

Issue resolved by pull request 40736
#40736

@kou kou closed this as completed Mar 28, 2024
tolleybot pushed a commit to tmct/arrow that referenced this issue May 2, 2024
…ype (apache#40736)

### Rationale for this change

GLib doesn't guarantee that `gint64` and `int64_t` use the same type:

https://docs.gtk.org/glib/types.html#gint64

> Note that on platforms with more than one 64-bit standard integer
> type, gint64 and int64_t are not necessarily implemented by the same
> 64-bit integer type. For example, on a platform where both long and
> long long are 64-bit, it might be the case that one of those types is
> used for gint64 and the other is used for int64_t.

### What changes are included in this PR?

Add explicit casts.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#40674

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
vibhatha pushed a commit to vibhatha/arrow that referenced this issue May 25, 2024
…ype (apache#40736)

### Rationale for this change

GLib doesn't guarantee that `gint64` and `int64_t` use the same type:

https://docs.gtk.org/glib/types.html#gint64

> Note that on platforms with more than one 64-bit standard integer
> type, gint64 and int64_t are not necessarily implemented by the same
> 64-bit integer type. For example, on a platform where both long and
> long long are 64-bit, it might be the case that one of those types is
> used for gint64 and the other is used for int64_t.

### What changes are included in this PR?

Add explicit casts.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#40674

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants