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

Arkadiy Vertleyb commented on ARROW-16778:
------------------------------------------

[~willjones127][~kou] The following patch fixes the issue (this is in the code 
I was advised to use as a fallback:

@@ -255,7 +262,7 @@ static inline int CountTrailingZeros(uint64_t value) {
 #else
   int bitpos = 0;
   if (value) {
-    while (value & 1 == 0) {
+    while ((value & 1) == 0) {
       value >>= 1;
       ++bitpos;
     }


> [C++] 32 bit MSVC doesn't build
> -------------------------------
>
>                 Key: ARROW-16778
>                 URL: https://issues.apache.org/jira/browse/ARROW-16778
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>         Environment: Win32, MSVC
>            Reporter: Arkadiy Vertleyb
>            Priority: Major
>
> When specifying Win32 as a platform, and building with MSVC, the build fails 
> with the following compile errors :
> {noformat}
> C:\Users\avertleyb\git\arrow\cpp\src\arrow/util/bit_util.h(70,59): error 
> C3861: '__popcnt64': identifier not found 
> [C:\Users\avertleyb\git\arrow\cpp\build32\src\arrow\arrow_shared.vcxproj]
> C:\Users\avertleyb\git\arrow\cpp\src\arrow/util/bit_util.h(204,7): error 
> C3861: '_BitScanReverse64': identifier not found 
> [C:\Users\avertleyb\git\arrow\cpp\build32\src\arrow\arrow_shared.vcxproj]
> C:\Users\avertleyb\git\arrow\cpp\src\arrow/util/bit_util.h(250,7): error 
> C3861: '_BitScanForward64': identifier not found 
> [C:\Users\avertleyb\git\arrow\cpp\build32\src\arrow\arrow_shared.vcxproj] 
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to