【发布时间】:2013-10-14 14:51:28
【问题描述】:
在 chroot 到 Ubuntu 后,我在 Chrome OS 上构建了 glibc 2.17(raring)。 Glibc 指定了 --with-headers 配置参数来提取 Chrome OS 内核头文件。
然后我使用DESTDIR 将结果安装到Chrome OS 的/usr/local 目录中。我还删除了与已经存在的 glibc 冲突的文件,并将当前的文件符号链接到我的新 /usr/local/ 目录中。它适用于 i686 内核,但现在我正在运行 x86_64(并在其下重建了所有内容),在尝试在 Chrome 操作系统上构建 openssl 时会发生这种情况:
libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x11): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/lib/../lib64/libdl.a(dlopen.o): relocation R_X86_64_PC32 against undefined symbol `__dlopen' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[4]: *** [link_a.gnu] Error 1
我尝试使用 -fPIC 重建 binutils,但仍然没有成功。
【问题讨论】:
标签: linux gcc makefile glibc google-chrome-os