Forum Discussion

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

net-snmp with Mircrotronix cross compile

Hi,

with the Mircrotronix cross compile chain I'm trying to compile net-snmp 5.2.2.

I get the following error when creating the libnetsnmp.so :

/usr/local/nios2[long path]/3.4.3/[long path]nios2-linux-uclibc/lib/crt0.o in function _start

: undefined reference to main.

/usr/local/nios2[long path]/3.4.3/[long path]nios2-linux-uclibc/lib/libc.a in function

__uClibc_start_main

: undefined reference to main.

Any hint how can I fix those errors?

Thanks for helping

Bzh

6 Replies

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

    --- Quote Start ---

    originally posted by temex@Dec 5 2005, 10:57 AM

    hi,

    with the mircrotronix cross compile chain i'm trying to compile net-snmp 5.2.2.

    i get the following error when creating the libnetsnmp.so :

    /usr/local/nios2[long path]/3.4.3/[long path]nios2-linux-uclibc/lib/crt0.o in function _start

    : undefined reference to main.

    /usr/local/nios2[long path]/3.4.3/[long path]nios2-linux-uclibc/lib/libc.a in function

    __uclibc_start_main

    : undefined reference to main.

    any hint how can i fix those errors?

    thanks for helping

    bzh

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=11329)

    --- quote end ---

    --- Quote End ---

    The build process is trying to build a shared library (that is what the .so extension means), and those are not supported. Try enabling static compilation instead.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by lpearson@Dec 9 2005, 11:26 AM

    the build process is trying to build a shared library (that is what the .so extension means), and those are not supported. try enabling static compilation instead.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=11456)

    --- quote end ---

    --- Quote End ---

    Thanks

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

    hi temex:

    I want to use NET-SNMP in nios2.

    please share your experience and reult.

    Thanks a lot.

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

    hi,

    just download the latest net-snmp sources 5.2.2.

    edit config.sub:

    add "| nios2" in the "case $basic_machine in"

    run:

    ./configure --host=nios2-linux --with-cc=nios2-linux-gcc --disable-shared -enable-static --with-endianness=little

    compile and seems to work fine. (works under linux not cygwin)

    good luck,

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

    --- Quote Start ---

    originally posted by temex@Dec 14 2005, 04:00 AM

    hi,

    just download the latest net-snmp sources 5.2.2.

    edit config.sub:

    add "| nios2" in the "case $basic_machine in"

    run:

    ./configure --host=nios2-linux --with-cc=nios2-linux-gcc --disable-shared -enable-static --with-endianness=little

    compile and seems to work fine. (works under linux not cygwin)

    good luck,

    marc

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=11532)

    --- quote end ---

    --- Quote End ---

    Thank you very much http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif