Danny Kim created ARROW-7316:
--------------------------------

             Summary: compile error due to incomplete type for unique_ptr
                 Key: ARROW-7316
                 URL: https://issues.apache.org/jira/browse/ARROW-7316
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
    Affects Versions: 0.15.1
         Environment: WSL, conda, arrow version 0.15
            Reporter: Danny Kim


Hi, 
I am getting following compile error from Arrow c++
{code:java}
Warning: Can't read registry to find the necessary compiler setting 
Make sure that Python modules winreg, win32api or win32con are installed.C 
compiler: /home/danny/miniconda3/envs/DEV/bin/x86_64-conda_cos6-linux-gnu-cc 
-Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall 
-Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC 
-fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell 
-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt 
-O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC 
-fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -DNDEBUG 
-D_FORTIFY_SOURCE=2 -O2 -fPIC 
compile options: '-DBUILTIN_PARQUET_READER -I. 
-I/home/danny/miniconda3/envs/DEV/include 
-I/home/danny/miniconda3/envs/DEV/include/python3.7m -c'
extra options: '-std=c++11 -g0 -O3'
x86_64-conda_cos6-linux-gnu-cc: bodo/io/_parquet.cpp
x86_64-conda_cos6-linux-gnu-cc: bodo/io/_parquet_reader.cpp
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC 
but not for C++
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC 
but not for C++
In file included from 
/home/danny/miniconda3/envs/DEV/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/memory:80:0,
 from /home/danny/miniconda3/envs/DEV/include/parquet/arrow/reader.h:22,
 from 
bodo/io/_parquet.cpp:13:/home/danny/miniconda3/envs/DEV/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/bits/unique_ptr.h:
 In instantiation of 'void std::default_delete<_Tp>::operator()(_Tp*) const 
[with _Tp = arrow::RecordBatchReader]':
/home/danny/miniconda3/envs/DEV/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/bits/unique_ptr.h:268:17:
 required from 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = 
arrow::RecordBatchReader; _Dp = 
std::default_delete<arrow::RecordBatchReader>]'/home/danny/miniconda3/envs/DEV/include/parquet/arrow/reader.h:161:49:
 required from here
/home/danny/miniconda3/envs/DEV/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/bits/unique_ptr.h:76:22:
 error: invalid application of 'sizeof' to incomplete type 
'arrow::RecordBatchReader'
 static_assert(sizeof(_Tp)>0, ^In file included from 
/home/danny/miniconda3/envs/DEV/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/bits/shared_ptr.h:52:0,
 from 
/home/danny/miniconda3/envs/DEV/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/memory:81,
 from /home/danny/miniconda3/envs/DEV/include/parquet/arrow/reader.h:22,
 from bodo/io/_parquet.cpp:13:
/home/danny/miniconda3/envs/DEV/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/bits/shared_ptr_base.h:
 In instantiation of 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*) 
[with _Yp = arrow::RecordBatchReader; <template-parameter-2-2> = void; _Tp = 
arrow::RecordBatchReader; __gnu_cxx::_Lock_policy _Lp = 
(__gnu_cxx::_Lock_policy)2]':
/home/danny/miniconda3/envs/DEV/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/bits/shared_ptr_base.h:1243:4:
 required from 'std::__shared_ptr<_Tp, _Lp>::_SafeConv<_Yp> 
std::__shared_ptr<_Tp, _Lp>::reset(_Yp*) [with _Yp = arrow::RecordBatchReader; 
_Tp = arrow::RecordBatchReader; __gnu_cxx::_Lock_policy _Lp = 
(__gnu_cxx::_Lock_policy)2; std::__shared_ptr<_Tp, _Lp>::_SafeConv<_Yp> = void]'
/home/danny/miniconda3/envs/DEV/include/parquet/arrow/reader.h:164:29: required 
from here
/home/danny/miniconda3/envs/DEV/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/bits/shared_ptr_base.h:1082:25:
 error: invalid application of 'sizeof' to incomplete type 
'arrow::RecordBatchReader'
 static_assert( sizeof(_Yp) > 0, "incomplete type" );
 ^
error: Command 
"/home/danny/miniconda3/envs/DEV/bin/x86_64-conda_cos6-linux-gnu-cc 
-Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall 
-Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC 
-fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell 
-ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe 
-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong 
-fno-plt -O2 -ffunction-sections -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC 
-DBUILTIN_PARQUET_READER -I. -I/home/danny/miniconda3/envs/DEV/include 
-I/home/danny/miniconda3/envs/DEV/include/python3.7m -c bodo/io/_parquet.cpp -o 
build/temp.linux-x86_64-3.7/bodo/io/_parquet.o -std=c++11 -g0 -O3" failed with 
exit status 1{code}
 
The actual error in above entire error message is
{code:java}
/home/danny/miniconda3/envs/DEV/include/parquet/arrow/reader.h:161:49: required 
from here 
/home/danny/miniconda3/envs/DEV/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/bits/unique_ptr.h:76:22:
 error: invalid application of 'sizeof' to incomplete type 
'arrow::RecordBatchReader' static_assert(sizeof(_Tp)>0,
{code}
 
New code(line 161 to 166 in parquet/arrow/reader.h) is introduced in version 
0.15 and the new code is generating above compile errors. 
Any remedy for this?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to