On mån, 2007-07-02 at 12:00 -0700, Need Help wrote:
> The main build guy (who has been helping me) is on vacation this week,
> so I had to try to figure out this myself.
> 
> It seems one of the most important aspects of the "configure" command
> is the "--target" option ....... and I was not using this option
> previously.  Anyway, I asked around and it seems the
> CPU-MANUFACTURER-OS we are using is "mipsel-uclibc-linux" so I added
> the "--target" option to my "./configure" command as follows:
> 
>   ./configure \
>   --prefix=$(BUILDROOT)/usr/local \
>   --srcdir=$(BUILDROOT)/netsnmp \
>   --with-default-snmp-version="3" \
>   --with-sys-contact="contact" \
>   --with-sys-location="location" \
>   --with-logfile="$(BUILDROOT)/netsnmp/var/log/snmpd.log" \
>   --with-persistent-directory="$(BUILDROOT)/netsnmp/var/net-snmp" \
>   --disable-embedded-perl \
>   --without-perl-modules \
>   --host=localhost \
>   --target=mipsel-uclibc-linux \
>   --with-cc=$(CC) \
>   --with-linkcc=$(CC) \
>   --with-cflags="-x c" \
>   --with-ldflags="-x none" \
>   --with-endianness=little;
> 
> 
> ** Note: I am not sure if the "--host=localhost" option setting is
> correct, but this was set our main build guy over here so I am
> assuming it is correct.

It is not correct.

./configure --help says, among other things,

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

so in your case --host=mipsel-uclibc-linux should be used.

--host=localhost says that the target vendor-architecture-os is
localhost so it mostly looks odd.

