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?
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to