[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-16 Thread Antoine Pitrou (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17302872#comment-17302872
 ] 

Antoine Pitrou commented on ARROW-11954:


Cool. I _think_ the explanation is that Solaris 10 simply doesn't have 
{{posix_madvise}}, so whatever {{#define}} hackery would fail bringing it into 
life.

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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


[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-16 Thread Neal Richardson (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17302857#comment-17302857
 ] 

Neal Richardson commented on ARROW-11954:
-

Success! I'll put up a PR. Thank you!

This seems to be the last C++ compile error, though there was a problem 
downstream with the r/configure script, so I don't know yet if it all runs 
correctly. 

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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


[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-16 Thread Antoine Pitrou (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17302820#comment-17302820
 ] 

Antoine Pitrou commented on ARROW-11954:


Ok, last try for today: 
https://gist.github.com/pitrou/a88242e3ec76117c2db5a7958ce1923d

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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


[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-16 Thread Neal Richardson (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17302815#comment-17302815
 ] 

Neal Richardson commented on ARROW-11954:
-

I test by:

* Creating a branch with this patch and a few R tweaks: 
https://github.com/apache/arrow/compare/master...nealrichardson:try-solaris-march
* Building the R source package locally {{R CMD build --no-build-vignettes r}}
* Building a C++ source artifact and putting it in an S3 bucket using the R 
nightly package machinery slightly off-label (click re-run jobs on 
https://github.com/ursa-labs/arrow-r-nightly/actions/runs/649451329)
* Upload the R package to https://builder.r-hub.io/advanced and select the 
first Solaris builder (not Oracle Developer Studio version, that doesn't handle 
C++11)

It is possible to get the VM that R-Hub uses locally, but I haven't gone to the 
trouble yet https://github.com/r-hub/solarischeck/tree/master/packer

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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


[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-16 Thread Antoine Pitrou (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17302808#comment-17302808
 ] 

Antoine Pitrou commented on ARROW-11954:


How do you try? Is there a way to test directly somewhere?

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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


[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-16 Thread Neal Richardson (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17302805#comment-17302805
 ] 

Neal Richardson commented on ARROW-11954:
-

:( no luck, unfortunately. 

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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


[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-16 Thread Antoine Pitrou (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17302766#comment-17302766
 ] 

Antoine Pitrou commented on ARROW-11954:


Ok, can you try this new patch: 
[https://gist.github.com/pitrou/ec0e29dedb2fbc1a63946602a0c92d64] ?

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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


[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-16 Thread Antoine Pitrou (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17302753#comment-17302753
 ] 

Antoine Pitrou commented on ARROW-11954:


I did :(

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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


[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-16 Thread Neal Richardson (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17302691#comment-17302691
 ] 

Neal Richardson commented on ARROW-11954:
-

Thanks [~apitrou]. That solved the mremap error but not posix_madvise--did you 
expect it to fix both? 

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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


[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-16 Thread Antoine Pitrou (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17302368#comment-17302368
 ] 

Antoine Pitrou commented on ARROW-11954:


Can you try this patch?
https://gist.github.com/pitrou/bdc281844dc898c96bc28816144a9bd5

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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


[jira] [Commented] (ARROW-11954) [C++] arrow/util/io_util.cc does not compile on Solaris

2021-03-15 Thread Neal Richardson (Jira)


[ 
https://issues.apache.org/jira/browse/ARROW-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17301779#comment-17301779
 ] 

Neal Richardson commented on ARROW-11954:
-

If I read 
https://docs.oracle.com/cd/E36784_01/html/E36874/posix-madvise-3c.html 
correctly, posix_madvise should be available (on some Solaris system at least), 
but we're including that header and it's not there, so maybe we need to use 
madvise instead: https://man7.org/linux/man-pages/man2/madvise.2.html

I'm not sure about mremap: 
https://stackoverflow.com/questions/32211879/mremap-to-0-terminate-a-string

> [C++] arrow/util/io_util.cc does not compile on Solaris
> ---
>
> Key: ARROW-11954
> URL: https://issues.apache.org/jira/browse/ARROW-11954
> Project: Apache Arrow
>  Issue Type: Sub-task
>  Components: C++
>Reporter: Neal Richardson
>Priority: Major
>
> Looks similar to ARROW-11740
> {code}
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryMapRemap(void*, 
> std::size_t, std::size_t, int, void**)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:48:
>  error: ‘MREMAP_MAYMOVE’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1089:62:
>  error: ‘mremap’ was not declared in this scope
> *new_addr = mremap(addr, old_size, new_size, MREMAP_MAYMOVE);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:
>  In function ‘arrow::Status arrow::internal::MemoryAdviseWillNeed(const 
> std::vector&)’:
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:59:
>  error: ‘POSIX_MADV_WILLNEED’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> /export/home/XI4sjNd/Rtemp/RtmpvN4Lx2/fileef105d2909/cpp/src/arrow/util/io_util.cc:1144:78:
>  error: ‘posix_madvise’ was not declared in this scope
> int err = posix_madvise(aligned.addr, aligned.size, POSIX_MADV_WILLNEED);
>  ^
> {code}



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