You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/07/20 17:13:00 UTC
[jira] [Work logged] (HDFS-16467) Ensure Protobuf generated headers are included first
[ https://issues.apache.org/jira/browse/HDFS-16467?focusedWorklogId=793352&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-793352 ]
ASF GitHub Bot logged work on HDFS-16467:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Jul/22 17:12
Start Date: 20/Jul/22 17:12
Worklog Time Spent: 10m
Work Description: GauthamBanasandra opened a new pull request, #4601:
URL: https://github.com/apache/hadoop/pull/4601
* This PR ensures that the Protobuf generated headers
are always included first, even when these headers
are included transitively.
* This problem is specific to Windows only.
<!--
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
We need to ensure that the Protobuf generated headers ([such as ClientNamenodeProtocol.pb.h](https://github.com/apache/hadoop/blob/cce5a6f6094cefd2e23b73d202cc173cf4fc2cc5/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/connection/datanodeconnection.h#L23)) are included at the top. In other words, `*.ph.h` should be the first header files to be included in any of the .c/.cc/.h files. Otherwise, it causes symbol redefinition errors during compilation. Also, we need to ensure that Protobuf generated header files are the first ones to be included even in the case of `transitive inclusion` of header files.
This issue seems to be specific to Windows only. Not sure why the other platforms aren't running into this.
### How was this patch tested?
1. Tested this locally by building on my Windows system.
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: 793352)
Remaining Estimate: 0h
Time Spent: 10m
> Ensure Protobuf generated headers are included first
> ----------------------------------------------------
>
> Key: HDFS-16467
> URL: https://issues.apache.org/jira/browse/HDFS-16467
> Project: Hadoop HDFS
> Issue Type: Improvement
> 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
>
> We need to ensure that the Protobuf generated headers ([such as ClientNamenodeProtocol.pb.h|https://github.com/apache/hadoop/blob/cce5a6f6094cefd2e23b73d202cc173cf4fc2cc5/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/connection/datanodeconnection.h#L23]) are included at the top. In other words, **.ph.h* should be the first header files to be included in any of the .c/.cc/.h files. Otherwise, it causes symbol redefinition errors during compilation. Also, we need to ensure that Protobuf generated header files are the first ones to be included even in the case of *transitive inclusion* of header files.
> This issue seems to be specific to Windows only. Not sure why the other platforms aren't running into this.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org