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

Eric Yang edited comment on HDFS-14394 at 4/2/19 8:43 PM:
----------------------------------------------------------

[~stakiar] pedantic-errors flag forces syntax that is not defined by stand c to 
error out.  This means Hadoop unit tests have already using gnu dialect without 
realizing it.  Gcc is GPLv3 licensed, and it looks like Apache is not ok with 
GPLv3 according to this statement: 
https://apache.org/licenses/GPL-compatibility.html
This means the problem is concerning based on the latest information.  +0 from 
my side.  Others may provide more insights on how to address this matter.


was (Author: eyang):
[~stakiar] pedantic-errors flag forces syntax that is not defined by stand c to 
error out.  This means Hadoop unit tests have already using gnu dialect without 
realizing it.  Gcc is GPLv3 licensed, and it looks like Apache is ok with GPLv3 
according to this statement: https://apache.org/licenses/GPL-compatibility.html
This means the patch is probably ok base on the latest information.  +1 from my 
side.

> Add -std=c99 / -std=gnu99 to libhdfs compile flags
> --------------------------------------------------
>
>                 Key: HDFS-14394
>                 URL: https://issues.apache.org/jira/browse/HDFS-14394
>             Project: Hadoop HDFS
>          Issue Type: Task
>          Components: hdfs-client, libhdfs, native
>            Reporter: Sahil Takiar
>            Assignee: Sahil Takiar
>            Priority: Major
>         Attachments: HDFS-14394.001.patch
>
>
> libhdfs compilation currently does not enforce a minimum required C version. 
> As of today, the libhdfs build on Hadoop QA works, but when built on a 
> machine with an outdated gcc / cc version where C89 is the default, 
> compilation fails due to errors such as:
> {code}
> /build/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/jclasses.c:106:5:
>  error: ‘for’ loop initial declarations are only allowed in C99 mode
> for (int i = 0; i < numCachedClasses; i++) {
> ^
> /build/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/jclasses.c:106:5:
>  note: use option -std=c99 or -std=gnu99 to compile your code
> {code}
> We should add the -std=c99 / -std=gnu99 flags to libhdfs compilation so that 
> we can enforce C99 as the minimum required version.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to