[
https://issues.apache.org/jira/browse/HDFS-16681?focusedWorklogId=794547&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-794547
]
ASF GitHub Bot logged work on HDFS-16681:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Jul/22 18:37
Start Date: 23/Jul/22 18:37
Worklog Time Spent: 10m
Work Description: GauthamBanasandra opened a new pull request, #4615:
URL: https://github.com/apache/hadoop/pull/4615
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
The tests in HDFS native client uses the `-Wno-missing-field-initializers`
flag to ignore warnings about uninitialized members -
https://github.com/apache/hadoop/blob/8f83d9f56d775c73af6e3fa1d6a9aa3e64eebc37/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/CMakeLists.txt#L27-L28
This leads to the following error on Visual C++.
```
[exec]
"E:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\ALL_BUILD.vcxproj"
(default target) (1) ->
[exec]
"E:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\x-platform\x_platform_dirent_test_obj.vcxproj"
(default target) (24) ->
[exec] cl : command line error D8021: invalid numeric argument
'/Wno-missing-field-initializers'
[E:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\x-platform\x_platform_dirent_test_obj.vcxproj]
```
Thus, we need to pass this flag only when the compiler isn't Visual C++.
### How was this patch tested?
1. Tested by building locally on my Windows 10 PC.
2. Hadoop Jenkins CI validation.
### For code changes:
- [x] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
Issue Time Tracking
-------------------
Worklog Id: (was: 794547)
Remaining Estimate: 0h
Time Spent: 10m
> Do not pass GCC flags for MSVC in libhdfspp
> -------------------------------------------
>
> Key: HDFS-16681
> URL: https://issues.apache.org/jira/browse/HDFS-16681
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: libhdfs++
> Affects Versions: 3.4.0
> Environment: Windows 10
> Reporter: Gautham Banasandra
> Assignee: Gautham Banasandra
> Priority: Major
> Labels: libhdfscpp
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The tests in HDFS native client uses the *-Wno-missing-field-initializers*
> flag to ignore warnings about uninitialized members -
> https://github.com/apache/hadoop/blob/8f83d9f56d775c73af6e3fa1d6a9aa3e64eebc37/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/CMakeLists.txt#L27-L28
> {code}
> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers")
> set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-field-initializers")
> {code}
> This leads to the following error on Visual C++.
> {code}
> [exec]
> "E:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\ALL_BUILD.vcxproj"
> (default target) (1) ->
> [exec]
> "E:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\x-platform\x_platform_dirent_test_obj.vcxproj"
> (default target) (24) ->
> [exec] cl : command line error D8021: invalid numeric argument
> '/Wno-missing-field-initializers'
> [E:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\x-platform\x_platform_dirent_test_obj.vcxproj]
> {code}
> Thus, we need to pass this flag only when the compiler isn't Visual C++.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]