Kumar Ravi created HADOOP-8333: ---------------------------------- Summary: src/contrib/fuse-dfs build fails on non-Sun JVM environments Key: HADOOP-8333 URL: https://issues.apache.org/jira/browse/HADOOP-8333 Project: Hadoop Common Issue Type: Bug Components: build Affects Versions: 1.0.2 Environment: IBM Java 6 Reporter: Kumar Ravi
src/contrib/fuse-dfs build failure when building in IBM Java 6 environment. The message on the console when the build aborts is: [exec] /usr/bin/ld: cannot find -ljvm [exec] collect2: ld returned 1 exit status [exec] make[1]: *** [fuse_dfs] Error 1 [exec] make[1]: Leaving directory `/home/hadoop/branch-1.0_0427/src/contrib/fuse-dfs/src' [exec] make: *** [all-recursive] Error 1 The reason this seems to be happening is because of the last line in src/contrib/fuse-dfs/src/Makefile.am AM_LDFLAGS= -L$(HADOOP_HOME)/build/libhdfs -lhdfs -L$(FUSE_HOME)/lib -lfuse -L$(JAVA_HOME)/jre/lib/$(OS_ARCH)/server -ljvm For hadoop to build on IBM Java, this last line should read as follows since this is where the libjvm library resides AM_LDFLAGS= -L$(HADOOP_HOME)/build/libhdfs -lhdfs -L$(FUSE_HOME)/lib -lfuse -L$(JAVA_HOME)/jre/lib/$(OS_ARCH)/j9vm -ljvm IMO, Changes like the following will need to be made to src/contrib/fuse-dfs/configure.ac (?) to include changes similar to that in src/native/ to check for the appropriate JVM and configure the appropriate path for ljvm. dnl Check for '-ljvm' JNI_LDFLAGS="" if test $JAVA_HOME != "" then JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH/server" JVMSOPATH=`find $JAVA_HOME/jre/ -name libjvm.so | head -n 1` JNI_LDFLAGS="$JNI_LDFLAGS -L`dirname $JVMSOPATH`" fi ldflags_bak=$LDFLAGS LDFLAGS="$LDFLAGS $JNI_LDFLAGS" AC_CHECK_LIB([jvm], [JNI_GetCreatedJavaVMs]) LDFLAGS=$ldflags_bak AC_SUBST([JNI_LDFLAGS]) # Checks for header files. dnl Check for Ansi C headers AC_HEADER_STDC dnl Check for other standard C headers AC_CHECK_HEADERS([stdio.h stddef.h], [], AC_MSG_ERROR(Some system headers not found... please ensure their presence on your platform.)) dnl Check for JNI headers JNI_CPPFLAGS="" if test $JAVA_HOME != "" then for dir in `find $JAVA_HOME/include -follow -type d` do JNI_CPPFLAGS="$JNI_CPPFLAGS -I$dir" done fi -- 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