hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Francke (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-2009) configure script for compiling hadoop native doesn't set lzo lib name correctly
Date Thu, 05 Mar 2009 03:05:56 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-2009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679049#action_12679049

Lars Francke commented on HADOOP-2009:

I have a similar problem using FreeBSD 7.1.

ac_cv_libname_$1="`objdump -p conftest | grep NEEDED | grep $1 | sed 's/\W*NEEDED\W*\(.*\)\W*$/\"\1\"/'`"

A sample objdump output line is:
  NEEDED      libc.so.7
the sed regex resolves this to:
"      libc.so.7"
with four extra spaces in front of the lib name. This causes the lib to fail loading.
Manually changing the config.h works but I don't know how to fix this regex.

To find this out I changed the following line in ZLibCompressor (and the other files):
		THROW(env, "java/lang/UnsatisfiedLinkError", "Cannot load libz.so");
		THROW(env, "java/lang/UnsatisfiedLinkError", dlerror());
and changed ZlibCompressor.java to include a LOG and actually output the exception message
thrown in the native code. As it is now the message is simply discarded and the only message
that is shown is "Failed to load/initialize native-zlib library". Not very helpful :)

I'm not sure if I should open a new issue for this last part but I believe it would be a sensible
default behaviour.

> configure script for compiling hadoop native doesn't set lzo lib name correctly
> -------------------------------------------------------------------------------
>                 Key: HADOOP-2009
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2009
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 0.13.1
>         Environment: Fedora, amd64
>            Reporter: Joydeep Sen Sarma
>            Assignee: Arun C Murthy
> Looks like this was already reported (but not resolved on the the list): http://tinyurl.com/2rwu6x
> I would like to compile libhadoop on amd64/Fedora and everything seems kosher until I
hit this compile error:
>      [exec] /home/jssarma/fbprojects/hadoop-0.13.1/src/native/src/org/apache/hadoop/io/compress/lzo/LzoCompressor.c:116:
error: syntax error before ',' token
> the line in question is:
>     // Load liblzo2.so                                                              
>     liblzo2 = dlopen(HADOOP_LZO_LIBRARY, RTLD_LAZY | RTLD_GLOBAL);
> seems like this is being set by:
> configure:#define HADOOP_LZO_LIBRARY ${ac_cv_libname_lzo2}
> I tried executing the relevant part of configure by hand:
>   if test -z "`${CC} -o conftest conftest.c -llzo2 2>&1`"; then
>         if test ! -z "`which objdump`"; then
>       ac_cv_libname_lzo2="`objdump -p conftest | grep NEEDED | grep lzo2 | sed 's/\W*NEEDED\W*\(.*\)\W*$/\
> \"\1\"/'`"
> This is not working on my system, since:
> > objdump -p conftest | grep NEEDED                         
>   NEEDED      libc.so.6
> So that would explain the compile error. Editing the configure script manually for now

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

View raw message