hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruslan Ermilov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-4201) [patch] native library build script uses unportable sed(1) regexp's
Date Thu, 18 Sep 2008 12:47:44 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-4201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ruslan Ermilov updated HADOOP-4201:
-----------------------------------

    Description: 
The native library build script uses unportable sed(1) regular expressions, making it impossible
to compile a library using non-GNU sed(1).
In particular, any POSIX-conformant sed(1) implementation will fail. The following patch has
been tested to work on both Linux (Ubuntu) and FreeBSD.


  was:
The native library build script uses unportable sed(1) regular expressions, making it impossible
to compile a library using non-GNU sed(1).
In particular, any POSIX-conformant sed(1) implementation will fail. The following patch has
been tested to work on both Linux (Ubuntu) and FreeBSD.

diff --exclude=CVS --exclude=.svn -rup hadoop-0.18.0~/src/native/acinclude.m4 hadoop-0.18.0/src/native/acinclude.m4
--- hadoop-0.18.0~/src/native/acinclude.m4      2008-08-14 19:48:24.000000000 +0000
+++ hadoop-0.18.0/src/native/acinclude.m4       2008-09-11 12:17:13.412458975 +0000
@@ -10,9 +10,9 @@ AC_CACHE_CHECK([Checking for the 'actual
   if test -z "`${CC} ${LDFLAGS} -o conftest conftest.c -l$1 2>&1`"; then
     dnl Try objdump and ldd in that order to get the dynamic library
     if test ! -z "`which objdump | grep -v 'no objdump'`"; then
-      ac_cv_libname_$1="`objdump -p conftest | grep NEEDED | grep $1 | sed 's/\W*NEEDED\W*\(.*\)\W*$/\"\1\"/'`"
+      ac_cv_libname_$1="`objdump -p conftest | grep NEEDED | grep $1 | sed 's/[[[[:space:]]]]*NEEDED[[[[:space:]]]]*\([[[^[:space:]]]]*\)[[[[:space:]]]]*$/\
"\1\"/'`"
     elif test ! -z "`which ldd | grep -v 'no ldd'`"; then
-      ac_cv_libname_$1="`ldd conftest | grep $1 | sed 's/^[[[^A-Za-z0-9]]]*\([[[A-Za-z0-9\.]]]*\)[[[^A-Za-z0-9]]]*=>.*$/\"\1\"/'`"
+      ac_cv_libname_$1="`ldd conftest | grep $1 | sed 's/^[[[[:space:]]]]*\([[[^[:space:]]]]*\)[[[[:space:]]]]*=>.*$/\"\1\"/'`"
     else
       AC_MSG_ERROR(Can't find either 'objdump' or 'ldd' to compute the dynamic library for
'-l$1')
     fi



> [patch] native library build script uses unportable sed(1) regexp's
> -------------------------------------------------------------------
>
>                 Key: HADOOP-4201
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4201
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.18.0
>         Environment: FreeBSD 7.0-STABLE amd64
>            Reporter: Ruslan Ermilov
>
> The native library build script uses unportable sed(1) regular expressions, making it
impossible to compile a library using non-GNU sed(1).
> In particular, any POSIX-conformant sed(1) implementation will fail. The following patch
has been tested to work on both Linux (Ubuntu) and FreeBSD.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message