make check question and dynamic linker location

Mike Frysinger vapier@gentoo.org
Mon Dec 23 10:05:00 GMT 2013


On Friday 30 August 2013 13:57:52 Steve Ellcey wrote:
> I have a question about running the glibc testsuite.  According to the Wiki
> one can run the tests with 'make check' in the build directory, but when I
> do that I get errors and I notice that the failure is in a link with
> '-Wl,-dynamic-linker=/usr/fake/lib/ld.so.1'.  Now /usr/fake is the prefix I
> give to configure when building glibc but I have not installed glibc there
> and when I do install it I am going to override that location with
> install_root=, and other options.

-dynamic-linker is only used to encode the interp into the ELF.  it shouldn't 
be used for any other purpose off the top of my head (like resolving symbols or 
linking against libs or anything like that).

when the testsuite actually runs, it does so using the local ldso first like:
/var/tmp/portage/sys-libs/glibc-2.18/work/build-x86-x86_64-pc-linux-gnu-
nptl/elf/ld.so --library-path <list of local build paths> <path to actual ELF> 
<args to ELF>

since the ld.so is a statically linked ELF (does all the bootstrapping 
itself), this works fine.

> make[2]: Circular
> /home/sellcey/gcc/memset/obj-mipsisa32r2el-linux-gnu/glibc/obj_default/lin
> kobj/libc.so <-
> /home/sellcey/gcc/memset/obj-mipsisa32r2el-linux-gnu/glibc/obj_default/lin
> kobj/libc.so dependency dropped

i think this error has been fixed since your posting

> /home/sellcey/gcc/memset/obj-mipsisa32r2el-linux-gnu/glibc/obj_default/lin
> kobj/libc_pic.a(init-first.os): In function `_init':
> /home/sellcey/gcc/memset/src/glibc/csu/init-first.c:100: undefined
> reference to `__libc_global_ctors' collect2: error: ld returned 1 exit
> status
> make[2]: ***
> [/home/sellcey/gcc/memset/obj-mipsisa32r2el-linux-gnu/glibc/obj_default/li
> nkobj/libc.so] Error 1 

this is unrelated to your `make check`.  you have to build libc.so first :).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-help/attachments/20131223/3b4c96e3/attachment.sig>


More information about the Libc-help mailing list