doronbehar opened a new issue, #902:
URL: https://github.com/apache/arrow-nanoarrow/issues/902

   Hey so on NixOS we encountered this build error of nanoarrow with the 
title's versions:
   
   ```
   structuredAttrs is enabled
   Running phase: unpackPhase
   unpacking source archive /nix/store/i1ikvkx94csxwcbhx1c69an9qcr2iwxh-source
   source root is source
   Running phase: patchPhase
   Running phase: updateAutotoolsGnuConfigScriptsPhase
   Running phase: configurePhase
   mesonConfigurePhase flags: 
--prefix=/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0 
--libdir=/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/lib 
--libexecdir=/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/libexec
 --bindir=/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/bin 
--sbindir=/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/sbin 
--includedir=/nix/store/b53f7w217bc6fj6r27bz9l5cv9qpjvlz-nanoarrow-0.8.0-dev/include
 --mandir=/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/share/man 
--infodir=/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/share/info
 
--localedir=/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/share/locale
 -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=plain 
-Dmetal=disabled
   The Meson build system
   Version: 1.10.2
   Source dir: /build/source
   Build dir: /build/source/build
   Build type: native build
   Project name: nanoarrow
   Project version: 0.8.0
   C compiler for the host machine: gcc (gcc 15.2.0 "gcc (GCC) 15.2.0")
   C linker for the host machine: gcc ld.bfd 2.46
   C++ compiler for the host machine: g++ (gcc 15.2.0 "g++ (GCC) 15.2.0")
   C++ linker for the host machine: g++ ld.bfd 2.46
   Host machine cpu family: x86_64
   Host machine cpu: x86_64
   Compiler for C supports arguments -Wno-misleading-indentation: YES 
   Compiler for C++ supports arguments -Wno-misleading-indentation: YES 
   Configuring nanoarrow_config.h using configuration
   Found pkg-config: YES 
(/nix/store/sn8r7j6q1js540y5briylnb62203zxq5-pkg-config-wrapper-0.29.2/bin/pkg-config)
 0.29.2
   Found pkg-config: YES 
(/nix/store/sn8r7j6q1js540y5briylnb62203zxq5-pkg-config-wrapper-0.29.2/bin/pkg-config)
 0.29.2
   Did not find CMake 'cmake'
   Found CMake: NO
   Run-time dependency flatcc found: NO (tried pkgconfig and cmake)
   Looking for a fallback subproject for the dependency flatcc
   
   Executing subproject flatcc 
   
   flatcc| Project name: flatcc
   flatcc| Project version: 0.6.1
   flatcc| C compiler for the host machine: gcc (gcc 15.2.0 "gcc (GCC) 15.2.0")
   flatcc| C linker for the host machine: gcc ld.bfd 2.46
   flatcc| Build targets in project: 2
   flatcc| Subproject flatcc finished.
   
   Dependency flatcc from subproject 
subprojects/flatcc-fd3c4ae5cd39f0651eda6a3a1a374278070135d6 found: YES 0.6.1
   Run-time dependency libzstd found: YES 1.5.7
   Run-time dependency zlib found: YES 1.3.2
   meson.build:192: WARNING: cuda option enabled but not implemented in Meson 
config!
   Run-time dependency nlohmann_json found: YES 3.12.0
   Run-time dependency arrow found: YES 24.0.0
   Run-time dependency gtest_main found: YES 1.17.0
   Run-time dependency GMock found: YES 1.17.0
   Run-time dependency benchmark found: YES 1.9.5
   Build targets in project: 27
   
   nanoarrow 0.8.0
   
     Subprojects
       flatcc       : YES
   
     User defined options
       auto_features: enabled
       bindir       : 
/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/bin
       buildtype    : plain
       includedir   : 
/nix/store/b53f7w217bc6fj6r27bz9l5cv9qpjvlz-nanoarrow-0.8.0-dev/include
       infodir      : 
/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/share/info
       libdir       : 
/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/lib
       libexecdir   : 
/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/libexec
       localedir    : 
/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/share/locale
       mandir       : 
/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/share/man
       metal        : disabled
       prefix       : 
/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0
       sbindir      : 
/nix/store/f1jnsa7c400xg88jq7yyiqq98andpxq3-nanoarrow-0.8.0/sbin
       wrap_mode    : nodownload
   
   Found ninja-1.13.2 at 
/nix/store/5czbkipghl1phpvn5fc2f22vk7qgp467-ninja-1.13.2/bin/ninja
   mesonConfigurePhase: enabled\ parallel\ building
   Running phase: buildPhase
   build flags: -j24
   [1/70] Compiling C object libnanoarrow_ipc.so.p/src_nanoarrow_ipc_codecs.c.o
   [2/70] Compiling C object 
subprojects/flatcc-fd3c4ae5cd39f0651eda6a3a1a374278070135d6/libflatcc.so.p/src_runtime_refmap.c.o
   [3/70] Compiling C object 
libnanoarrow.so.p/src_nanoarrow_common_array_stream.c.o
   [4/70] Compiling C object 
subprojects/flatcc-fd3c4ae5cd39f0651eda6a3a1a374278070135d6/libflatcc.so.p/src_runtime_emitter.c.o
   [5/70] Compiling C object 
libnanoarrow_device.so.p/src_nanoarrow_device_device.c.o
   [6/70] Compiling C object libnanoarrow.so.p/src_nanoarrow_common_utils.c.o
   [7/70] Compiling C object libnanoarrow_ipc.so.p/src_nanoarrow_ipc_reader.c.o
   [8/70] Compiling C object 
subprojects/flatcc-fd3c4ae5cd39f0651eda6a3a1a374278070135d6/libflatcc.so.p/src_runtime_verifier.c.o
   [9/70] Compiling C object libnanoarrow.so.p/src_nanoarrow_common_schema.c.o
   [10/70] Compiling C object libnanoarrow.so.p/src_nanoarrow_common_array.c.o
   [11/70] Compiling C object libnanoarrow_ipc.so.p/src_nanoarrow_ipc_writer.c.o
   [12/70] Linking target libnanoarrow.so
   [13/70] Compiling C++ object 
nanoarrow-ipc-files-test.p/src_nanoarrow_ipc_files_test.cc.o
   [14/70] Compiling C object 
subprojects/flatcc-fd3c4ae5cd39f0651eda6a3a1a374278070135d6/libflatcc.so.p/src_runtime_builder.c.o
   [15/70] Compiling C object 
libnanoarrow_ipc.so.p/src_nanoarrow_ipc_encoder.c.o
   [16/70] Generating symbol file libnanoarrow.so.p/libnanoarrow.so.symbols
   [17/70] Linking target 
subprojects/flatcc-fd3c4ae5cd39f0651eda6a3a1a374278070135d6/libflatcc.so
   [18/70] Compiling C++ object 
libnanoarrow_c_data_integration.so.p/src_nanoarrow_integration_c_data_integration.cc.o
   [19/70] Linking target libnanoarrow_device.so
   [20/70] Compiling C object dump_stream.p/src_apps_dump_stream.c.o
   [21/70] Generating symbol file 
subprojects/flatcc-fd3c4ae5cd39f0651eda6a3a1a374278070135d6/libflatcc.so.p/libflatcc.so.symbols
   [22/70] Generating symbol file 
libnanoarrow_device.so.p/libnanoarrow_device.so.symbols
   [23/70] Compiling C object 
libnanoarrow_ipc.so.p/src_nanoarrow_ipc_decoder.c.o
   [24/70] Linking target libnanoarrow_ipc.so
   [25/70] Compiling C++ object 
hpp-exception-test.p/src_nanoarrow_hpp_exception_test.cc.o
   [26/70] Generating symbol file 
libnanoarrow_ipc.so.p/libnanoarrow_ipc.so.symbols
   [27/70] Compiling C++ object 
hpp-buffer-test.p/src_nanoarrow_hpp_buffer_test.cc.o
   [28/70] Linking target dump_stream
   [29/70] Compiling C++ object 
dev/benchmarks/schema_benchmark.p/c_schema_benchmark.cc.o
   [30/70] Linking target dev/benchmarks/schema_benchmark
   [31/70] Compiling C++ object 
schema-test.p/src_nanoarrow_common_schema_test.cc.o
   FAILED: [code=1] schema-test.p/src_nanoarrow_common_schema_test.cc.o 
   g++ -Ischema-test.p -I. -I.. -Isrc -I../src 
-I/nix/store/dlg9gb2655276zqmb5hvisnkl689db86-nlohmann_json-3.12.0/include 
-I/nix/store/vc8g28d6ywh8sjh22bvgn57sw4d206w0-gtest-1.17.0-dev/include 
-fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra 
-std=c++17 -Wno-misleading-indentation -DGTEST_HAS_PTHREAD=1 
-DNANOARROW_BUILD_TESTS_WITH_ARROW -MD -MQ 
schema-test.p/src_nanoarrow_common_schema_test.cc.o -MF 
schema-test.p/src_nanoarrow_common_schema_test.cc.o.d -o 
schema-test.p/src_nanoarrow_common_schema_test.cc.o -c 
../src/nanoarrow/common/schema_test.cc
   In file included from 
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/type_traits.h:26,
                    from 
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/testing/gtest_util.h:41,
                    from ../src/nanoarrow/common/schema_test.cc:23:
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/util/bit_util.h:
 In function 'int arrow::bit_util::Log2(uint64_t)':
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/util/bit_util.h:148:15:
 error: 'bit_width' is not a member of 'std'
     148 |   return std::bit_width(x - 1);
         |               ^~~~~~~~~
   [32/70] Compiling C++ object 
nanoarrow-ipc-hpp-test.p/src_nanoarrow_ipc_ipc_hpp_test.cc.o
   [33/70] Compiling C++ object 
c-data-integration-test.p/src_nanoarrow_integration_c_data_integration_test.cc.o
   [34/70] Compiling C++ object 
hpp-array_stream-test.p/src_nanoarrow_hpp_array_stream_test.cc.o
   [35/70] Compiling C++ object 
nanoarrow-device-hpp-test.p/src_nanoarrow_device_device_hpp_test.cc.o
   [36/70] Compiling C++ object 
hpp-unique-test.p/src_nanoarrow_hpp_unique_test.cc.o
   [37/70] Compiling C++ object 
array-stream-test.p/src_nanoarrow_common_array_stream_test.cc.o
   [38/70] Compiling C++ object 
nanoarrow-ipc-reader-test.p/src_nanoarrow_ipc_reader_test.cc.o
   [39/70] Compiling C++ object 
nanoarrow-device-test.p/src_nanoarrow_device_device_test.cc.o
   [40/70] Compiling C++ object 
dev/benchmarks/array_benchmark.p/c_array_benchmark.cc.o
   [41/70] Compiling C++ object 
nanoarrow-ipc-decoder-test.p/src_nanoarrow_ipc_decoder_test.cc.o
   [42/70] Compiling C++ object 
array-test.p/src_nanoarrow_common_array_test.cc.o
   FAILED: [code=1] array-test.p/src_nanoarrow_common_array_test.cc.o 
   g++ -Iarray-test.p -I. -I.. -Isrc -I../src 
-I/nix/store/dlg9gb2655276zqmb5hvisnkl689db86-nlohmann_json-3.12.0/include 
-I/nix/store/vc8g28d6ywh8sjh22bvgn57sw4d206w0-gtest-1.17.0-dev/include 
-fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra 
-std=c++17 -Wno-misleading-indentation -DGTEST_HAS_PTHREAD=1 
-DNANOARROW_BUILD_TESTS_WITH_ARROW -MD -MQ 
array-test.p/src_nanoarrow_common_array_test.cc.o -MF 
array-test.p/src_nanoarrow_common_array_test.cc.o.d -o 
array-test.p/src_nanoarrow_common_array_test.cc.o -c 
../src/nanoarrow/common/array_test.cc
   In file included from 
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/data.h:29,
                    from 
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/array_base.h:26,
                    from 
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array.h:41,
                    from ../src/nanoarrow/common/array_test.cc:24:
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/buffer.h:239:8:
 error: 'span' in namespace 'std' does not name a template type
     239 |   std::span<const T> span_as() const {
         |        ^~~~
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/buffer.h:239:3:
 note: 'std::span' is only available from C++20 onwards
     239 |   std::span<const T> span_as() const {
         |   ^~~
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/buffer.h:272:8:
 error: 'span' in namespace 'std' does not name a template type
     272 |   std::span<T> mutable_span_as() {
         |        ^~~~
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/buffer.h:272:3:
 note: 'std::span' is only available from C++20 onwards
     272 |   std::span<T> mutable_span_as() {
         |   ^~~
   In file included from 
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/data.h:33:
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/util/bit_util.h:
 In function 'int arrow::bit_util::Log2(uint64_t)':
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/util/bit_util.h:148:15:
 error: 'bit_width' is not a member of 'std'
     148 |   return std::bit_width(x - 1);
         |               ^~~~~~~~~
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/data.h:
 At global scope:
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/data.h:582:8:
 error: 'span' in namespace 'std' does not name a template type
     582 |   std::span<const T> GetSpan(int i, int64_t length) const {
         |        ^~~~
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/data.h:582:3:
 note: 'std::span' is only available from C++20 onwards
     582 |   std::span<const T> GetSpan(int i, int64_t length) const {
         |   ^~~
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/data.h:598:8:
 error: 'span' in namespace 'std' does not name a template type
     598 |   std::span<T> GetSpan(int i, int64_t length) {
         |        ^~~~
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/data.h:598:3:
 note: 'std::span' is only available from C++20 onwards
     598 |   std::span<T> GetSpan(int i, int64_t length) {
         |   ^~~
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/data.h:714:8:
 error: 'span' in namespace 'std' does not name a template type
     714 |   std::span<const std::shared_ptr<Buffer>> GetVariadicBuffers() 
const;
         |        ^~~~
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/data.h:714:3:
 note: 'std::span' is only available from C++20 onwards
     714 |   std::span<const std::shared_ptr<Buffer>> GetVariadicBuffers() 
const;
         |   ^~~
   In file included from 
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/chunked_array.h:26,
                    from 
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/stl_iterator.h:26,
                    from 
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array/array_binary.h:33,
                    from 
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/array.h:42:
   
/nix/store/dv234p104pqrmq3q29im7yvcbkgmaibh-arrow-cpp-24.0.0/include/arrow/chunk_resolver.h:80:35:
 error: expected ')' before '<' token
      80 |   explicit ChunkResolver(std::span<const Array* const> chunks) 
noexcept;
         |                         ~         ^
         |                                   )
   [43/70] Compiling C++ object 
buffer-test.p/src_nanoarrow_common_buffer_test.cc.o
   [44/70] Compiling C++ object hpp-view-test.p/src_nanoarrow_hpp_view_test.cc.o
   [45/70] Compiling C++ object 
utils-test.p/src_nanoarrow_common_utils_test.cc.o
   [46/70] Compiling C++ object 
nanoarrow-testing-test.p/src_nanoarrow_testing_testing_test.cc.o
   [47/70] Compiling C++ object 
libnanoarrow_testing.so.p/src_nanoarrow_testing_testing.cc.o
   ninja: build stopped: subcommand failed.
   ```
   
   We managed to workaround the issue with this diff (applicable both to git 
tag `apache-arrow-nanoarrow-0.8.0` and to branch `main`):
   
   ```diff
   diff --git i/meson.build w/meson.build
   index 5c3032d..5ec2e56 100644
   --- i/meson.build
   +++ w/meson.build
   @@ -22,7 +22,7 @@ project(
        version: '0.8.0',
        license: 'Apache-2.0',
        meson_version: '>=0.58.0',
   -    default_options: ['c_std=c99', 'warning_level=2', 'cpp_std=c++17'],
   +    default_options: ['c_std=c99', 'warning_level=2', 'cpp_std=c++20'],
    )
    
    cc = meson.get_compiler('c')
   ```
   
   I noticed that the nanoarrow files from which the build failure stems from, 
have changed a lot since git tag `apache-arrow-nanoarrow-0.8.0`. Should I 
expect a release soon that won't require the above diff, or maybe is there a 
(hopefully small) commit we can fetch that will fix that compilation issue 
without requiring a higher cpp standard?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to