[ https://issues.apache.org/jira/browse/ARROW-11299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krisztian Szucs updated ARROW-11299: ------------------------------------ Fix Version/s: (was: 3.0.0) 4.0.0 > [Python] build warning in python > -------------------------------- > > Key: ARROW-11299 > URL: https://issues.apache.org/jira/browse/ARROW-11299 > Project: Apache Arrow > Issue Type: Bug > Components: C++, Python > Affects Versions: 2.0.0 > Reporter: Yibo Cai > Assignee: Yibo Cai > Priority: Major > Labels: pull-request-available > Fix For: 4.0.0 > > Time Spent: 2h 20m > Remaining Estimate: 0h > > Many warnings about compute kernel options when building Arrow python. > Removing below line suppresses the warnings. > https://github.com/apache/arrow/blob/140135908c5d131ceac31a0e529f9b9b763b1106/cpp/src/arrow/compute/function.h#L45 > I think the reason is virtual destructor makes the structure non C compatible > and cannot use offsetof macro safely. > As function options are straightforward, looks destructor is not necessary. > [~bkietz] > *Steps to reproduce* > build arrow cpp > {code:bash} > ~/arrow/cpp/release $ cmake -GNinja -DCMAKE_BUILD_TYPE=Release > -DARROW_COMPUTE=ON -DARROW_BUILD_TESTS=ON > -DCMAKE_INSTALL_PREFIX=$(pwd)/_install -DCMAKE_INSTALL_LIBDIR=lib > -DARROW_PYTHON=ON -DCMAKE_CXX_COMPILER=/usr/bin/clang++-9 > -DCMAKE_C_COMPILER=/usr/bin/clang-9 .. > ~/arrow/cpp/release $ ninja install > {code} > build arrow python > {code:bash} > ~/arrow/python $ python --version > Python 3.6.9 > ~/arrow/python $ python setup.py build_ext --inplace > ...... > [ 93%] Building CXX object CMakeFiles/_compute.dir/_compute.cpp.o [27/1691] > In file included from > /usr/include/x86_64-linux-gnu/bits/types/stack_t.h:23:0, > from /usr/include/signal.h:303, > from > /home/cyb/archery/lib/python3.6/site-packages/numpy/core/include/numpy/npy_interrupt.h:84, > from > /home/cyb/archery/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:5, > from > /home/cyb/arrow/cpp/release/_install/include/arrow/python/numpy_interop.h:41, > from /home/cyb/arrow/cpp/release/_install/include/arrow/python/helpers.h:27, > from /home/cyb/arrow/cpp/release/_install/include/arrow/python/api.h:24, > from /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp:696: > /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp: In function > ‘int __Pyx_modinit_type_init_code()’: > /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp:26034:146: > warning: offsetof within non-standard-layout type > ‘__pyx_obj_7pyarrow_8_compute__CastOptions’ is undefined [-Winvalid-offsetof] > x_type_7pyarrow_8_compute__CastOptions.tp_weaklistoffset = offsetof(struct > __pyx_obj_7pyarrow_8_compute__CastOptions, __pyx_base.__pyx_base.__weakref__); > ^ > /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp:26066:150: > warning: offsetof within non-standard-layout type > ‘__pyx_obj_7pyarrow_8_compute__FilterOptions’ is undefined > [-Winvalid-offsetof] > type_7pyarrow_8_compute__FilterOptions.tp_weaklistoffset = offsetof(struct > __pyx_obj_7pyarrow_8_compute__FilterOptions, > __pyx_base.__pyx_base.__weakref__); > ^ > /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp:26082:146: > warning: offsetof within non-standard-layout type > ‘__pyx_obj_7pyarrow_8_compute__TakeOptions’ is undefined [-Winvalid-offsetof] > x_type_7pyarrow_8_compute__TakeOptions.tp_weaklistoffset = offsetof(struct > __pyx_obj_7pyarrow_8_compute__TakeOptions, __pyx_base.__pyx_base.__weakref__); > ^ > /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp:26130:150: > warning: offsetof within non-standard-layout type > ‘__pyx_obj_7pyarrow_8_compute__MinMaxOptions’ is undefined > [-Winvalid-offsetof] > type_7pyarrow_8_compute__MinMaxOptions.tp_weaklistoffset = offsetof(struct > __pyx_obj_7pyarrow_8_compute__MinMaxOptions, > __pyx_base.__pyx_base.__weakref__); > ^ > /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp:26146:148: > warning: offsetof within non-standard-layout type > ‘__pyx_obj_7pyarrow_8_compute__CountOptions’ is undefined [-Winvalid-offsetof] > _type_7pyarrow_8_compute__CountOptions.tp_weaklistoffset = offsetof(struct > __pyx_obj_7pyarrow_8_compute__CountOptions, > __pyx_base.__pyx_base.__weakref__); > ^ > /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp:26162:146: > warning: offsetof within non-standard-layout type > ‘__pyx_obj_7pyarrow_8_compute__ModeOptions’ is undefined [-Winvalid-offsetof] > x_type_7pyarrow_8_compute__ModeOptions.tp_weaklistoffset = offsetof(struct > __pyx_obj_7pyarrow_8_compute__ModeOptions, __pyx_base.__pyx_base.__weakref__); > ^ > /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp:26210:154: > warning: offsetof within non-standard-layout type > ‘__pyx_obj_7pyarrow_8_compute__VarianceOptions’ is undefined > [-Winvalid-offsetof] > pe_7pyarrow_8_compute__VarianceOptions.tp_weaklistoffset = offsetof(struct > __pyx_obj_7pyarrow_8_compute__VarianceOptions, > __pyx_base.__pyx_base.__weakref__); > ^ > /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp:26258:156: > warning: offsetof within non-standard-layout type > ‘__pyx_obj_7pyarrow_8_compute__ArraySortOptions’ is undefined > [-Winvalid-offsetof] > e_7pyarrow_8_compute__ArraySortOptions.tp_weaklistoffset = offsetof(struct > __pyx_obj_7pyarrow_8_compute__ArraySortOptions, > __pyx_base.__pyx_base.__weakref__); > ^ > /home/cyb/arrow/python/build/temp.linux-x86_64-3.6/_compute.cpp:26274:146: > warning: offsetof within non-standard-layout type > ‘__pyx_obj_7pyarrow_8_compute__SortOptions’ is undefined [-Winvalid-offsetof] > x_type_7pyarrow_8_compute__SortOptions.tp_weaklistoffset = offsetof(struct > __pyx_obj_7pyarrow_8_compute__SortOptions, __pyx_base.__pyx_base.__weakref__); > ...... > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)