Maybe someone can correct me if im wrong, but this is what I did to get libhdfs on 0.20.0 to build:
NOTE: on debian, you need to apply a patch: https://issues.apache.org/jira/browse/HADOOP-5611 Compile libhdfs: ant compile-contrib -Dlibhdfs=1 Then to install libhdfs in the local hadoop lib: ant package -Dlibhdfs=1 If the ant package -Dlibhdfs=1 command fails due to Forrest, then you can remove the docs from being packaged. cd $HADOOP_HOME/ vi build.xml Then change the package target, and remove the "javadoc", "docs", and "cn-docs" targets from the dependencies and re-run the package command. Finally, add a soft link for backwards compatibility so hdfs-fuse/fuse-dfs can find the libhdfs.so file: ln -s ./c++/{OS}-{ARCH}/lib build/libhdfs On Thu, Sep 10, 2009 at 8:38 AM, Touretsky, Gregory < gregory.touret...@intel.com> wrote: > Hi, > > > > I have a problem building libhdfs.so in Hadoop 0.20.1 > > From what I could see, the build process has changed significantly in > 0.20.0 (as mentioned in http://issues.apache.org/jira/browse/HADOOP-3344), > and “ant compile-libhdfs -Dlibhdfs=1” can’t be used anymore. > > I’m trying to use standard autotools to build the libhdfs – but it always > fails: > > >cd /tmp/hadoop-0.20.1/src/c++/libhdfs > > >./configure >& ~/tmp/configure.out (see attached) > > > make > > if /bin/sh ./libtool --mode=compile --tag=CC > /usr/intel/pkgs/gcc/4.4.0/bin/gcc -DPACKAGE_NAME=\"libhdfs\" > -DPACKAGE_TARNAME=\"libhdfs\" -DPACKAGE_VERSION=\"0.1.0\" > -DPACKAGE_STRING=\"libhdfs\ 0.1.0\" -DPACKAGE_BUGREPORT=\" > omal...@apache.org\" -DPACKAGE=\"libhdfs\" -DVERSION=\"0.1.0\" > -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 > -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 > -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" > -Dsize_t=unsigned\ int -DHAVE_FCNTL_H=1 -Dconst= -Dvolatile= -I. -I. -g > -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"amd64\" -m > -I/usr/intel/pkgs/java/1.6.0.10/include > -I/usr/intel/pkgs/java/1.6.0.10/include/linux<http://1.6.0.10/include%0A-I/usr/intel/pkgs/java/1.6.0.10/include/linux>-Wall > -Wstrict-prototypes -MT hdfs.lo -MD -MP -MF ".deps/hdfs.Tpo" -c -o > hdfs.lo hdfs.c; \ > > then mv -f ".deps/hdfs.Tpo" ".deps/hdfs.Plo"; else rm -f ".deps/hdfs.Tpo"; > exit 1; fi > > libtool: compile: /usr/intel/pkgs/gcc/4.4.0/bin/gcc > -DPACKAGE_NAME=\"libhdfs\" -DPACKAGE_TARNAME=\"libhdfs\" > -DPACKAGE_VERSION=\"0.1.0\" "-DPACKAGE_STRING=\"libhdfs 0.1.0\"" > -DPACKAGE_BUGREPORT=\"omal...@apache.org\" -DPACKAGE=\"libhdfs\" > -DVERSION=\"0.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 > -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 > -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 > -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" "-Dsize_t=unsigned int" > -DHAVE_FCNTL_H=1 -Dconst= -Dvolatile= -I. -I. -g -O2 -DOS_LINUX -DDSO_DLFCN > -DCPU=\"amd64\" -m -I/usr/intel/pkgs/java/1.6.0.10/include > -I/usr/intel/pkgs/java/1.6.0.10/include/linux<http://1.6.0.10/include%0A-I/usr/intel/pkgs/java/1.6.0.10/include/linux>-Wall > -Wstrict-prototypes -MT hdfs.lo -MD -MP -MF .deps/hdfs.Tpo -c hdfs.c > -fPIC -DPIC -o .libs/hdfs.o > > cc1: error: unrecognized command line option "-m" > > make: *** [hdfs.lo] Error 1 > > > > Any idea how to do it now? > Also, it’s probably time to update the > http://wiki.apache.org/hadoop/MountableHDFS guide. > > > > Thanks in advance, > > Gregory Touretsky > > --------------------------------------------------------------------- > Intel Israel (74) Limited > > This e-mail and any attachments may contain confidential material for > the sole use of the intended recipient(s). Any review or distribution > by others is strictly prohibited. If you are not the intended > recipient, please contact the sender and delete all copies. > >