You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Zhaojun-Liu (via GitHub)" <gi...@apache.org> on 2023/05/09 06:17:47 UTC

[GitHub] [arrow] Zhaojun-Liu opened a new issue, #35501: [MSVC] Arrow failed to build with MSVC under /std:c++latest mode due to error C2280: 'std::basic_string,std::allocator>::basic_string(std::nullptr_t)': attempting to reference a deleted function

Zhaojun-Liu opened a new issue, #35501:
URL: https://github.com/apache/arrow/issues/35501

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   Hi all, 
   Recently, we updated the commit of Arrow, and it failed to build with MSVC due to belwo error on Windows with option /std:c++latest:
   `error C2280: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(std::nullptr_t)': attempting to reference a deleted function ` 
   Could you please help look this issue? Thanks.
   
   **Repro steps:**
   1. git clone https://github.com/apache/arrow F:\gitP\apache\arrow
   2. git -C "F:\gitP\apache\arrow" submodule sync
   3. git -C "F:\gitP\apache\arrow" submodule update --init --recursive
   4. mkdir F:\gitP\apache\arrow\cpp\build_amd64 and cd F:\gitP\apache\arrow\cpp\build_amd64
   5. set \_CL_= /std:c++latest
   6. cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DCMAKE_BUILD_TYPE=Release -DARROW_BUILD_TESTS=ON -DBOOST_ROOT=F:\tools\boost_1_77_0\x64 ..
   7. msbuild /maxcpucount:1 /p:Platform=x64 /p:Configuration=Release arrow.sln /t:Rebuild
   
   The commit we use: f9324b7
   
   **Expected result:**
   Build successfully.
   
   **Actual result:**
   `F:\gitP\apache\arrow\cpp\src\arrow/compute/function_internal.h(289,3): error C2280: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(std::nullptr_t)': attempting to reference a deleted function [F:\gitP\apache\arrow\cpp\build_amd64\src\arrow\arrow_static.vcxproj]`
   
   **Detailed log:**
   [build.log](https://github.com/apache/arrow/files/11427952/build.log)
   
   
   ### Component(s)
   
   C++


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

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] westonpace commented on issue #35501: [MSVC] Arrow failed to build with MSVC under /std:c++latest mode due to error C2280: 'std::basic_string,std::allocator>::basic_string(std::nullptr_t)': attempting to reference a deleted function

Posted by "westonpace (via GitHub)" <gi...@apache.org>.
westonpace commented on issue #35501:
URL: https://github.com/apache/arrow/issues/35501#issuecomment-1553130378

   @Zhaojun-Liu are you interested in contributing a PR?


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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou closed issue #35501: [MSVC] Arrow failed to build with MSVC under /std:c++latest mode due to error C2280: 'std::basic_string,std::allocator>::basic_string(std::nullptr_t)': attempting to reference a deleted function

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #35501: [MSVC] Arrow failed to build with MSVC under /std:c++latest mode due to error C2280: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(std::nullptr_t)': attempting to reference a deleted function
URL: https://github.com/apache/arrow/issues/35501


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

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] Zhaojun-Liu commented on issue #35501: [MSVC] Arrow failed to build with MSVC under /std:c++latest mode due to error C2280: 'std::basic_string,std::allocator>::basic_string(std::nullptr_t)': attempting to reference a deleted function

Posted by "Zhaojun-Liu (via GitHub)" <gi...@apache.org>.
Zhaojun-Liu commented on issue #35501:
URL: https://github.com/apache/arrow/issues/35501#issuecomment-1553905261

   > @Zhaojun-Liu are you interested in contributing a PR?
   
   In our test, I just try to change `nullptr` to be `""` at line https://github.com/apache/arrow/blob/main/cpp/src/arrow/compute/function_internal.h#L289, and it will build ok, but I'm not sure if this change will have other effects.


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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #35501: [MSVC] Arrow failed to build with MSVC under /std:c++latest mode due to error C2280: 'std::basic_string,std::allocator>::basic_string(std::nullptr_t)': attempting to reference a deleted function

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #35501:
URL: https://github.com/apache/arrow/issues/35501#issuecomment-1553981009

   Using `std::basic_string::basic_string("")` instead of `std::basic_string::basic_string(std::nullptr_t)` is a right approach.
   Could you open a pull request with the approach?


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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #35501: [MSVC] Arrow failed to build with MSVC under /std:c++latest mode due to error C2280: 'std::basic_string,std::allocator>::basic_string(std::nullptr_t)': attempting to reference a deleted function

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #35501:
URL: https://github.com/apache/arrow/issues/35501#issuecomment-1540089017

   It seems that `std::basic_string::basic_string(std::nullptr_t)` is deleted since C++23.
   It will be related to this.


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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] Zhaojun-Liu commented on issue #35501: [MSVC] Arrow failed to build with MSVC under /std:c++latest mode due to error C2280: 'std::basic_string,std::allocator>::basic_string(std::nullptr_t)': attempting to reference a deleted function

Posted by "Zhaojun-Liu (via GitHub)" <gi...@apache.org>.
Zhaojun-Liu commented on issue #35501:
URL: https://github.com/apache/arrow/issues/35501#issuecomment-1554240914

   > Using `std::basic_string::basic_string("")` instead of `std::basic_string::basic_string(std::nullptr_t)` is a right approach. Could you open a pull request with the approach?
   
   Ok, I have submitted the pull request.


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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org