This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

build (and check) glibc with libstdc++ in alternate location


Building latest git clone of glibc with an alternate prefix, e.g., /path/to/programs, make check fails:

    GCONV_PATH=/path/to/glibc_build/iconvdata LC_ALL=C   /path/to/glibc_build/elf/ld-linux.so.2 --library-path /path/to/glibc_build:/path/to/glibc_build/math:/path/to/glibc_build/elf:/path/to/glibc_build/dlfcn:/path/to/glibc_build/nss:/path/to/glibc_build/nis:/path/to/glibc_build/rt:/path/to/glibc_build/resolv:/path/to/glibc_build/crypt:/path/to/glibc_build/nptl /path/to/glibc_build/dlfcn/bug-atexit3  > /path/to/glibc_build/dlfcn/bug-atexit3.out

    make[2]: *** [/grid/gro/vol/gbl_statcomp_prod/x86-32-linux/src/glibc-head/glibc_build/dlfcn/bug-atexit3.out] Error 1


contents of bug-atexit3:

    dlopen failed: libstdc++.so.6: cannot open shared object file: No such file or directory

glibc build uses gcc-4.2.4 which I compiled and installed in an alternate path.
libstdc++.so.6 exists in the alternate location, i.e. /path/to/programs/lib

LD_LIBRARY_PATH is unset

I have found two workarounds.  Adding something like this to Makeconfig
resulted in a succesful build and make check:

    LDFLAGS.so += -Wl,--enable-new-dtags -Wl,-rpath,/path/to/lib

But another workaround, which seemed like it might have fewer consequences for the build, also worked.  I symlinked libgcc_s.so.1 and libstdc++.so.6 into the root of the build directory.

Any feedback on these approaches, or suggestions about a more standard way to
make the tests find libstdc++?

-- 
Yorick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]