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]

Re: glibc port to non-linux platform


Hello Carlos,
I have continued to struggle with this but hopefully I have learned more
along the way. Please see responses to your suggestions inline.


Carlos O'Donell wrote:
On Wed, Oct 22, 2008 at 7:12 PM, James Laros <jhlaros@sandia.gov> wrote:
The build fails with the following error:
make[5]: Leaving directory
`/rsc/home/jhlaros/CNW_SVN_glibc/trunk/pe/computelibs/glibc/ctype'
make -C ../elf
objdir=/rsc/home/jhlaros/CNW_SVN_glibc/trunk/pe/computelibs/glibc/build/cnos64
-f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-dl-profstub.os
rtld-dl-libc.os rtld-dl-open.os rtld-dl-close.os'
make[5]: Entering directory
`/rsc/home/jhlaros/CNW_SVN_glibc/trunk/pe/computelibs/glibc/elf'
../elf/rtld-Rules:34: *** missing separator.  Stop.
make[4]: ***
[/rsc/home/jhlaros/CNW_SVN_glibc/trunk/pe/computelibs/glibc/build/cnos64/elf/rtld-dl-profstub.os]
Error 2
make[3]: ***
[/rsc/home/jhlaros/CNW_SVN_glibc/trunk/pe/computelibs/glibc/build/cnos64/elf/rtld-libc.a]
Error 2
make[2]: *** [elf/subdir_lib] Error 2
make[1]: *** [install] Error 2
make: *** [glibc_for_catamount_apps] Error 2
make[5]: Leaving directory
`/rsc/home/jhlaros/CNW_SVN_glibc/trunk/pe/computelibs/glibc/elf'
make[4]: Leaving directory
`/rsc/home/jhlaros/CNW_SVN_glibc/trunk/pe/computelibs/glibc/elf'
make[3]: Leaving directory
`/rsc/home/jhlaros/CNW_SVN_glibc/trunk/pe/computelibs/glibc/elf'
make[2]: Leaving directory
`/rsc/home/jhlaros/CNW_SVN_glibc/trunk/pe/computelibs/glibc'


My understanding is this happens because at this point the build should not descend into the subdir elf as evidenced by this in elf/rtld-Rules file lines:

ifndef rtld-subdirs
error This is makefile is a subroutine of elf/Makefile not to be used
directly
endif

This rule guards against rtld-Rules being used by any other Makefile from any other directory. Only elf/Makefile may use elf/rtld-Rules. This rule is not your problem.

My guess is that in a typical environment the build will not attempt to
enter elf. I have built for a Linux client as a sanity check and in fact the
rtld-subdirs at the bottom of build/elf/librtld.mk does not include elf.

Almost. You are already in elf/, and you re-running a build on a subset of the top-level directories (rtld-subdirs) to build the object files you need. If elf appears in rtld-subdirs then the rebuild would recurse forever. You need to figure out why the rule $(objpfx)librtld.mk: in elf/Makefile is adding elf to the rtld-subdirs variable.

e.g.
Why is this:
        echo rtld-subdirs = `LC_ALL=C sed 's/^rtld-\([^ ]*\).*$$/\1/' $@T \
                             | LC_ALL=C sort -u` >> $@T
adding elf to your list of directories.

I believe that the rule $(objpfx)librtld.mk: is working as it is
intended. Please correct my following assumptions if I am wrong.
Before this rule executes the librtld.map file is created which is a
link map generated for libc_pic.a and dl-allobjs.os. I think the answer to your question is that the reason that elf is being added to the rtld-subdirs is there are symbols needed (based on the librtld.map file) that are in objects in the elf subdir. I think this should not be the case no? If this is true my problem originates in the build process before the link map is generated. Any guesses on why either librtld.a or dl-allobjs.os are generated such that unresolved symbols originating in the elf subdir become necessary?


Any nudge in the right direction would be appreciated.

Jim

Cheers, Carlos.


--


James H. Laros III                Phone: 505-845-8532
Dept. 1422                        email: jhlaros@sandia.gov
Scalable Computer Architectures
Sandia National Labs

"The history of liberty is a history of the limitations of
governmental power, not the increase of it." - Wilson



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