From hdfs-issues-return-258183-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Thu Mar 28 13:37:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E814B18076D for ; Thu, 28 Mar 2019 14:37:01 +0100 (CET) Received: (qmail 90078 invoked by uid 500); 28 Mar 2019 13:37:00 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 90037 invoked by uid 99); 28 Mar 2019 13:37:00 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Mar 2019 13:37:00 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7020DE2992 for ; Thu, 28 Mar 2019 13:37:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 35CDD2459C for ; Thu, 28 Mar 2019 13:37:00 +0000 (UTC) Date: Thu, 28 Mar 2019 13:37:00 +0000 (UTC) From: "Wei-Chiu Chuang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-14394) Add -std=c99 / -std=gnu99 to libhdfs compile flags MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-14394?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1680= 3938#comment-16803938 ]=20 Wei-Chiu Chuang commented on HDFS-14394: ---------------------------------------- We do mention gcc version supported in BUILD.txt {quote} One of the compilers that support thread_local storage: GCC 4.8.1 or late= r, Visual Studio, Clang (community version), Clang (version for iOS 9 and later) (if compil= ing native code) {quote} c99 is supported in gcc since at least gcc 3.2.0, so enforcing c99 doesn't = break compat. I couldn't find the minimum version of Clang that supports c9= 9, but I guess it's reasonable to assume Clang supports c99 since inception= , since Clang was first released in 2007. > Add -std=3Dc99 / -std=3Dgnu99 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 > > libhdfs compilation currently does not enforce a minimum required C versi= on. 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, compila= tion fails due to errors such as: > {code} > /build/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/nati= ve/libhdfs/jclasses.c:106:5: error: =E2=80=98for=E2=80=99 loop initial decl= arations are only allowed in C99 mode > for (int i =3D 0; i < numCachedClasses; i++) { > ^ > /build/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/nati= ve/libhdfs/jclasses.c:106:5: note: use option -std=3Dc99 or -std=3Dgnu99 to= compile your code > {code} > We should add the -std=3Dc99 / -std=3Dgnu99 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: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org