[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: ucdsnmp package for uCLinux?



Hello,
I succeed in compiling the libraries libucdmibs.a, libucdagent.a and
libsnmp.a. I used the makefiles from the uclinux snmp package and copied it
into the net-snmp 4.2.3 package, because I need agentx support. I think the
makefile from the uclinux package has no agentx support?!?! I think so,
because I tried to compile my own master agent and I get some errors like
this:

>./libucdagent.a(snmp_agent.o): In function `init_master_agent':
>snmp_agent.o(.text+0x16c): undefined reference to `real_init_master'
>./libucdagent.a(snmp_vars.o): In function `init_agent':
>snmp_vars.o(.text+0x56): undefined reference to `subagent_pre_init'
>./libucdagent.a(agent_registry.o): In function `dump_registry':
>agent_registry.o(.text+0xd8e): undefined reference to `dump_idx_registry'
>./libucdagent.a(agent_trap.o): In function `snmpd_parse_config_trapsess':
>agent_trap.o(.text+0xbde): undefined reference to `snmp_parse_args'
>collect2: ld returned 1 exit status

Further, I get errors with the libucdmibs.a library, when I compile my
agent: (there are more errors, but they look similar to the following!)

>gcc-cris -mlinux -isystem
/root/axis/devboard_lx/eroot/include -g -s -L/root/axis/devboard_lx/eroot/li
b  -o axis main.o >htlStatus.o -L. -lucdmibs -lucdagent -lsnmp
>./libucdmibs.a(errormib.o)(.stab+0x1970): relocation truncated to fit:
R_CRIS_8 var_extensible_errors
>/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: Unsupported .stab
relocation
>./libucdmibs.a(errormib.o)(.stab+0x1afc): relocation truncated to fit:
R_CRIS_8 no symbol
>/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: Unsupported .stab
relocation
>./libucdmibs.a(errormib.o)(.stab+0x1acc): relocation truncated to fit:
R_CRIS_8 no symbol
>/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: Unsupported .stab
relocation
>./libucdmibs.a(errormib.o)(.stab+0x1afc): relocation truncated to fit:
R_CRIS_8 no symbol
>/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: Unsupported .stab
relocation
>./libucdmibs.a(errormib.o)(.stab+0x1b08): relocation truncated to fit:
R_CRIS_8 no symbol
>/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: Unsupported .stab
relocation
>./libucdmibs.a(errormib.o)(.rodata+0xc): relocation truncated to fit:
R_CRIS_8 var_extensible_errors
>/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: Unsupported .stab
relocation
>./libucdmibs.a(errormib.o)(.rodata+0x20): relocation truncated to fit:
R_CRIS_8
>var_extensible_errors
>/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: Unsupported .stab
relocation
>./libucdmibs.a(errormib.o)(.rodata+0x34): relocation truncated to fit:
R_CRIS_8
>var_extensible_errors
>/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: Unsupported .stab
relocation
>./libucdmibs.a(errormib.o)(.rodata+0x48): relocation truncated to fit:
R_CRIS_8
>var_extensible_errors


>>Please help me helping you: What cris-dist compiler-tools version are you
using? What is the output from running the >>following commands?:
>>	rpm -qi cris-dist

The output of this commands is that:

Name        : cris-dist                    Relocations: (not relocateable)
Version     : 1.16                              Vendor: Axis Communications
AB.
Release     : 1                             Build Date: Sat Dec  1 03:09:36
2001
Install date: Sun Jan  6 15:15:39 2002      Build Host: doa
Group       : Development/Tools             Source RPM:
cris-dist-1.16-1.src.rpm
Size        : 106555520                        License: GNU General Public
License, libraries with GNU Library General Public License
Packager    : Compiler contact <compiler-contact@xxxxxxx.com>
URL         : http://developer.axis.com/
Summary     : Compiler tools for the CRIS CPU in Axis ETRAX chips.
Description :
This toolsuite contains ports of GCC (gcc-cris release R37),
binutils (post 2.11), newlib (post 1.8.2) and glibc (April 2001) for the
CRIS CPU core in Axis Communications ETRAX chips.  It is used to build all
ETRAX-targeted software.  For details, see
/usr/doc/cris-dist-1.16/README and /usr/doc/cris-dist-1.16/NEWS
(file paths may vary).


>>	gcc-cris -v -xc /dev/null
And for this command I got the following lines:

Reading specs from /usr/local/cris/lib/gcc-lib/cris/2.96/specs
gcc version 2.96 20000427 (experimental)

/usr/local/cris/lib/gcc-lib/cris/2.96/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_M
INOR__=96 -D__GNUC_PATCHLEVEL__=0 -Dcris -DCRIS -DGNU_CRIS -D__cris__ -D__CR
IS__ -D__GNU_CRIS__ -D__cris -D__CRIS -D__GNU_CRIS -$ -D__CRIS_ABI_version=2
 -D__ELF__ /dev/null /tmp/cchMcNDu.i
GNU CPP version 2.96 20000427 (experimental) (cpplib)
 [CRIS, Axis GCC release R37]
ignoring nonexistent directory
`/var/tmp/cris-dist-1.16-buildroot/usr/local/cris/lib/gcc-lib/cris/2.96/incl
ude'
ignoring nonexistent directory
`/usr/local/cris/lib/gcc-lib/cris/2.96/sys-include'
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/cris/lib/gcc-lib/cris/2.96/include
End of search list.
 /usr/local/cris/lib/gcc-lib/cris/2.96/cc1
/tmp/cchMcNDu.i -melf -quiet -dumpbase null.c -version -o /tmp/cc2kn0CQ.s
GNU C version 2.96 20000427 (experimental) (cris) compiled by GNU C version
egcs-2.91.66 19990314/Linux (egcs-1.1.2 release).
 /usr/local/cris/lib/gcc-lib/cris/2.96/as -v --em=criself -o /tmp/cctXgrNb.o
/tmp/cc2kn0CQ.s
GNU assembler version 2.11.90 (cris) using BFD version 2.11.90
 /usr/local/cris/lib/gcc-lib/cris/2.96/collect2 -mcriself --verbose
/usr/local/cris/lib/gcc-lib/cris/2.96/crtbegin2.o
/usr/local/cris/lib/gcc-lib/cris/2.96/crtbegin.o
/usr/local/cris/lib/gcc-lib/cris/2.96/crt0.o -L/usr/local/cris/lib/gcc-lib/c
ris/2.96 /tmp/cctXgrNb.o -lgcc -lc -lbsp -lnosys -lgcc
/usr/local/cris/lib/gcc-lib/cris/2.96/crtend.o
GNU ld version 2.11.90 (with BFD 2.11.90)
  Supported emulations:
   criself
   crisaout
   crislinux
using internal linker script:
==================================================
OUTPUT_FORMAT("elf32-us-cris", "elf32-us-cris",
              "elf32-us-cris")
OUTPUT_ARCH(cris)
ENTRY(__start)
 SEARCH_DIR(/usr/local/cris/lib);
/* Do we need any of these for elf?
   __DYNAMIC = 0;    */
__start = DEFINED(__start) ? __start :
  DEFINED(_start) ? _start :
    DEFINED(start) ? start :
      DEFINED(.startup) ? .startup + 2 : 2;
SECTIONS
{
  /* Read-only sections, merged into text segment: */
  . = 0;
  .interp     : { *(.interp)    }
  .startup : { KEEP(*(.startup)) }
  .hash          : { *(.hash)           }
  .dynsym        : { *(.dynsym)         }
  .dynstr        : { *(.dynstr)         }
  .gnu.version   : { *(.gnu.version)    }
  .gnu.version_d   : { *(.gnu.version_d)        }
  .gnu.version_r   : { *(.gnu.version_r)        }
  .rel.init      : { *(.rel.init)       }
  .rela.init     : { *(.rela.init)      }
  .rel.text      :
    {
      *(.rel.text)
      *(.rel.text.*)
      *(.rel.gnu.linkonce.t.*)
    }
  .rela.text     :
    {
      *(.rela.text)
      *(.rela.text.*)
      *(.rela.gnu.linkonce.t.*)
    }
  .rel.fini      : { *(.rel.fini)       }
  .rela.fini     : { *(.rela.fini)      }
  .rel.rodata    :
    {
      *(.rel.rodata)
      *(.rel.rodata.*)
      *(.rel.gnu.linkonce.r.*)
    }
  .rela.rodata   :
    {
      *(.rela.rodata)
      *(.rela.rodata.*)
      *(.rela.gnu.linkonce.r.*)
    }
  .rel.data      :
    {
      *(.rel.data)
      *(.rel.data.*)
      *(.rel.gnu.linkonce.d.*)
    }
  .rela.data     :
    {
      *(.rela.data)
      *(.rela.data.*)
      *(.rela.gnu.linkonce.d.*)
    }
  .rel.ctors     : { *(.rel.ctors)      }
  .rela.ctors    : { *(.rela.ctors)     }
  .rel.dtors     : { *(.rel.dtors)      }
  .rela.dtors    : { *(.rela.dtors)     }
  .rel.got       : { *(.rel.got)                }
  .rela.got      : { *(.rela.got)               }
  .rel.sdata     :
    {
      *(.rel.sdata)
      *(.rel.sdata.*)
      *(.rel.gnu.linkonce.s.*)
    }
  .rela.sdata     :
    {
      *(.rela.sdata)
      *(.rela.sdata.*)
      *(.rela.gnu.linkonce.s.*)
    }
  .rel.sbss      :
    {
      *(.rel.sbss)
      *(.rel.sbss.*)
      *(.rel.gnu.linkonce.sb.*)
    }
  .rela.sbss     :
    {
      *(.rela.sbss)
      *(.rela.sbss.*)
      *(.rel.gnu.linkonce.sb.*)
    }
  .rel.sdata2    :
    {
      *(.rel.sdata2)
      *(.rel.sdata2.*)
      *(.rel.gnu.linkonce.s2.*)
    }
  .rela.sdata2   :
    {
      *(.rela.sdata2)
      *(.rela.sdata2.*)
      *(.rela.gnu.linkonce.s2.*)
    }
  .rel.sbss2     :
    {
      *(.rel.sbss2)
      *(.rel.sbss2.*)
      *(.rel.gnu.linkonce.sb2.*)
    }
  .rela.sbss2    :
    {
      *(.rela.sbss2)
      *(.rela.sbss2.*)
      *(.rela.gnu.linkonce.sb2.*)
    }
  .rel.bss       :
    {
      *(.rel.bss)
      *(.rel.bss.*)
      *(.rel.gnu.linkonce.b.*)
    }
  .rela.bss      :
    {
      *(.rela.bss)
      *(.rela.bss.*)
      *(.rela.gnu.linkonce.b.*)
    }
  .rel.plt       : { *(.rel.plt)                }
  .rela.plt      : { *(.rela.plt)               }
  .init          :
  {
 . = ALIGN(2);
 ___init__start = .;
 PROVIDE (___do_global_ctors = .);
 SHORT (0xe1fc); /* push srp */
 SHORT (0xbe7e);
    KEEP (*(.init))
 SHORT (0x0d3e); /* jump [sp+] */
 PROVIDE (__init__end = .);
 PROVIDE (___init__end = .);
  } =0
  .plt      : { *(.plt) }
  .text      :
  {
    __Stext = ADDR (.startup);
    *(.text)
    *(.text.*)
    *(.stub)
    /* .gnu.warning sections are handled specially by elf32.em.  */
    *(.gnu.warning)
    *(.gnu.linkonce.t.*)
  } =0
  .fini      :
  {
 . = ALIGN (2);
 ___fini__start = .;
 PROVIDE (___do_global_dtors = .);
 SHORT (0xe1fc); /* push srp */
 SHORT (0xbe7e);
    KEEP (*(.fini))
 SHORT (0x0d3e); /* jump [sp+] */
 PROVIDE (__fini__end = .);
 ___fini__end = .;
  } =0
  PROVIDE (__etext = .);
  PROVIDE (_etext = .);
  PROVIDE (etext = .);
  .rodata   : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) }
  .rodata1   : { *(.rodata1) }
  .sdata2   : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
  .sbss2   : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
  PROVIDE (__Etext = .);
  /* Adjust the address for the data segment.  We want to adjust up to
     the same address within the page on the next page up.  */
  . = ALIGN(32) + (. & (32 - 1));
  .data    :
  {
    PROVIDE (__Sdata = .);
    *(.data)
    *(.data.*)
    *(.gnu.linkonce.d.*)
    SORT(CONSTRUCTORS)
  }
  .data1   : { *(.data1) }
  .eh_frame : { KEEP (*(.eh_frame)) }
  .gcc_except_table : { *(.gcc_except_table) }
  .ctors   :
  {
 PROVIDE (___ctors = .);
 ___elf_ctors_dtors_begin = .;
    /* gcc uses crtbegin.o to find the start of
       the constructors, so we make sure it is
       first.  Because this is a wildcard, it
       doesn't matter if the user does not
       actually link against crtbegin.o; the
       linker won't look for a file to match a
       wildcard.  The wildcard also means that it
       doesn't matter which directory crtbegin.o
       is in.  */
    KEEP (*crtbegin.o(.ctors))
    /* We don't want to include the .ctor section from
       from the crtend.o file until after the sorted ctors.
       The .ctor section from the crtend file contains the
       end of ctors marker and it must be last */
    KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
    KEEP (*(SORT(.ctors.*)))
    KEEP (*(.ctors))
 PROVIDE (___dtors_end = .);
 ___elf_ctors_dtors_end = .;
  }
   .dtors         :
  {
 PROVIDE (___dtors = .);
    KEEP (*crtbegin.o(.dtors))
    KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
    KEEP (*(SORT(.dtors.*)))
    KEEP (*(.dtors))
  }
  .got            : { *(.got.plt) *(.got) }
  .dynamic       : { *(.dynamic) }
  /* We want the small data sections together, so single-instruction offsets
     can access them all, and initialized data all before uninitialized, so
     we can shorten the on-disk segment size.  */
  .sdata     :
  {
    *(.sdata)
    *(.sdata.*)
    *(.gnu.linkonce.s.*)
  }
  PROVIDE (__Edata = .);
  _edata = .;
  PROVIDE (edata = .);
  __bss_start = .;
  .sbss      :
  {
    PROVIDE (__sbss_start = .);
    PROVIDE (___sbss_start = .);
    *(.dynsbss)
    *(.sbss)
    *(.sbss.*)
    *(.gnu.linkonce.sb.*)
    *(.scommon)
    PROVIDE (__sbss_end = .);
    PROVIDE (___sbss_end = .);
  }
  .bss       :
  {
   *(.dynbss)
   *(.bss)
   *(.bss.*)
   *(.gnu.linkonce.b.*)
   *(COMMON)
   /* Align here to ensure that the .bss section occupies space up to
      _end.  Align after .bss to ensure correct alignment even if the
      .bss section disappears because there are no input sections.  */
   . = ALIGN(32);
  }
  . = ALIGN(32);
  _end = .;
 PROVIDE (__Ebss = .);
 PROVIDE (__end = .);
 __Sbss = SIZEOF (.sbss) != 0 ? ADDR (.sbss) : ADDR (.bss);
 PROVIDE (_bss_start = __Sbss);
  PROVIDE (end = .);
  /* Stabs debugging sections.  */
  .stab 0 : { *(.stab) }
  .stabstr 0 : { *(.stabstr) }
  .stab.excl 0 : { *(.stab.excl) }
  .stab.exclstr 0 : { *(.stab.exclstr) }
  .stab.index 0 : { *(.stab.index) }
  .stab.indexstr 0 : { *(.stab.indexstr) }
  .comment 0 : { *(.comment) }
  /* DWARF debug sections.
     Symbols in the DWARF debugging sections are relative to the beginning
     of the section so we begin them at 0.  */
  /* DWARF 1 */
  .debug          0 : { *(.debug) }
  .line           0 : { *(.line) }
  /* GNU DWARF 1 extensions */
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
  .debug_sfnames  0 : { *(.debug_sfnames) }
  /* DWARF 1.1 and DWARF 2 */
  .debug_aranges  0 : { *(.debug_aranges) }
  .debug_pubnames 0 : { *(.debug_pubnames) }
  /* DWARF 2 */
  .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
  .debug_abbrev   0 : { *(.debug_abbrev) }
  .debug_line     0 : { *(.debug_line) }
  .debug_frame    0 : { *(.debug_frame) }
  .debug_str      0 : { *(.debug_str) }
  .debug_loc      0 : { *(.debug_loc) }
  .debug_macinfo  0 : { *(.debug_macinfo) }
  /* SGI/MIPS DWARF 2 extensions */
  .debug_weaknames 0 : { *(.debug_weaknames) }
  .debug_funcnames 0 : { *(.debug_funcnames) }
  .debug_typenames 0 : { *(.debug_typenames) }
  .debug_varnames  0 : { *(.debug_varnames) }
