Where to find symbols in libraries? - Embedded

This is a discussion on Where to find symbols in libraries? - Embedded ; I have a basic question about libraries. I am trying to build konqueror embedded, and if I use only the libraries on my embedded system, the build fails because it cannot find inet_pton. The problem is described here: . The ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Where to find symbols in libraries?

  1. Where to find symbols in libraries?

    I have a basic question about libraries.

    I am trying to build konqueror embedded, and if I use only the libraries
    on my embedded system, the build fails because it cannot find inet_pton.

    The problem is described here:
    .

    The solution is to set up your libs so that configure can find the lib
    with inet_pton....

    So... How do I find out which lib I need?

    nm returns a whole pile of inet_pton symbols, but I have no idea how to
    read it.

    Could someone help me out?

    Thanks,

    --Yan

  2. Re: Where to find symbols in libraries?

    CptDondo wrote in
    news:12dndhv70svug18@corp.supernews.com:

    > I have a basic question about libraries.
    >
    > I am trying to build konqueror embedded, and if I use only the
    > libraries on my embedded system, the build fails because it cannot
    > find inet_pton.
    >
    > The problem is described here:
    > .
    >
    > The solution is to set up your libs so that configure can find the lib
    > with inet_pton....
    >
    > So... How do I find out which lib I need?
    >
    > nm returns a whole pile of inet_pton symbols, but I have no idea how
    > to read it.
    >
    > Could someone help me out?
    >
    > Thanks,
    >
    > --Yan
    >


    There *should* be on a properly done library (not very often these days)
    a man page for every fuction (man 3 (?)). In addition you could try
    greping the include files - they *have* to have a reference for a
    compile to work. This would require - as all of what your're trying to
    do - the development libraries.


    --
    (setq (chuck nil) car(chuck) )

  3. Re: Where to find symbols in libraries?

    CptDondo writes:

    > I have a basic question about libraries.
    >
    > I am trying to build konqueror embedded, and if I use only the
    > libraries on my embedded system, the build fails because it cannot
    > find inet_pton.
    >
    > The problem is described here:
    > .


    > The solution is to set up your libs so that configure can find the lib
    > with inet_pton....


    On my system, thats libc.

    > So... How do I find out which lib I need?


    Normally the man page will tell you about the library,
    since this is libc which comes in automatically,
    it appears not to be mentioned.

    > nm returns a whole pile of inet_pton symbols, but I have no idea how
    > to read it.


    The nm man page explains the output.

  4. Re: Where to find symbols in libraries?

    ["Followup-To:" header set to comp.os.linux.embedded.] On 11 Aug 2006
    02:29:47 +0200, chuckcar staggered into the Black Sun and said:
    > CptDondo wrote in
    >> I have a basic question about libraries. I am trying to build
    >> konqueror embedded, and if I use only the libraries on my embedded
    >> system, the build fails because it cannot find inet_pton.
    >>
    >> .
    >> The solution is to set up your libs so that configure can find the
    >> lib with inet_pton....
    >>
    >> So... How do I find out which lib I need? nm returns a whole pile of
    >> inet_pton symbols, but I have no idea how to read it.

    > There *should* be on a properly done library (not very often these
    > days) a man page for every fuction (man 3 (?)).


    inet_pton has a valid manpage. However, said page doesn't have "link
    with libFOO" in it. OTOH:

    amantha:/usr/lib$ nm -A *\.a 2>/dev/null | grep inet_pton | grep -v 'U '
    libapr-0.a:inet_pton.o:00000000 T apr_inet_pton
    libc.a:inet_pton.o:000000c0 T inet_pton
    [snip]

    ....so I think the thing is in libc, at least on a non-embedded system.
    I was able to compile and run a short, stupid test program that called
    inet_pton() without any -l options at all. So, I think this may be an
    embedded problem. You may be able to use a modified version of the nm
    above to get the right library name, since this thing has a less-than
    standard setup. HTH,

    --
    Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
    Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
    http://www.brainbench.com / "He is a rhythmic movement of the
    -----------------------------/ penguins, is Tux." --MegaHAL

  5. Re: Where to find symbols in libraries?

    Dances With Crows wrote:
    >
    > inet_pton has a valid manpage. However, said page doesn't have "link
    > with libFOO" in it. OTOH:
    >
    > amantha:/usr/lib$ nm -A *\.a 2>/dev/null | grep inet_pton | grep -v 'U '
    > libapr-0.a:inet_pton.o:00000000 T apr_inet_pton
    > libc.a:inet_pton.o:000000c0 T inet_pton
    > [snip]
    >


    OK so I take it that I need to match up the *exact* name of the symbol?
    So apr_inet_pton is different from inet_pton?

    And that the 'T' symbols are the only ones I am looking for?

    (This sort of low-level stuff is pretty new to me; usually my stuff just
    compiles automagically - at least when I don't screw up the code. For a
    heightened sense of frustration I recommend cross-compiling big c++ apps
    like qt and konqueror embedded....) :-)

    --Yan

+ Reply to Thread