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 2D77197B1 for ; Thu, 22 Mar 2012 04:28:48 +0000 (UTC) Received: (qmail 21336 invoked by uid 500); 22 Mar 2012 04:28:47 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 21302 invoked by uid 500); 22 Mar 2012 04:28:47 -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 21292 invoked by uid 99); 22 Mar 2012 04:28:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2012 04:28:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2012 04:28:45 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DF0141B6DF4 for ; Thu, 22 Mar 2012 04:28:23 +0000 (UTC) Date: Thu, 22 Mar 2012 04:28:23 +0000 (UTC) From: "Eugene Koontz (Updated) (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <889777667.1013.1332390504051.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1882221168.1004.1332390263049.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HADOOP-8196) avoid linker's stripping of dead code from interfering with configure's library name resolution MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-8196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eugene Koontz updated HADOOP-8196: ---------------------------------- Attachment: (was: HADOOP-8196.patch) > avoid linker's stripping of dead code from interfering with configure's library name resolution > ----------------------------------------------------------------------------------------------- > > Key: HADOOP-8196 > URL: https://issues.apache.org/jira/browse/HADOOP-8196 > Project: Hadoop Common > Issue Type: Bug > Components: native > Affects Versions: 0.24.0 > Reporter: Eugene Koontz > Fix For: 0.24.0 > > Attachments: HADOOP-8196.patch > > > The configure script generated by hadoop-common/hadoop-common-project/hadoop-common/src/main/native/configure.ac uses the AC_COMPUTE_NEEDED_DSO m4 macro to generate a small probe program in C which it then compiles and links, and then scans the resultant binary to find the names of certain libraries: currently this is used for Zlib and Snappy. > I was unable to compile with -Pnative on my Ubuntu Linux install because configure could not find libz and libsnappy. This turned out to be because the linker is removing the dependencies on libz and libsnappy at link-time because the libraries in question are not used in the simple probe code generated by the AC_COMPUTE_NEEDED_DSO m4 macro. > So my fix is modify the AC_COMPUTE_NEEDED_DSO to take another parameter that copies the given argument's text into the C program. Then, in the call to AC_COMPUTE_NEEDED_DSO, we can use this additional parameter, to include, in the generated C code, an actual library function call for each library. This prevents the linker from removing the linkage to the desired libraries. > My gcc and ldd version information are given below: > {code} > eugene@latitude:~/hadoop-common$ gcc --version > gcc (Ubuntu/Linaro 4.6.3-1ubuntu3) 4.6.3 > Copyright (C) 2011 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > eugene@latitude:~/hadoop-common$ ld --version > GNU ld (GNU Binutils for Ubuntu) 2.22 > Copyright 2011 Free Software Foundation, Inc. > This program is free software; you may redistribute it under the terms of > the GNU General Public License version 3 or (at your option) a later version. > This program has absolutely no warranty. > {code} -- 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