PROVIDE (__Eall = .);
PROVIDE (__Endmem = 0x10000000);
PROVIDE (__Stacksize = 0);
  /* These must appear regardless of  .  */
}


========/usr/local/cris/lib/gcc-lib/cris/2.96/crt0.o: In function `start0':
/usr/src/redhat/BUILD/cris-dist-1.16/./gnu-toplev/libgloss/cris/crt0.c:403:
undefined reference to `main'
==========================================
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/crtbegin2.o succeeded
/usr/local/cris/lib/gcc-lib/cris/2.96/crtbegin2.o
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/crtbegin.o succeeded
/usr/local/cris/lib/gcc-lib/cris/2.96/crtbegin.o
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/crt0.o succeeded
/usr/local/cris/lib/gcc-lib/cris/2.96/crt0.o
attempt to open /tmp/cctXgrNb.o succeeded
/tmp/cctXgrNb.o
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/libgcc.so failed
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/libgcc.a succeeded
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/libc.so failed
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/libc.a succeeded
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)atexit.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)environ.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)exit.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)impure.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)malloc.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)mallocr.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)memcpy.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)memset.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)mlock.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)sbrkr.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libc.a)freer.o
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/libbsp.so failed
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/libbsp.a succeeded
(/usr/local/cris/lib/gcc-lib/cris/2.96/libbsp.a)intrptr.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libbsp.a)ints.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libbsp.a)intdefault.o
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/libnosys.so failed
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/libnosys.a succeeded
(/usr/local/cris/lib/gcc-lib/cris/2.96/libnosys.a)sbrk.o
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/libgcc.so failed
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/libgcc.a succeeded
(/usr/local/cris/lib/gcc-lib/cris/2.96/libgcc.a)_mulsi3_libgcc1_cris.o
(/usr/local/cris/lib/gcc-lib/cris/2.96/libgcc.a)_udivsi3_libgcc1_cris.o
attempt to open /usr/local/cris/lib/gcc-lib/cris/2.96/crtend.o succeeded
/usr/local/cris/lib/gcc-lib/cris/2.96/crtend.o
collect2: ld returned 1 exit status


