This is an automated email from the ASF dual-hosted git repository.
paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git
The following commit(s) were added to refs/heads/main by this push:
new 8894ebf4 fix(r): Avoid flatcc aligned_alloc() call when compiling R
package (#494)
8894ebf4 is described below
commit 8894ebf42fa1f0c5aa088469e1a2149f6d824f2e
Author: Dewey Dunnington <[email protected]>
AuthorDate: Tue May 28 14:59:36 2024 -0300
fix(r): Avoid flatcc aligned_alloc() call when compiling R package (#494)
Closes #493.
We could be fancier and check for the presence of aligned_alloc() or
guard it in a define based on the C standard; however, I don't think we
use it at all right now and even when write support is added I don't
think it will matter for how we use flatbuffers in the IPC format.
---
r/src/Makevars | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/r/src/Makevars b/r/src/Makevars
index 263ba3f6..045201a9 100644
--- a/r/src/Makevars
+++ b/r/src/Makevars
@@ -15,4 +15,8 @@
# specific language governing permissions and limitations
# under the License.
-PKG_CPPFLAGS=-I../inst/include -I../src
+# -DFLATCC_USE_GENERIC_ALIGNED_ALLOC is needed to support compilation on
systems
+# that do not provide aligned_alloc. Allocating flatbuffers memory is not
+# performance-critical for what we do in the nanoarrow R package (and may not
+# occur at all until IPC write support is added)
+PKG_CPPFLAGS=-I../inst/include -I../src -DFLATCC_USE_GENERIC_ALIGNED_ALLOC