>  
> 
> 
> Anyway, after running the "./configure" command, there were still
> similiar compiler errors being produced (shown below).  Is there
> reason to believe my cross-compilation setup might still be incorrect?
> 
> Here shows the "snmpd.c" module being compiled:
> 
> /bin/sh ../libtool  --mode=compile mipsel-uclibc-g++ -I../include
> -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/include -I.
> -I../agent
> -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent
> -I../agent/mibgroup
> -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent/mibgroup 
> -I../snmplib 
> -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/snmplib   -x c 
> -Ulinux -Dlinux=linux  -c -o snmpd.lo snmpd.c
>  mipsel-uclibc-g++ -I../include
> -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/include -I.
> -I../agent
> -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent
> -I../agent/mibgroup
> -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent/mibgroup 
> -I../snmplib 
> -I/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/snmplib -x c 
> -Ulinux -Dlinux=linux -c snmpd.c -o snmpd.o
> snmpd.c: In function `main':
> snmpd.c:948: warning: assignment discards qualifiers from pointer
> target type
> 
> 
> Here shows the link failing with "undefined reference" errors:
> 
> /bin/sh ../libtool  --mode=link mipsel-uclibc-g++ -x c -Ulinux
> -Dlinux=linux  -x none  -o snmpd snmpd.lo   libnetsnmpmibs.la
> libnetsnmpagent.la
> helpers/libnetsnmphelpers.la  ../snmplib/libnetsnmp.la -ldl -lm
> mipsel-uclibc-g++ -x c -Ulinux -Dlinux=linux -x none -o snmpd
> snmpd.o  ./.libs/libnetsnmpmibs.a ./.libs/libnetsnmpagent.a
> helpers/.libs/libnetsnmphelpers.a ../snmplib/.libs/libnetsnmp.a -ldl
> -lm
> ./.libs/libnetsnmpmibs.a(at.o): In function `ARP_Scan_Init':
> mibgroup/mibII/at.c:(.text+0xe6c): undefined reference to
> `netsnmp_access_interface_index_find'
> ./.libs/libnetsnmpmibs.a(hr_network.o): In function `Init_HR_Network':
> mibgroup/host/hr_network.c:(.text+0xb24): undefined reference to
> `Interface_Scan_Init'
> ./.libs/libnetsnmpmibs.a(hr_network.o): In function
> `Get_Next_HR_Network':
> mibgroup/host/hr_network.c:(.text+0xb90): undefined reference to
> `Interface_Scan_Next'
> ./.libs/libnetsnmpmibs.a(ipAddr.o): In function `Address_Scan_Next':
> mibgroup/mibII/ipAddr.c:(.text+0xe68): undefined reference to
> `netsnmp_access_interface_index_find'
> ./.libs/libnetsnmpmibs.a(var_route.o): In function
> `Route_Scan_Reload':
> mibgroup/mibII/var_route.c:(.text+0xea4): undefined reference to
> `netsnmp_access_interface_index_find'
> ./.libs/libnetsnmpmibs.a(ifTable.o): In function `ifTable_commit':
> mibgroup/if-mib/ifTable/ifTable.c:(.text+0x4ff8): undefined reference
> to `netsnmp_access_interface_entry_set_admin_status'
> ./.libs/libnetsnmpmibs.a(ifTable_data_access.o): In function
> `ifTable_container_load':
> mibgroup/if-mib/ifTable/ifTable_data_access.c:(.text+0xe68): undefined
> reference to `netsnmp_access_interface_container_load'
> mibgroup/if-mib/ifTable/ifTable_data_access.c:(.text+0xf04): undefined
> reference to `netsnmp_access_interface_container_free'
> ./.libs/libnetsnmpmibs.a(arp_linux.o): In function `_load_v4':
> mibgroup/ip-mib/data_access/arp_linux.c:(.text+0x574): undefined
> reference to `netsnmp_access_interface_index_find'
> collect2: ld returned 1 exit status
> make[2]: *** [snmpd] Error 1
> make[2]: Leaving directory
> `/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp/agent'
> make[1]: *** [subdirs] Error 1
> make[1]: Leaving directory
> `/export/home/rosent1/vegasCC/1.97/buildsys/A506/netsnmp'
> make: *** [net-snmp-make] Error 2
> 
> 
> 
> 
> Need Help <[EMAIL PROTECTED]> wrote:
>         Thomas,
>         
>         I looked in the email archives and found this reply from you
>         on 6/28:
>         
>         Subject:  Does a patch exist --> "mibgroup/mibII/at.c:727:
>         error
>         
>         The "-Ulocalhost -Dlocalhost=localhost" suspiciously looks
>         like your
>         (cross-)compilation setup didn't specify a correct target. See
>         http://www.freesnmp.com/net-snmp/faqs/#cross for some more
>         information.
>         Again, this is in no way specific to Net-SNMP.
>         
>         Seems like your reply was during the same day Magnus' replied
>         as well (which I did not receive either).   I probably did not
>         receive any of those postings that day due to some problem I
>         guess ..... not sure what could have happened.  None of these
>         emails were in my "delete" queue either, so I know I did not
>         accidently delete them.
>         
>         I understand how you would intepret me as "not trying", but
>         please understand I never received this email for some unknown
>         reason.   As a result, I can not try recommendations I never
>         received.  I guess I will always need to check the email
>         archives first before posting.  
>         
>         Anyway, I have now obviously have found your email and will
>         get together with our build people and try to look into your
>         recommendation.  I do appreciate your help.  It is not my
>         intent to be bothersome to others on this forum.  Thanks.
>         
>         
>         
>         Need Help <[EMAIL PROTECTED]> wrote:
>                 
>                 The last email response I received from you was the
>                 following:
>                 
>                 "This is likely a problem with your cross-compilation
>                 setup. I'd suggest
>                 to take this up with your build team and/or the
>                 cross-compilation
>                 toolchain people."
>                 
>                 I am not familiar with what cross-compilation stuff
>                 you were referring to, but I have been working for two
>                 days with our build person to try to resolve all
>                 compiler issues.  I have tried everything people here
>                 have recommended (most recently Magnus'
>                 recommendations).   Have you posted new emails to the
>                 group?   If so, I have not received any.  I will once
>                 again look in the email archives to see if I have
>                 missed any responses (as I did not ever receive
>                 Magnus' email response on how to solve the "error
>                 stray" errors until I looked into the email
>                 archives).   
>                 
>                 Please believe me, I am trying all recommendations and
>                 do appreciate everyone's help.   I am trying to
>                 resolve this stuff by myself, and only ask questions
>                 when I just can not figure out where to go next.  
>                 
>                 
>                 
>                 Thomas Anders <[EMAIL PROTECTED]> wrote:
>                         Need Help wrote:
>                         > Well, I have been playing around for the
>                         past two hours and still can
>                         > not figure out how to resolve these errors. 
>                         
>                         It still doesn't look as if you've even
>                         recognized (let alone tried) the
>                         suggestions I've been giving you here twice.
>                         Similar things have
>                         happened with suggestions from other people on
>                         this list. Why? May I
>                         suggest you work on improving in this regard
>                         if you expect further help?
>                         
>                         
>                         +Thomas
>                         
>                         -- 
>                         Thomas Anders (thomas.anders at blue-cable.de)
>                 
>                 
>                 
>                 ______________________________________________________
>                 Looking for a deal? Find great prices on flights and
>                 hotels with Yahoo!
>                 
> FareChase.-------------------------------------------------------------------------
>                 This SF.net email is sponsored by DB2 Express
>                 Download DB2 Express C - the FREE version of DB2
>                 express and take
>                 control of your XML. No limits. Just data. Click to
>                 get it now.
>                 
> http://sourceforge.net/powerbar/db2/_______________________________________________
>                 Net-snmp-coders mailing list
>                 [email protected]
>                 https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>         
>         
>         
>         ______________________________________________________________
>         Luggage? GPS? Comic books? 
>         Check out fitting gifts for grads at Yahoo!
>         
> Search.-------------------------------------------------------------------------
>         This SF.net email is sponsored by DB2 Express
>         Download DB2 Express C - the FREE version of DB2 express and
>         take
>         control of your XML. No limits. Just data. Click to get it
>         now.
>         
> http://sourceforge.net/powerbar/db2/_______________________________________________
>         Net-snmp-coders mailing list
>         [email protected]
>         https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
> 
> 
> 
> 
> ______________________________________________________________________
> Park yourself in front of a world of choices in alternative vehicles.
> Visit the Yahoo! Auto Green Center.
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________ Net-snmp-coders mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to