-----Ursprüngliche Nachricht-----
Von: owner-dev-etrax@xxxxxxx.com]Im">mailto:owner-dev-etrax@xxxxxxx.com]Im
Auftrag von Hans-Peter Nilsson
Gesendet: Montag, 14. Jänner 2002 17:13
An: aauer1@xxxxxxx.at
Cc: dev-etrax@xxxxxxx.com
Betreff: Re: ucdsnmp package for uCLinux?


> From: "Andreas Auer" <aauer1@xxxxxxx.at>
> Date: Fri, 11 Jan 2002 22:45:27 +0100

> I have tried to compile the ucdsnmp package for the axis system.
> But I couldn't do this. I got the following error:
>
> gcc-cris: Internal compiler error: program cc1 got fatal signal 11
> make: *** [misc/ipfwacc.o] Error 1
>
> Before this error, I got many warnings. Can anyone help me?

Please help me helping you:
What cris-dist compiler-tools version are you using?
What is the output from running the following commands?:
 rpm -qi cris-dist
 gcc-cris -v -xc /dev/null

If you're using cris-dist-1.16, please also send me:
1. The complete command line (all gcc-cris options) where you
   got the error quoted above.
2. The file "ipfwacc.i" that is generated when you re-run that
   command-line and add the option "-save-temps".
Please quote (copy-paste) rather than describe.

This will help resolve the problem quickly.  It is true that I
could try and find the "ucdsnmp package" of the same version you
have (guessing) and configure it the same way (guessing), but it
is much too likely that I will miss just the detail that lead to
the error you see.

Thanks.

brgds, H-P