westonpace commented on issue #10488:
URL: https://github.com/apache/arrow/issues/10488#issuecomment-867316969


   So if I use the attached CMakeLists.txt then everything seems to work.  My 
setup is a conda setup and I am using an environment arrow-release-4 which has 
arrow-cpp installed (which is where those shared libraries in the attached 
CMakeLists come from).  I get the following output.
   
   ```
   pyarrow.Table
   time: int64
   open: double
   high: double
   low: double
   close: double
   volume: int64
                 time     open    high      low    close   volume
   0       1533044190  281.330  281.43  281.170  281.420  3482506
   1       1533044189  281.420  281.44  281.290  281.310   287506
   2       1533044188  281.315  281.32  281.220  281.280    81306
   3       1533044187  281.280  281.29  281.160  281.170   123903
   4       1533044186  281.170  281.17  281.125  281.130    86812
   ...            ...      ...     ...      ...      ...      ...
   102143  1499952604  244.090  244.16  244.080  244.080    29561
   102144  1499952603  244.070  244.09  243.960  243.970    36525
   102145  1499952602  243.970  243.97  243.910  243.930    58245
   102146  1499952601  243.930  244.07  243.930  244.035    76501
   102147  1499952600  244.040  244.04  244.020  244.020   207277
   
   [102148 rows x 6 columns]
   Array has size of: 
   4.90316
   Megabytes
   arrow function called
   length check passed
   status1
   resize called
   appended data (via unsafe call)
   returning array
   0:00:00.006273
   pyarrow.Table
   time: int64
   open: double
   high: double
   low: double
   close: double
   volume: int64
   Volume_Adjusted_Close: double
   ```
   
   My suspicion is that the issue is here:
   
   ```
   target_link_libraries(helperfuncs PRIVATE arrow_static) #arrow_shared
   target_link_libraries(helperfuncs PRIVATE 
PYTHONPATH/site-packages/pyarrow/libarrow_python.so.400)
   ```
   
   It appears you are linking arrow statically but linking arrow_python as a 
shared library.  I'm not sure if that is valid or not.  Even if it is valid 
there is no static arrow library supplied by pyarrow.  That means that 
find_package must be finding Arrow from some other location.  The end result is 
some kind of library ABI mismatch.
   
   I'm still getting up to speed on cmake myself but what happens if you try...
   
   ```
   target_link_libraries(helperfuncs PRIVATE 
PYTHONPATH/site-packages/pyarrow/libarrow.so.400)
   ```
   
   I'm pretty sure at this point you can get rid of `find_package(Arrow 
REQUIRED)` too.


-- 
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.

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


Reply via email to