You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2025/03/18 18:14:10 UTC

[I] [C++] Meson recompiles every time [arrow]

pitrou opened a new issue, #45853:
URL: https://github.com/apache/arrow/issues/45853

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   I'm trying the Meson build using Docker:
   ```
   archery docker run --no-build -e ARROW_USE_MESON=ON conda-cpp bash
   ```
   
   and Meson recompiles the entire project every time that `cpp_build.sh` or `cpp_test.sh` is called. Even if nothing changed and the build directory is still there.
   
   Furthermore, the ccache statistics don't change, which means that ccache probably isn't invoked at all.
   
   This is the kind of critical quality of life issue that must be watched for @WillAyd .
   
   ### Component(s)
   
   C++


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "eli-schwartz (via GitHub)" <gi...@apache.org>.
eli-schwartz commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734956196

   No, reconfiguring presumes that the build is stale and something should be changed (possibly forcing different compiler command lines to be produced).
   
   I would expect, if it says "directory already configured", that nothing should be recompiled unless the source modification timestamp has changed.
   
   
   
   > I do also see warnings about wraps being out of date, if those would contribute to the issue:
   
   This warning sounds odd, have the subprojects/*.wrap files actually been modified (and how)?
   
   The main reason you'd care about the warning is if you have manually edited a wrap file to change e.g. a wrap-git commit version, as without explicitly running `meson subprojects update --reset` meson may think the subproject is already available and not try running git commands to change the version in use. Also, if you've modified the wrap files to add diff_files, similar logic applies.
   
   It should in this case have no bearing on whether ninja is forcing existing (we hope unchanged) files to be recompiled erroneously.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734887030

   Within the container in question conda is used to create and activate an environment, which in turn sets a lot of CFLAGS / CXXFLAGS. My assumption is that something within those is messing with Meson's built-in functionality, just have not pinpointed it yet


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2735004711

   Hmm OK. If I run `ninja -C /cpp` for the first time it will recompile everything. Subsequent invocations immediately detect no changes.
   
   If I run the `meson install` after `ninja -C /cpp` then the first invocation will correctly detect no changes. However, subsequent invocations will rebuild the targets...


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2737482750

   Nice find on the build artifact deletion and no worries about the CMake part. The PR I've put up now does solve the ccache issue, so hope to address feedback there and get it in soon. That makes a huge difference.
   
   Its probably worth auditing where environment variables are used to set the compiler through archery. Are you aware of any other instances that may affect Meson builds now or in the future?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2735759649

   Ok, I think these lines are what trigger the rebuilds:
   https://github.com/apache/arrow/blob/fc0862a25fa2d6aa17df14daa9ad37430d432425/ci/scripts/cpp_build.sh#L267-L268
   
   The problem is that Ninja wants to rebuild when some intermediate files are missing:
   ```
   ninja explain: output src/arrow/libarrow.so.p/array_array_base.cc.o doesn't exist
   ninja explain: src/arrow/libarrow.so.p/array_array_base.cc.o is dirty
   ```


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "eli-schwartz (via GitHub)" <gi...@apache.org>.
eli-schwartz commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734986733

   Maybe. I'd expect it to happen for cmake too, though. Timestamps are detected by the generated ninja / Makefiles.
   
   Instead of relying on `meson install` to internally run `ninja`, you can manually run ninja using `-d explain`, it will report tons of information about *why* each recompile happens. For example, if I run:
   
   ```
   touch src/arrow/memory_pool.h
   ninja -C builddir/ -d explain
   ````
   
   I get this output:
   
   ```
   ninja: Entering directory `builddir/'
   ninja explain: output src/arrow/libarrow.so.p/array_array_dict.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339537132928205 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_array_dict.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_array_nested.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339509653413840 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_array_nested.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_array_run_end.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339496636979683 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_array_run_end.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_builder_adaptive.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339492630384914 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_builder_adaptive.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_builder_base.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339502263545644 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_builder_base.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_builder_binary.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339497263635118 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_builder_binary.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_builder_decimal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339496636979683 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_builder_decimal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_builder_dict.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339517653271740 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_builder_dict.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_builder_run_end.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339499873588382 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_builder_run_end.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_builder_nested.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339507886778635 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_builder_nested.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_builder_primitive.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339504743501353 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_builder_primitive.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_builder_union.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339506153476199 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_builder_union.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_concatenate.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339514413329218 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_concatenate.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_diff.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339541209523414 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_diff.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/array_util.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339536462939963 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/array_util.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_api_aggregate.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339535356292728 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_api_aggregate.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_api_scalar.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339574428946538 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_api_scalar.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_api_vector.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339549916037961 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_api_vector.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_cast.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339534612972451 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_cast.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_exec.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339539829547586 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_exec.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_expression.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339556632587731 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_expression.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_function.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339545556114055 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_function.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_function_internal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339545962773616 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_function_internal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernel.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339545602779906 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernel.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_registry.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339548799390768 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_registry.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_chunked_internal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339547232751439 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_chunked_internal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_codegen_internal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339550632692136 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_codegen_internal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_ree_util_internal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339550089368273 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_ree_util_internal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_scalar_cast_boolean.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339562082493166 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_scalar_cast_boolean.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_scalar_cast_dictionary.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339557235910584 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_scalar_cast_dictionary.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_scalar_cast_extension.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339555552606502 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_scalar_cast_extension.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_scalar_cast_internal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339562032494032 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_scalar_cast_internal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_scalar_cast_nested.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339572135652726 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_scalar_cast_nested.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_scalar_cast_numeric.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339652780954714 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_scalar_cast_numeric.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_scalar_cast_string.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339630104666734 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_scalar_cast_string.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_scalar_cast_temporal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339587008730518 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_scalar_cast_temporal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_util_internal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339563469135813 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_util_internal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_vector_hash.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339608975023058 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_vector_hash.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_vector_selection.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339578408878053 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_vector_selection.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_vector_selection_filter_internal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339590518670480 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_vector_selection_filter_internal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_vector_selection_internal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339602908459333 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_vector_selection_internal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/compute_kernels_vector_selection_take_internal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339601381818618 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/compute_kernels_vector_selection_take_internal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/io_buffered.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339581442159280 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/io_buffered.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/io_compressed.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339589428689113 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/io_compressed.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/io_file.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339595945244515 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/io_file.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/io_hdfs.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339592551969076 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/io_hdfs.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/io_memory.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339602188471569 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/io_memory.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_align_util.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339611728309766 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_align_util.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_async_util.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339615338248723 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_async_util.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_bitmap_ops.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339616504895685 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_bitmap_ops.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_byte_size.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339622674791642 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_byte_size.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_fixed_width_internal.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339624374763027 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_fixed_width_internal.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_future.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339629911336646 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_future.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_hashing.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339625534743512 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_hashing.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_list_util.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339629791338660 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_list_util.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_ree_util.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339638944518663 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_ree_util.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_thread_pool.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339642013713867 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_thread_pool.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/util_tracing.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339638661190067 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/util_tracing.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/memory_pool.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339648717688961 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/memory_pool.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/builder.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339728023057047 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/builder.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/buffer.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339652210964186 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/buffer.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/record_batch.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339679263850442 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/record_batch.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/scalar.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339733276305804 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/scalar.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/table.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339676554655035 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/table.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/table_builder.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339666714057206 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/table_builder.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/tensor_csf_converter.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339674423930054 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/tensor_csf_converter.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/type.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339700193507988 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/type.cc.o is dirty
   ninja explain: output src/arrow/libarrow.so.p/c_bridge.cc.o older than most recent input ../src/arrow/memory_pool.h (1742339698160207796 vs 1742342592066759585)
   ninja explain: src/arrow/libarrow.so.p/c_bridge.cc.o is dirty
   ninja explain: src/arrow/libarrow.so is dirty
   [69/69] Linking target src/arrow/libarrow.so
   ```


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2735799691

   And you're right that the same thing happens with CMake, my bad.
   However, with CMake it's hidden by the fact that ccache gets a 100% hit on the second run, and so the rebuild completes in seconds.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734368811

   Thanks for the ping. I am not super familiar with archery so will have to take a look.
   
   In theory the ccache support for Meson should work out of the box, and I see it doing so locally


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734969076

   Ah OK thanks. The wrap issue appears to be a red herring in my local environment, probably due to manual changes I made while developing. After running the reset that warning goes away.
   
   However, there is still a recompilation of files. Assuming the timestamps of the files plays a factor, I wonder if that is getting mangled going through a Docker container


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2735034523

   I just got around to testing CMake and interestingly enough that also tries to recompile files the second time it is run. So I think the issue has to do with the environment and not with Meson itself


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2737505332

   > Its probably worth auditing where environment variables are used to set the compiler through archery. Are you aware of any other instances that may affect Meson builds now or in the future?
   
   Grepping for `CC` and `CXX` is probably the best way to find that.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2735742961

   > So I think the issue has to do with the environment and not with Meson itself
   
   I doubt that. The recompile only happens if `meson setup` is executed again. Otherwise `ninja` considers everything up-to-date.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2846082437

   Issue resolved by pull request 45858
   https://github.com/apache/arrow/pull/45858


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734431012

   I'm assuming the root cause is explained by this comment:
   
   https://github.com/mesonbuild/meson/issues/1471#issuecomment-286548094
   
   > Existing unix behaviour is that if CC is specified then that, and only that, is used for compilation. Many processes depend on this and there would probably be several angry people if we did something different.
   
   It looks like conda is setting that CC flag without a caching tool, so will have to see how to make that work well with Meson


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734437707

   Ok, CMake is more flexible here (you can set `CC` to `gcc-14` and `CMAKE_COMPILER_LAUNCHER` to `ccache`, for example, and it will automatically combine the two).
   
   But that doesn't explain the other problem:
   
   > Meson recompiles the entire project every time that cpp_build.sh or cpp_test.sh is called. Even if nothing changed and the build directory is still there.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734945583

   Yes that is showing:
   
   ```
   meson setup --prefix=/opt/conda/envs/arrow --buildtype=debug -Dtests=true . /arrow/cpp
   Directory already configured.
   
   Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
   Run "meson setup --reconfigure" to force Meson to regenerate.
   ```
   
   So the trick is to add `--reconfigure` to the setup invocation?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2739473880

   For the record, the `find . -name "*.o" -delete` saves more than 2GB on my local attempt with `conda-cpp`.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2738296227

   We may be able to remove `find . -name "*.o" -delete` now. It was added by #37366 to avoid "disk full" errors on GitHub Actions. This may not happen without it now.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #45853: [C++] Meson recompiles every time
URL: https://github.com/apache/arrow/issues/45853


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734884518

   It is a custom tool that uses docker containers to execute a variety of configurations. The process in the OP runs `meson install`
   
   https://github.com/apache/arrow/blob/6b525b742a17acdb5a24bdc2d49111927af86279/ci/scripts/cpp_build.sh#L261
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "eli-schwartz (via GitHub)" <gi...@apache.org>.
eli-schwartz commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734875672

   I lack familiarity with "archery". How does it set up the build environment / persist the build directory, and what `meson` invocations does it use?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "eli-schwartz (via GitHub)" <gi...@apache.org>.
eli-schwartz commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734934036

   Is it showing in the log that meson re-ran the configure stage? Re-running `meson setup` without using --reconfigure will be a no-op, it logs the message:
   ```
   Directory already configured.
   
   Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
   Run "meson setup --reconfigure" to force Meson to regenerate.
   ```
   
   but ninja itself will reconfigure it, if it thinks any meson.build files have changed.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Meson recompiles every time [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on issue #45853:
URL: https://github.com/apache/arrow/issues/45853#issuecomment-2734948008

   I do also see warnings about wraps being out of date, if those would contribute to the issue:
   
   ```
   WARNING: Subproject rapidjson's revision may be out of date; its wrap file has changed since it was first configured
   
   Executing subproject rapidjson 
   
   rapidjson| Project name: rapidjson
   rapidjson| Project version: 1.1.0
   rapidjson| C++ compiler for the host machine: ccache /opt/conda/envs/arrow/bin/x86_64-conda-linux-gnu-c++ (gcc 13.3.0 "x86_64-conda-linux-gnu-c++ (conda-forge gcc 13.3.0-2) 13.3.0")
   rapidjson| C++ linker for the host machine: /opt/conda/envs/arrow/bin/x86_64-conda-linux-gnu-c++ ld.bfd 2.43
   rapidjson| Build targets in project: 0
   rapidjson| Subproject rapidjson finished.
   
   Dependency rapidjson from subproject subprojects/rapidjson-1.1.0 found: YES 1.1.0
   Run-time dependency flatbuffers found: NO (tried pkgconfig and cmake)
   Looking for a fallback subproject for the dependency flatbuffers
   WARNING: Subproject flatbuffers's revision may be out of date; its wrap file has changed since it was first configured
   
   Executing subproject flatbuffers 
   
   flatbuffers| Project name: flatbuffers
   flatbuffers| Project version: 24.3.6
   flatbuffers| C++ compiler for the host machine: ccache /opt/conda/envs/arrow/bin/x86_64-conda-linux-gnu-c++ (gcc 13.3.0 "x86_64-conda-linux-gnu-c++ (conda-forge gcc 13.3.0-2) 13.3.0")
   flatbuffers| C++ linker for the host machine: /opt/conda/envs/arrow/bin/x86_64-conda-linux-gnu-c++ ld.bfd 2.43
   flatbuffers| Checking for function "strtoull_l" : YES (cached)
   flatbuffers| Compiler for C++ supports arguments -fsigned-char: YES (cached)
   flatbuffers| Build targets in project: 10
   flatbuffers| Subproject flatbuffers finished.
   
   Dependency flatbuffers from subproject subprojects/flatbuffers-24.3.6 found: YES 24.3.6
   Run-time dependency Boost found: NO (tried system)
   WARNING: Subproject boost's revision may be out of date; its wrap file has changed since it was first configured
   ```


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org