Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 97D7298BC for ; Tue, 22 May 2012 15:40:42 +0000 (UTC) Received: (qmail 25084 invoked by uid 500); 22 May 2012 15:40:42 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 25015 invoked by uid 500); 22 May 2012 15:40:41 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 24900 invoked by uid 99); 22 May 2012 15:40:41 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2012 15:40:41 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id A4E0914280B for ; Tue, 22 May 2012 15:40:41 +0000 (UTC) Date: Tue, 22 May 2012 15:40:41 +0000 (UTC) From: "Colin Patrick McCabe (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <1646361808.8371.1337701241679.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1709016574.36550.1336426129196.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HADOOP-8368) Use CMake rather than autotools to build native code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-8368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Colin Patrick McCabe updated HADOOP-8368: ----------------------------------------- Attachment: HADOOP-8368.012.half.patch * here is the patch without removed files > Use CMake rather than autotools to build native code > ---------------------------------------------------- > > Key: HADOOP-8368 > URL: https://issues.apache.org/jira/browse/HADOOP-8368 > Project: Hadoop Common > Issue Type: Improvement > Affects Versions: 2.0.0 > Reporter: Colin Patrick McCabe > Assignee: Colin Patrick McCabe > Priority: Minor > Attachments: HADOOP-8368.001.patch, HADOOP-8368.005.patch, HADOOP-8368.006.patch, HADOOP-8368.007.patch, HADOOP-8368.008.patch, HADOOP-8368.009.patch, HADOOP-8368.010.patch, HADOOP-8368.012.half.patch, HADOOP-8368.012.patch > > > It would be good to use cmake rather than autotools to build the native (C/C++) code in Hadoop. > Rationale: > 1. automake depends on shell scripts, which often have problems running on different operating systems. It would be extremely difficult, and perhaps impossible, to use autotools under Windows. Even if it were possible, it might require horrible workarounds like installing cygwin. Even on Linux variants like Ubuntu 12.04, there are major build issues because /bin/sh is the Dash shell, rather than the Bash shell as it is in other Linux versions. It is currently impossible to build the native code under Ubuntu 12.04 because of this problem. > CMake has robust cross-platform support, including Windows. It does not use shell scripts. > 2. automake error messages are very confusing. For example, "autoreconf: cannot empty /tmp/ar0.4849: Is a directory" or "Can't locate object method "path" via package "Autom4te..." are common error messages. In order to even start debugging automake problems you need to learn shell, m4, sed, and the a bunch of other things. With CMake, all you have to learn is the syntax of CMakeLists.txt, which is simple. > CMake can do all the stuff autotools can, such as making sure that required libraries are installed. There is a Maven plugin for CMake as well. > 3. Different versions of autotools can have very different behaviors. For example, the version installed under openSUSE defaults to putting libraries in /usr/local/lib64, whereas the version shipped with Ubuntu 11.04 defaults to installing the same libraries under /usr/local/lib. (This is why the FUSE build is currently broken when using OpenSUSE.) This is another source of build failures and complexity. If things go wrong, you will often get an error message which is incomprehensible to normal humans (see point #2). > CMake allows you to specify the minimum_required_version of CMake that a particular CMakeLists.txt will accept. In addition, CMake maintains strict backwards compatibility between different versions. This prevents build bugs due to version skew. > 4. autoconf, automake, and libtool are large and rather slow. This adds to build time. > For all these reasons, I think we should switch to CMake for compiling native (C/C++) code in Hadoop. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira