我试图在运行Fedora 14的机器上从Hadoop 0.20.2编译hdfs-fuse扩展。下面是我安装的软件包:
保险丝2.8.5-2.fc14.x86_64
熔断器库,2.8.5-2.fc14.x86_64
保险丝-devel的-2.8.5-2.fc14.x86_64
然后,我按照Hadoop wiki上提供的教程:
http://wiki.apache.org/hadoop/MountableHDFS
总结一下,这里是我使用的步骤:
在进入$ HADOOP_HOME,我使用下面的命令启动libhdfs的编译:
ant编译-C ++ – libhdfs -Dislibhdfs = 1
在第二步中,我将libhdfs库复制到libhdfs文件夹中:
mkdir build / libhdfs
cp build / c ++ / Linux-amd64-64 / lib / * build / libhdfs
我编译fuse_hdfs可执行文件:
ant compile-contrib -Dislibhdfs = 1 -Dfusedfs = 1 -Dlibhdfs-fuse = 1
我的问题是,在最后阶段,我得到以下错误:
[exec] Making all in . [exec] make[1]: Entering directory `/local/opt/hadoop-0.20.2/src/contrib/fuse-dfs' [exec] make[1]: Nothing to be done for `all-am'. [exec] make[1]: Leaving directory `/local/opt/hadoop-0.20.2/src/contrib/fuse-dfs' [exec] Making all in src [exec] make[1]: Entering directory `/local/opt/hadoop-0.20.2/src/contrib/fuse-dfs/src' [exec] gcc -Wall -O3 -L/local/opt/hadoop-0.20.2/build/libhdfs -lhdfs -L/lib -lfuse -L/user/lpellegr/home/local/opt/jdk//jre/lib/amd64/server -ljvm -o fuse_dfs fuse_dfs.o fuse_options.o fuse_trash.o fuse_stat_struct.o fuse_users.o fuse_init.o fuse_connect.o fuse_impls_access.o fuse_impls_chmod.o fuse_impls_chown.o fuse_impls_create.o fuse_impls_flush.o fuse_impls_getattr.o fuse_impls_mkdir.o fuse_impls_mknod.o fuse_impls_open.o fuse_impls_read.o fuse_impls_release.o fuse_impls_readdir.o fuse_impls_rename.o fuse_impls_rmdir.o fuse_impls_statfs.o fuse_impls_symlink.o fuse_impls_truncate.o fuse_impls_utimens.o fuse_impls_unlink.o fuse_impls_write.o [exec] /usr/bin/ld: fuse_stat_struct.o: undefined reference to symbol 'ceil@@GLIBC_2.2.5' [exec] /usr/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line [exec] /lib64/libm.so.6: could not read symbols: Invalid operation [exec] collect2: ld returned 1 exit status [exec] make[1]: *** [fuse_dfs] Error 1 [exec] make[1]: Leaving directory `/local/opt/hadoop-0.20.2/src/contrib/fuse-dfs/src' [exec] make: *** [all-recursive] Error 1 BUILD FAILED /local/opt/hadoop-0.20.2/build.xml:497: The following error occurred while executing this line: /local/opt/hadoop-0.20.2/src/contrib/build.xml:30: The following error occurred while executing this line: /local/opt/hadoop-0.20.2/src/contrib/fuse-dfs/build.xml:57: exec returned: 2
这里需要注意的是我没有定义FUSE_HOME。 你认为定义FUSE_HOME可以提供帮助吗? 或者你有关于这个问题的想法?
我不认为定义FUSE_HOME会有帮助。 重要的路线是
[exec] /usr/bin/ld: fuse_stat_struct.o: undefined reference to symbol 'ceil@@GLIBC_2.2.5' [exec] /usr/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line [exec] /lib64/libm.so.6: could not read symbols: Invalid operation [exec] collect2: ld returned 1 exit status
链接器告诉你fuse_stat_struct.c中的符号'ceil'找不到,但它知道它在哪里。 它在libm.so中 – 可能由glibc-devel提供。 也许你需要一个32位版本的libm.so. 我以前没见过这个。
有点search产生这个: http : //lists.fedoraproject.org/pipermail/devel/2010-March/133601.html
作为一个刺戳,试着设置你的LDFLAGS环境variables并重新编译。
ant compile-contrib -Dislibhdfs=1 -Dfusedfs=1 -Dlibhdfs-fuse=1 LDFLAGS=-lm