I have built glibc 2.17 on Chrome OS after chrooting to Ubuntu(raring). Glibc had the --with-headers
configure param specified to extracted Chrome OS kernel headers.
Then I installed the results into Chrome OS's /usr/local
directory using DESTDIR
. I also removed files conflicting with already present glibc, and symlinked the present ones into my new /usr/local/
dir. It worked on i686 kernel, but now that I'm running x86_64(and rebuilt everything under that), this happens while trying to build openssl on Chrome OS:
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
I tried rebuilding binutils with -fPIC
, but still no luck.
The error states that libdl
needs to be recompiled with -fPIC
. That's part of libc
, not binutils
, at least on XUbuntu 13.04