Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

Osip2 on uClinux

I am experiencing a problem, trying to use Osip under uClinux/niosII

When running the following code the whole system locks up...

Is there anybody here with some Osip/Osip2 experience?

# include <sys/time.h># include <osip2/osip.h>

int main(void)

{

int i;

osip_t *osip;

i=osip_init(&osip);

if (i!=0)

return -1;

}

Might be a thread or semaphore problem, i just don&#39;t know where to start

looking

Any sugestions?

regards

Mikkel Kidmose

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    > When running the following code the whole system locks up...

    I remember having the same problem -- it had something to do with tracing or

    gperf or something like that-- but it has been awhile. When you configure, try

    disabling the (initially) unnecessary features, then go from there. E.g.:

    --enable-static

    --disable-shared

    --disable-trace

    --disable-debug

    --disable-gperf

    Also, make sure your include paths are properly set so you don&#39;t build against

    the wrong headers: e.g.

    $ export CPPFLAGS "-I<whatever>"

    Regards,

    --Scott
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thx for the help.

    I found the problem but not the solution yet....

    when i make the executable the osip library isnt linked in to it statically

    so the osip_init is unknown. Tried adding -static to LDFLAGS but that does not help

    any ideas?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    > Tried adding -static to LDFLAGS but that does not help any ideas?

    Remove all of your osip libraries and reconfigure ... make sure you

    --disable-shared --enable-static, make/install again, then rebuild your

    application.

    Regards,

    --Scott
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thx Scott

    But the solution was even simpler i had commented out my osip2 lib in rules.mak by accident... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif

    So now my Osip2 works....

    And i have moved on to eXosip2 the init has the same problem... but it is beeing linked

    i am stepping thru the exosip_init() but havent found the problem yet...

    i configured it with:

    --host=nios2-elf

    --enable-static --disable-shared --disable-gperf --disable-libtool-lock --disable-debug --disable-josua --disable-glib --disable-glibtest --enable-pthread --enable-sysv --enable-semaphore --silent

    any ideas

    regards

    Mikkel
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Mikkel,

    > had commented out my osip2 lib in rules.mak by accident...

    I hate it when that happens! ;-)

    > So now my Osip2 works....

    Great!

    > And i have moved on to eXosip2

    Sorry, can&#39;t help here. I looked at eXosip2 ... but the license for that is GPL rather

    than LGPL ... and I wasn&#39;t crazy about the architecture ... so I never bothered to

    dig any deeper.

    Let us know how you make out.

    Regards,

    --Scott