0
我已经在chrooting到Ubuntu(raring)之后在Chrome OS上构建了glibc 2.17。 Glibc将--with-headers
配置参数指定为提取的Chrome操作系统内核头文件。交叉编译的glibc导致构建错误
然后我使用DESTDIR
将结果安装到Chrome操作系统的/usr/local
目录中。我还删除了与已经存在的glibc冲突的文件,并将目前的文件链接到我的新的/usr/local/
目录中。它的工作在i686的内核,但现在我运行x86_64的(和重建下的一切),出现这种情况,而试图在Chrome OS打造的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的,但仍然没有运气。
重新编译的glibc用'-fPIC'工作(实际上,设置CFLAGS也需要你手动设置optimalization标志,所以最后的结果是'CFLAGS = -fPIC -02 '。谢谢! –
您的欢迎:) –